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 neologix
Recipients gps, neologix, vstinner
Date 2011-06-25.14:51:08
SpamBayes Score 9.45906e-11
Marked as misclassified No
Message-id <>
test_2_join_in_forked_process fails on FreeBSD 6.4 buildbot. FreeBSD 6.4 3.x/builds/1606/steps/test/logs/stdio

FAIL: test_2_join_in_forked_process (test.test_threading.ThreadJoinOnShutdown)
Traceback (most recent call last):
  File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/", line 464, in test_2_join_in_forked_process
  File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/", line 436, in _run_and_join
    self.assertEqual(data, "end of main\nend of thread\n")
AssertionError: '' != 'end of main\nend of thread\n'
+ end of main
+ end of thread

I think it's the same problem as issue #12316: in the child process, even calling pthread_create can segfault/abort on FreeBSD6 (async-safe blahblah...).
Tests creating a thread from a fork()ed process should be skipped on FreeBSD6.
Patch attached, along with some refactoring to use the skipIf idiom.

As for test_3_join_in_forked_from_thread, well, it could be more or less the same problem. We're really doing something prohibited by POSIX, so things might break in unexpected ways. For example, calling pthread_condition_destroy from the child process can deadlock (see

Victor: to debug this kind of problem, it would be great if faulthandler could also dump tracebacks of children processes. Do you mind if I create a new issue?
Date User Action Args
2011-06-25 14:51:10neologixsetrecipients: + neologix, vstinner, gps
2011-06-25 14:51:10neologixsetmessageid: <>
2011-06-25 14:51:09neologixlinkissue11870 messages
2011-06-25 14:51:09neologixcreate