[issue1336] subprocess.Popen hangs when child writes to stderr

2021-10-19 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1336] subprocess.Popen hangs when child writes to stderr

2021-10-19 Thread EricLin
EricLin added the comment: @torsten Your comment here did a great help to me. I observed a long running python 2.7 process leaking memory. I did a lot of digging and eventually found that gc was disabled in this process. But who disabled it? I really have no idea. Luckily, I find this

[issue1336] subprocess.Popen hangs when child writes to stderr

2016-09-19 Thread Torsten Landschoff
Torsten Landschoff added the comment: Just got bitten by this problem again. If anybody else still runs into this, the solution on python2.7 is to install the subprocess32 module from pypi.python.org and use that instead of subprocess. -- ___

[issue1336] subprocess.Popen hangs when child writes to stderr

2014-06-17 Thread Torsten Landschoff
Torsten Landschoff added the comment: ita1024: please don't post to closed issues; your message here will be ignored. Bugs for Python 2 will be ignored anyway so what can you do? I am currently fighting with the effects of using threads, subprocess.Popen and sqlite in Python2 and found

[issue1336] subprocess.Popen hangs when child writes to stderr

2012-10-25 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1336 ___ ___ Python-bugs-list mailing list

[issue1336] subprocess.Popen hangs when child writes to stderr

2011-10-31 Thread john doe
john doe tnagy1...@gmail.com added the comment: The following piece of code does not seem to be thread-safe: gc.disable() try: os.fork() except: ... If calling subprocess.Popen() is supposed to work from threads without any particular protection, then a lock is needed in

[issue1336] subprocess.Popen hangs when child writes to stderr

2011-10-31 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1336 ___ ___

[issue1336] subprocess.Popen hangs when child writes to stderr

2011-10-31 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: ita1024: please don't post to closed issues; your message here will be ignored. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1336

[issue1336] subprocess.Popen hangs when child writes to stderr

2008-01-21 Thread Guido van Rossum
Guido van Rossum added the comment: Was this a security fix? We aren't supposed to backport non-security fixes to 2.4, and Martin is actually planning to *reverse* the non-security patches applied to 2.4 since 2.4.4 was released, to make it easier to release a pure security source tree.

[issue1336] subprocess.Popen hangs when child writes to stderr

2008-01-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: oh, whoops. not a security issue. should i undo it or let Martin? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1336 __ ___

[issue1336] subprocess.Popen hangs when child writes to stderr

2008-01-21 Thread Guido van Rossum
Guido van Rossum added the comment: Martin can do it all in one fell sweep. -- nosy: +loewis __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1336 __ ___ Python-bugs-list

[issue1336] subprocess.Popen hangs when child writes to stderr

2008-01-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: fixed in trunk r60104. i'm backporting it to 2.5 and 2.4. -- resolution: - fixed versions: +Python 2.5, Python 2.6 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1336 __

[issue1336] subprocess.Popen hangs when child writes to stderr

2008-01-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: r60111 undid part of r60104 that added an unnecessary else and indentation. svn diff -r60103:60111 of Lib/subprocess.py is a nice clean patch. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1336

[issue1336] subprocess.Popen hangs when child writes to stderr

2008-01-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: r60113 in release25-maint, r60114 in release24-maint. -- status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1336 __

[issue1336] subprocess.Popen hangs when child writes to stderr

2008-01-16 Thread Gregory P. Smith
Changes by Gregory P. Smith: -- nosy: +gregory.p.smith __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1336 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1336] subprocess.Popen hangs when child writes to stderr

2008-01-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: The uploaded file appears to be derives from Python 2.4.1 (tags/r241). i've uploaded an actual diff between the two. regardless, Thomas's point about disabling it -before- the fork() is true. Added file:

[issue1336] subprocess.Popen hangs when child writes to stderr

2008-01-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: I've just attached a diff against trunk that I believe fixes this (based off of jba's patch). Unit tests pass but that doesn't say a whole lot given that this is a hard to reproduce timing/scheduling related bug. Would someone please code review it?

[issue1336] subprocess.Popen hangs when child writes to stderr

2007-12-06 Thread Thomas Herve
Thomas Herve added the comment: FWIW, we encountered roughly the same problem in Twisted. However, we fixed it by disabling gc *before* fork, because the gc can occur just after the fork. See http://twistedmatrix.com/trac/ticket/2483 for the bug report, and

[issue1336] subprocess.Popen hangs when child writes to stderr

2007-12-05 Thread Guido van Rossum
Guido van Rossum added the comment: I'm sorry to ask you to do more work, but could you do me a favor and send this in the form of a svn diff? That file has evolved quite a bit and it's unclear what version you used as a baseline. -- keywords: +patch __

[issue1336] subprocess.Popen hangs when child writes to stderr

2007-10-30 Thread Jonathan Amsterdam
Jonathan Amsterdam added the comment: It's an honor to hear from you, BDFL. I'm just a Python user, not a developer, so the time it would take me to check out, compile, test, etc. would dwarf the change itself (removing two lines from file_dealloc). There is another solution, following Java:

[issue1336] subprocess.Popen hangs when child writes to stderr

2007-10-30 Thread Guido van Rossum
Guido van Rossum added the comment: In Python, you can't raise an exception from file_dealloc. (Note how it is a void function -- there's no way to return an error status.) Disabling gc however makes sense. I'll think about that. Since you seem to have the only reproducible occurrence of this

[issue1336] subprocess.Popen hangs when child writes to stderr

2007-10-26 Thread Jonathan Amsterdam
New submission from Jonathan Amsterdam: This is under Linux (2.6). I occasionally see subprocess.Popen() fail to return, and I have finally figured out roughly what's going on. It involves the GC and stderr. 1. os.fork() 2. Parent blocks reading from errpipe_read (subprocess.py:982) 3. In

[issue1336] subprocess.Popen hangs when child writes to stderr

2007-10-26 Thread Guido van Rossum
Guido van Rossum added the comment: I don't think we can prevent GC from occurring between fork and exec -- it's legal to just call os.fork() and execute Python code in the subprocess forever. I think the right solution might be to ignore errors in file_close(). Can you try to whip up a patch