Opened 9 years ago

Closed 9 years ago

#8527 closed Bugs (invalid)

signal_set goes into an infinit handling loop while handling SEGV

Reported by: Pichot Fabien <pichot.fabien@…> Owned by: chris_kohlhoff
Milestone: To Be Determined Component: asio
Version: Boost 1.53.0 Severity: Problem
Keywords: asio signal_set Cc:

Description

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%.

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).

I attached a small test to reproduce the problem, strace and ltrace files (interrupted after few seconds). Not sure if it's useful though

Attachments (3)

signal_set.cpp (357 bytes ) - added by Pichot Fabien <pichot.fabien@…> 9 years ago.
test emphazing the problem
ltrace-signal_set (60.6 KB ) - added by Pichot Fabien <pichot.fabien@…> 9 years ago.
ltrace log
strace-signal_set (14.7 KB ) - added by Pichot Fabien <pichot.fabien@…> 9 years ago.
strace log

Download all attachments as: .zip

Change History (4)

by Pichot Fabien <pichot.fabien@…>, 9 years ago

Attachment: signal_set.cpp added

test emphazing the problem

by Pichot Fabien <pichot.fabien@…>, 9 years ago

Attachment: ltrace-signal_set added

ltrace log

by Pichot Fabien <pichot.fabien@…>, 9 years ago

Attachment: strace-signal_set added

strace log

comment:1 by chris_kohlhoff, 9 years ago

Resolution: invalid
Status: newclosed

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.

Note: See TracTickets for help on using tickets.