This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients giampaolo.rodola, python-dev, rosslagerwall, vstinner
Date 2011-06-26.20:50:09
SpamBayes Score 3.7482266e-09
Marked as misclassified No
Message-id <1309121409.97.0.00261398089512.issue12303@psf.upfronthosting.co.za>
In-reply-to
Content
> @Victor, you've had some experience with fixing signals
> on the FreeBSD 6 buildbot...

It's not exactly that I had some experience, it's just that I have a SSH access to the buildbot.

The following code hangs for (exactly?) 30 seconds on sigwaitinfo():
----
import os, signal, threading
s = signal.SIGALRM
signal.pthread_sigmask(signal.SIG_BLOCK, [s])
os.kill(os.getpid(), s)
signal.sigwaitinfo([s])
signal.pthread_sigmask(signal.SIG_UNBLOCK, [s])
----
sigwait() and sigtimedwait() wait also 30 seconds.

The following code only hangs for 1 second using sigwait(), sigwaitinfo() or sigtimedwait():
----
import os, signal, threading
s = signal.SIGALRM
signal.pthread_sigmask(signal.SIG_BLOCK, [s])
os.kill(os.getpid(), s)
signal.sigwaitinfo([s])
signal.pthread_sigmask(signal.SIG_UNBLOCK, [s])
----

test_sigtimedwait_poll() should be skipped on FreeBSD 6, there is a bug in the OS.

test_sigwaitinfo_interrupted() fails because SIGALRM signal handler is called, and the default FreeBSD handler stops the process. You should install a dummy signal handler (e.g. lambda signum, frame: None) for SIGALRM. I don't understand why the test doesn't fail on Linux, the default handler of SIGALRM on Linux stops also the process.
History
Date User Action Args
2011-06-26 20:50:10vstinnersetrecipients: + vstinner, giampaolo.rodola, rosslagerwall, python-dev
2011-06-26 20:50:09vstinnersetmessageid: <1309121409.97.0.00261398089512.issue12303@psf.upfronthosting.co.za>
2011-06-26 20:50:09vstinnerlinkissue12303 messages
2011-06-26 20:50:09vstinnercreate