[issue14666] test_sendall_interrupted hangs on FreeBSD with a zombi multiprocessing thread

2012-04-28 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This should have fixed it. If now, someone reopen the issue :) -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue14666] test_sendall_interrupted hangs on FreeBSD with a zombi multiprocessing thread

2012-04-28 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: This should have fixed it. If now, someone reopen the issue :) Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14666 ___

[issue14666] test_sendall_interrupted hangs on FreeBSD with a zombi multiprocessing thread

2012-04-27 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset f163c4731c58 by Antoine Pitrou in branch 'default': Issue #14666: stop multiprocessing's resource-sharing thread after the tests are done. http://hg.python.org/cpython/rev/f163c4731c58 -- nosy: +python-dev

[issue14666] test_sendall_interrupted hangs on FreeBSD with a zombi multiprocessing thread

2012-04-26 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: New patch which adds timeout to ResourceSharer.stop() which defaults to 0. When stop() fails it now uses the logger. pthread_sigmask() only stops this background thread from receiving signals. Signals will still be delivered to other

[issue14666] test_sendall_interrupted hangs on FreeBSD with a zombi multiprocessing thread

2012-04-25 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: New version of patch which does signal.pthread_sigmask(signal.SIG_BLOCK, range(1, signal.NSIG)) in the thread (is that right?). It also uses a timeout when trying to join the thread. -- Added file:

[issue14666] test_sendall_interrupted hangs on FreeBSD with a zombi multiprocessing thread

2012-04-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: in the thread (is that right?). This looks like it. It also uses a timeout when trying to join the thread. Perhaps some kind of warning can be printed if joining fails after the timeout? -- ___

[issue14666] test_sendall_interrupted hangs on FreeBSD with a zombi multiprocessing thread

2012-04-25 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: Warning added to patch. -- Added file: http://bugs.python.org/file25362/mp_resource_sharer_stop.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14666

[issue14666] test_sendall_interrupted hangs on FreeBSD with a zombi multiprocessing thread

2012-04-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Hmm, I thought either multiprocessing's logging facilities, or the warnings module, could be used. That way, people have a control over verbosity of stderr messages. -- ___ Python tracker

[issue14666] test_sendall_interrupted hangs on FreeBSD with a zombi multiprocessing thread

2012-04-25 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: mp_resource_sharer_stop.patch: this patch changes two different things, the patch should be splitted. One patch to fix test_socket. One patch to call pthread_sigmask(). I don't think that you should call pthread_sigmask(). It looks like

[issue14666] test_sendall_interrupted hangs on FreeBSD with a zombi multiprocessing thread

2012-04-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I don't think that you should call pthread_sigmask(). It looks like a workaround for this issue, whereas resource_sharer.stop() is the correct fix. The problem is not only with test_multiprocessing and test_socket; any test which uses

[issue14666] test_sendall_interrupted hangs on FreeBSD with a zombi multiprocessing thread

2012-04-25 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: mp_resource_sharer_stop.patch: you should add a timeout argument to stop() instead of hardcoding a timeout of 5 seconds. It is maybe safer to block until the thread exits by default (so timeout=None by default). For the new method: it

[issue14666] test_sendall_interrupted hangs on FreeBSD with a zombi multiprocessing thread

2012-04-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: For the new method: it may be nice to document it. Having to import resource_sharer from multiprocessing.reduction is maybe not the best possible API :-/ resource_sharer is a private API, it's not meant to be used by anyone outside of the

[issue14666] test_sendall_interrupted hangs on FreeBSD with a zombi multiprocessing thread

2012-04-24 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@gmail.com: [233/364] test_multiprocessing ... [265/364] test_typechecks [266/364] test_socket Timeout (1:00:00)! Thread 0x000807235000: File /usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/socket.py, line 135 in accept File

[issue14666] test_sendall_interrupted hangs on FreeBSD with a zombi multiprocessing thread

2012-04-24 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: There was a similar issue: #11753, but it was a bug in the faulthandler module. Here it looks like a bug in TestSocketSharing of test_socket which uses multiprocessing. -- ___ Python

[issue14666] test_sendall_interrupted hangs on FreeBSD with a zombi multiprocessing thread

2012-04-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Ah, this is because of the new daemon thread in ResourceSharer. That thread is never stopped and could receive signals while tests expect them to be delivered to the main thread. Either we add a (private?) facility to stop that thread, or we

[issue14666] test_sendall_interrupted hangs on FreeBSD with a zombi multiprocessing thread

2012-04-24 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- components: +Library (Lib) stage: - needs patch type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14666 ___

[issue14666] test_sendall_interrupted hangs on FreeBSD with a zombi multiprocessing thread

2012-04-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The pthread_sigmask() solution would allow the use of multiprocessing all the while keeping deterministic signal delivery. -- ___ Python tracker rep...@bugs.python.org

[issue14666] test_sendall_interrupted hangs on FreeBSD with a zombi multiprocessing thread

2012-04-24 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: This patch adds a ResourceSharer.stop() method. This is called from tearDownClass() in the unittest. -- keywords: +patch Added file: http://bugs.python.org/file25357/mp_resource_sharer_stop.patch