-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
evconnlistener_new() fails #81
Comments
Well, surprise. from /* There is race window here: we announce ourselves listening,
* but this transition is still not validated by get_port().
* It is OK, because this socket enters to hash table only
* after validation is complete.
*/ |
In |
Now I think I understand why RSRV tests both if(bind(tcpsock, &scratch.sa, sizeof(scratch))==0 && listen(tcpsock, 20)==0) { |
In the end I rediscover... https://bugs.launchpad.net/epics-base/+bug/1862328 (epics-base/epics-base#58 epics-base/epics-base@4844fbb) |
Observed on a Debian 12 host with an IOC, one of 34 PVA servers started in parallel during system boot. A later restart succeeds.
pvxs/src/serverconn.cpp
Lines 447 to 449 in 5fa743d
evconnlistener_new()
can fail frommalloc()
(seems unlikely) orlisten()
. The later seems the most likely. By this point, the socket is already bound, which I thought was the only reasonlisten()
could fail (aside from alloc...).Maybe
bind()
on Linux is lazier than I thought?ev_owned_ptr<>
should be changed to captureSOCKERRNO
.The text was updated successfully, but these errors were encountered: