Charles-François Natali <[email protected]> added the comment:
test_2_join_in_forked_process fails on FreeBSD 6.4 buildbot.
http://www.python.org/dev/buildbot/all/builders/x86 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/test_threading.py",
line 464, in test_2_join_in_forked_process
self._run_and_join(script)
File
"/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_threading.py",
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 http://bugs.python.org/issue6721#msg136047).
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?
----------
keywords: +patch
nosy: +neologix
Added file: http://bugs.python.org/file22468/test_threading_fork.diff
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11870>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com