pvxs icon indicating copy to clipboard operation
pvxs copied to clipboard

evconnlistener_new() fails

Open mdavidsaver opened this issue 6 months ago • 4 comments

Observed on a Debian 12 host with an IOC, one of 34 PVA servers started in parallel during system boot. A later restart succeeds.

...: Error in pvxsBaseRegistrar : bad_alloc serverconn.cpp:448

https://github.com/epics-base/pvxs/blob/5fa743d4c87377859953012af3c0fbcd1b063129/src/serverconn.cpp#L447-L449

evconnlistener_new() can fail from malloc() (seems unlikely) or listen(). The later seems the most likely. By this point, the socket is already bound, which I thought was the only reason listen() could fail (aside from alloc...).

Maybe bind() on Linux is lazier than I thought?

ev_owned_ptr<> should be changed to capture SOCKERRNO.

mdavidsaver avatar Aug 14 '24 16:08 mdavidsaver