[issue15914] multiprocessing.SyncManager connection hang

2015-02-13 Thread Brett Cannon
Brett Cannon added the comment: Dead code deletion should be a separate issue, so I'm going to close this as fixed. -- resolution: -> fixed status: open -> closed ___ Python tracker __

[issue15914] multiprocessing.SyncManager connection hang

2015-02-12 Thread Nick Coghlan
Nick Coghlan added the comment: 3.2 is in security-fix only mode, so nothing's going to change there. For 3.3+, the per-module import lock design means the issue doesn't happen. However, I wonder if there may be some now dead code relating to the global import lock that could be deleted.

[issue15914] multiprocessing.SyncManager connection hang

2015-02-12 Thread Brett Cannon
Brett Cannon added the comment: I'm adding Nick to see if he has anything to add since he was the one that worked on the change that Richard said caused the problem. But in my opinion this is in the same realm as importing as a side-effect of spawning a thread; don't do it. -- nosy: +

[issue15914] multiprocessing.SyncManager connection hang

2015-02-11 Thread Davin Potts
Davin Potts added the comment: Adding Brett Cannon as this issue appears to really be about doing an import shortly after an os.fork() -- this may be of particular interest to him. This issue probably should have had Brett and/or others added to nosy long ago. -- nosy: +brett.cannon, d

[issue15914] multiprocessing.SyncManager connection hang

2012-09-11 Thread Richard Oudkerk
Richard Oudkerk added the comment: It looks like the problem was caused be the fix for http://bugs.python.org/issue9573 I think the usage this was intended to enable is evil since one of the forked processes should always be terminated with os._exit(). --

[issue15914] multiprocessing.SyncManager connection hang

2012-09-11 Thread Richard Oudkerk
Richard Oudkerk added the comment: Python 3.2 has extra code in _PyImport_ReInitLock() which means that when a fork happens as a side effect of an import, the main thread of the forked process owns the import lock. Therefore other threads in the forked process cannot import anything. _PyImpo

[issue15914] multiprocessing.SyncManager connection hang

2012-09-11 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- type: crash -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue15914] multiprocessing.SyncManager connection hang

2012-09-11 Thread Richard Oudkerk
Richard Oudkerk added the comment: Here is a reproduction without using multiprocessing: create.py: import threading, os def foo(): print("Trying import") import sys print("Import successful") pid = os.fork() if pid == 0: try: t = threading.Thread(target=foo) t

[issue15914] multiprocessing.SyncManager connection hang

2012-09-11 Thread Richard Oudkerk
Richard Oudkerk added the comment: I get the same hang on Linux with Python 3.2. For Windows the documentation does warn against starting a process as a side effect of importing a process. There is no explicit warning for Unix, but I would still consider it bad form to do such things as a sid

[issue15914] multiprocessing.SyncManager connection hang

2012-09-10 Thread R. David Murray
Changes by R. David Murray : -- nosy: +sbt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue15914] multiprocessing.SyncManager connection hang

2012-09-10 Thread Sean B. Palmer
New submission from Sean B. Palmer: create.py: import multiprocessing manager = multiprocessing.Manager() namespace = manager.Namespace() print("create.py complete") run.py: import create print("run.py complete") Correct behaviour occurs for create.py: $ python3 create.py create.py complete