facebook/wangle

Function with noexcept specifier throws exception causes program terminated

zER0pAGe-1 opened this issue · 3 comments

The following function in wangle acceptor could possibly throws an exception in makeNewAsyncSocket
https://github.com/facebook/wangle/blob/master/wangle/acceptor/Acceptor.cpp#L305

While I didn't find any catch phrase that could handle this exception, thus when create new async socket failed, the exception causes the whole program terminated.

My question is, is that normal or should I override this function to deal with exceptions on my case?

It is not generally expected that creating the async socket fails, triggering program termination.

Do you have more details on what the exception is and what triggers it? If this is reproducible in the debugger, any chance of a type, a message, and a stacktrace?

Exception message:
AsyncSocketException: failed to set close-on-exec flag(type = Internal error, errno=9(Bad file descriptor))

Exception happens about once a day (online environment), and it seems I can't reproduce it in debugger