New submission from Richard Purdie :
We had a python hang at shutdown. The gdb python backtrace and C backtraces are
below. It is hung in the COND_WAIT(gil->switch_cond, gil->switch_mutex) call in
drop_gil().
Py_FinalizeEx -> handle_system_exit() -> PyGC_Collect ->
Richard Purdie added the comment:
I think the python code implementing pthread_sigmask already does trigger
interrupts if any have been queued before the function returns from blocking or
unblocking.
The key subtlety which I initially missed is that if you have another thread in
your
Richard Purdie added the comment:
This is a production backtrace after I inserted code to traceback if tid was
already in _blocking_on. It is being triggered by a warning about an unclosed
asyncio event loop and confirms my theory about nested imports, in the
production case I'd guess
New submission from Richard Purdie :
We've seen tracebacks in production like:
File "", line 1004, in
_find_and_load(name='oe.gpg_sign', import_=)
File "", line 158, in
_ModuleLockManager.__enter__()
File "", line 110, in _ModuleLock.acqu
New submission from Richard Purdie :
I've been struggling to get signal.pthread_sigmask to do what I expected it to
do from the documentation. Having looked at the core python code handling
signals I now (think?!) I understand what is happening. It might be possible
for python to improv
Richard Purdie added the comment:
Even my hack to call _writer.close() doesn't seem to be enough, it makes the
problem rarer but there is still an issue.
Basically, if you call cancel_join_thread() in one process, the queue is
potentially totally broken in all other processes that m
Richard Purdie added the comment:
I should also add that if we don't use cancel_join_thread() in the parser
processes, things all work out ok. There is therefore seemingly something odd
about the state that is leaving things in.
This issue doesn't occur every time, its maybe 1
New submission from Richard Purdie :
We're having some problems with multiprocessing.Queue where the parent process
ends up hanging with zombie children. The code is part of bitbake, the task
execution engine behind OpenEmbedded/Yocto Project.
I've cut down our code to the pieces i