Boost C++ Libraries: Ticket #8527: signal_set goes into an infinit handling loop while handling SEGV https://svn.boost.org/trac10/ticket/8527 <p> When you create a signal_set handling SIGSEGV, and generate a real SEGV just after a call to async_wait, the program goes into an infinite loop of handling, burning a cpu to 100%. </p> <p> It seems that the asio handler writes the signal number into a pipe, returns, and is called again indefinitely (Cf the {l,s}trace log). </p> <p> I attached a small test to reproduce the problem, strace and ltrace files (interrupted after few seconds). Not sure if it's useful though </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8527 Trac 1.4.3 Pichot Fabien <pichot.fabien@…> Tue, 30 Apr 2013 10:41:16 GMT attachment set https://svn.boost.org/trac10/ticket/8527 https://svn.boost.org/trac10/ticket/8527 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">signal_set.cpp</span> </li> </ul> <p> test emphazing the problem </p> Ticket Pichot Fabien <pichot.fabien@…> Tue, 30 Apr 2013 10:41:33 GMT attachment set https://svn.boost.org/trac10/ticket/8527 https://svn.boost.org/trac10/ticket/8527 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">ltrace-signal_set</span> </li> </ul> <p> ltrace log </p> Ticket Pichot Fabien <pichot.fabien@…> Tue, 30 Apr 2013 10:43:21 GMT attachment set https://svn.boost.org/trac10/ticket/8527 https://svn.boost.org/trac10/ticket/8527 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">strace-signal_set</span> </li> </ul> <p> strace log </p> Ticket chris_kohlhoff Fri, 24 May 2013 02:56:56 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/8527#comment:1 https://svn.boost.org/trac10/ticket/8527#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> According to POSIX, the allowing the C signal handler to return after handling one of SIGFPE, SIGILL, or SIGSEGV results in undefined behaviour. Don't use them with signal_set. </p> Ticket