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.
Created on 2014年10月22日 13:59 by ionelmc, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (5) | |||
|---|---|---|---|
| msg229825 - (view) | Author: Ionel Cristian Mărieș (ionelmc) | Date: 2014年10月22日 13:59 | |
Example code:
import os
import sys
import threading
def run():
sys.stderr.write("in parent thread\n")
threading.Thread(target=run).start()
pid = os.fork()
if pid:
os.waitpid(pid, 0)
else:
sys.stderr.write("in child\n")
To run: while python3 deadlock.py; do; done
Note: does not reproduce if ran with `python -u` (unbuffered)
|
|||
| msg230470 - (view) | Author: Nir Soffer (nirs) * | Date: 2014年11月01日 23:40 | |
This is a duplicate of http://bugs.python.org/issue6721 |
|||
| msg230489 - (view) | Author: Ionel Cristian Mărieș (ionelmc) | Date: 2014年11月02日 15:23 | |
Serhiy, I don't think this is a duplicate. Odd that you closed this without any explanation. This happens in a internal lock in cpython's runtime, while the other bug is about locks used in the logging module (which are very different). |
|||
| msg230493 - (view) | Author: Charles-François Natali (neologix) * (Python committer) | Date: 2014年11月02日 15:44 | |
> Maries Ionel Cristian added the comment: > > Serhiy, I don't think this is a duplicate. Odd that you closed this without any explanation. > > This happens in a internal lock in cpython's runtime, while the other bug is about locks used in the logging module (which are very different). Yes, this is a duplicate. Whether the lock is an internal or a user-created one doesn't change anything, it's always the same problem of having a lock locked by another thread at the time of the fork(). |
|||
| msg230494 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2014年11月02日 15:45 | |
Sorry. I thought issue6721 is more general, not just about the logging module. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:09 | admin | set | github: 66886 |
| 2014年11月02日 15:45:41 | serhiy.storchaka | set | messages: + msg230494 |
| 2014年11月02日 15:44:19 | neologix | set | status: open -> closed resolution: duplicate messages: + msg230493 |
| 2014年11月02日 15:23:01 | ionelmc | set | status: closed -> open resolution: duplicate -> (no value) messages: + msg230489 |
| 2014年11月02日 15:11:51 | serhiy.storchaka | set | status: open -> closed nosy: + serhiy.storchaka resolution: duplicate superseder: Locks in the standard library should be sanitized on fork stage: resolved |
| 2014年11月01日 23:40:28 | nirs | set | nosy:
+ nirs messages: + msg230470 |
| 2014年10月24日 22:48:19 | pitrou | set | nosy:
+ neologix |
| 2014年10月22日 13:59:27 | ionelmc | create | |