rr, threads, and signal handlers

Wade Hennessey wadehennessey at gmail.com
Tue Nov 3 03:39:56 UTC 2015


I don't know if this list is the right place to ask a question about rr,
pthreads and signal handlers, but it's the only place I've found.

I have a program with 2 threads (but it could be an arbitrary number).
Thread one at some point sends a signal to thread 2, and thread 2 has a
signal handler that gets called. Thread 2 does a small amount of work and
then busy waits for thread 1 to change the state of a global variable to
indicate that it's ok to return from the signal handler.

This program works fine without rr, but when I run try to rr record it, it
hangs, seemingly because thread 1 never gets a chance to run and tell the
signal handler on thread 2 that it's ok to return. Does rr require the
signal handler on thread 2 to return before allowing thread 1 to run
because of an rr limitation (i.e - everything runs on one core and signal
handlers must return before any other thread can execute?).

If there's a better place to ask this question, please let me know. The
program in question could benefit immensely from rr if I can get it to work
with rr record. -wade
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rr-dev/attachments/20151102/021dd52a/attachment.html>


More information about the rr-dev mailing list