Daniel Birnstiel added the comment:
While having to deal with this bug for a while I have written a small library
using `pthread_atfork`: https://github.com/Birne94/python-atfork-lock-release
It allows registering atfork-hooks (similar to the ones available by now) and
frees the stdout/stderr
Daniel Birnstiel added the comment:
I am currently (occasionally) running into the same problem, using Python 3.6.0
on OSX 10.12.3.
I cannot reproduce this segmentation fault reliably, it happens after running
for a while in production. This appears to be similar to issue 13829.
python
Changes by Daniel Birnstiel :
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue29859>
___
___
Daniel Birnstiel added the comment:
While I agree, fprintf it not really nice, I looked through other parts of the
python source where information is printed to stderr and fprintf was used there
as well, so I fell back to it myself.
% grep -rnw . -e "fprintf(stderr,&quo
Daniel Birnstiel added the comment:
While you might scold me for the following code, it is just some fiddling with
the cpython functions from python side.
Backstory is issue 6721 or related to it. I am working on a multi-process
service which uses multiprocessing (or rather the billiard fork
Changes by Daniel Birnstiel :
--
pull_requests: +654
___
Python tracker
<http://bugs.python.org/issue29859>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Birnstiel added the comment:
I have attached a diff adding a new macro for handling pthread_* status codes.
Will submit PR as soon as my CLA is approved.
--
keywords: +patch
versions: +Python 3.7
Added file: http://bugs.python.org/file46746/patch.diff
New submission from Daniel Birnstiel:
Python/thread_pthread.h:145 defines the CHECK_STATUS macro used for printing
error messages in case any of the calls fail.
CHECK_STATUS uses perror for formatting an error message, which relies on the
global erno being set (see man perror). Since the
Daniel Birnstiel added the comment:
Currently using
Python 3.6.0 (default, Mar 4 2017, 12:32:34)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
> So, somehow the print() statement is blocking, which I have /no/ idea how to
> go about debugging. I assume there