[issue25829] Mixing multiprocessing pool and subprocess may create zombie process, and cause program to hang.

2015-12-09 Thread Ami Koren
New submission from Ami Koren: Happens on Linux (Debian), Linux version 3.16.0-4-amd64 . Seems like a multiprocessing issue. When I use both multiprocessing pool and subprocess somewhere in the same python program, sometimes the subprocess become 'zombie', and the parent wait for it forever.

[issue25828] PyCode_Optimize() (peephole optimizer) doesn't handle KeyboardInterrupt correctly

2015-12-09 Thread STINNER Victor
New submission from STINNER Victor: The peephole optimizer computes 2**(2**100), but if I press CTRL+c (the result will probably kills my memory anyway), I get an assertion error (with a Python compiled in debug mode). $ ./python >>> 2**(2**100) ^C python: Python/ceval.c:1218:

[issue25823] Speed-up oparg decoding on little-endian machines

2015-12-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think following patch doesn't introduce undefined behavior. With this patch GCC on 32-bit i386 Linux produces the same code as for simple unsigned short read. I don't know wherever the benefit worth such complication. I don't know wherever the patch can

[issue25823] Speed-up oparg decoding on little-endian machines

2015-12-09 Thread Mark Dickinson
Mark Dickinson added the comment: > I think following patch doesn't introduce undefined behavior. Agreed. As I recall, the memcpy trick is a fairly standard way around this issue, for compilers that are smart enough to compile away the actual memcpy call. > I don't know wherever the patch

[issue25787] Add an explanation what happens with subprocess parent and child processes when signals are sent

2015-12-09 Thread Ian Macartney
Ian Macartney added the comment: I don't have much experience with what should and shouldn't be in the python docs, however I was recently bitten by a subtlety in signal/subprocess that might be worth documenting. Anything written to stdout in a signal handler could end up in the stdout of a

[issue25828] PyCode_Optimize() (peephole optimizer) doesn't handle KeyboardInterrupt correctly

2015-12-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Interpreter Core nosy: +serhiy.storchaka stage: -> needs patch ___ Python tracker ___

[issue25807] test_multiprocessing_fork.test_mymanager fails and hangs

2015-12-09 Thread SilentGhost
SilentGhost added the comment: Hm, after doing "make clean" and rebuilding anew I'm not able to reproduce the bug myself. I guess I just had a stale version of the module still hanging around. Sorry for the mistaken report. -- resolution: -> not a bug stage: -> resolved status: open

[issue25828] PyCode_Optimize() (peephole optimizer) doesn't handle KeyboardInterrupt correctly

2015-12-09 Thread STINNER Victor
STINNER Victor added the comment: FYI. > Peephole optimizer of Python 2.7 (...) only optimizes 2**100, but not > 2**(2**100). This optimizer is dummy, it's only able to replace "LOAD_CONST x; LOAD_CONST y; OPERATION" with the result, whereas the optimizer replaces the bytecode with "NOP;

[issue25787] Add an explanation what happens with subprocess parent and child processes when signals are sent

2015-12-09 Thread Martin Panter
Martin Panter added the comment: I think Karl’s original report was mainly about normal signal handling in the long term in the child, i.e. behaviour after exec() succeeds. Ian, your problem sounds more like a bug or unfortunate quirk of the window between fork() and exec(). Maybe it is

[issue25823] Speed-up oparg decoding on little-endian machines

2015-12-09 Thread Mark Dickinson
Mark Dickinson added the comment: The latest patch still replaces valid C with code that has undefined behaviour. That's not good! Introducing undefined behaviour is something we should avoid without a really good reason. Benchmarks showing dramatic real-world speed improvements from this

[issue25823] Speed-up oparg decoding on little-endian machines

2015-12-09 Thread Mark Dickinson
Mark Dickinson added the comment: Benchmarks would help here: if none of the patches gives a significant real-world speedup, then the whole UB discussion is moot. -- ___ Python tracker

[issue20032] asyncio.Future.set_exception() creates a reference cycle

2015-12-09 Thread Jean-Louis Fuchs
Jean-Louis Fuchs added the comment: Just to let you know I hit this problem in my code, simplified version: https://gist.github.com/ganwell/ce3718e5119c6e7e9b3e Of course it is only a problem because I am a ref-counting stickler. -- nosy: +Jean-Louis Fuchs

[issue25830] _TypeAlias: Discrepancy between docstring and behavior

2015-12-09 Thread flying sheep
New submission from flying sheep: _TypeAlias claims in its docstring that “It can be used in instance and subclass checks”, yet promptly contradicts itself if you try it: “Type aliases cannot be used with isinstance().” it would be useful to either document (and therefore bless) type_impl, or

[issue25825] AIX shared library extension modules installation broken

2015-12-09 Thread David Edelsohn
David Edelsohn added the comment: $(prefix) and $(exec_prefix) result in the same path on AIX, so it does not matter in practice, although the semantics are different. # Install prefix for architecture-dependent files exec_prefix=${prefix} python.exp is not architecture dependent,

[issue25829] Mixing multiprocessing pool and subprocess may create zombie process, and cause program to hang.

2015-12-09 Thread R. David Murray
R. David Murray added the comment: Oh, I think there is a solution, though: don't use fork, use spawn. -- ___ Python tracker ___

[issue25829] Mixing multiprocessing pool and subprocess may create zombie process, and cause program to hang.

2015-12-09 Thread R. David Murray
R. David Murray added the comment: Well, it sounds more like a problem of posix fork semantics. What you need is to prevent workers from being spawned while the subprocess is running, which the multiprocessing API may not support (I'm not that familiar with it), and which might or might not

[issue25828] PyCode_Optimize() (peephole optimizer) doesn't handle KeyboardInterrupt correctly

2015-12-09 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +pitrou ___ Python tracker ___ ___

[issue25831] dbm.gnu leaks file descriptors on .reorganize()

2015-12-09 Thread Isaac Schwabacher
New submission from Isaac Schwabacher: I found because test_dbm_gnu fails on NFS; my initial thought was that the test was failing to close a file somewhere (similarly to #20876), but a little digging suggested that the problem is in dbm.gnu itself: $ ./python Python 3.5.1 (default,

[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-12-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Following patch speeds up ElementTree parsing (the result of the etree parse benchmark is improved by 10%). Actually it restores 2.7 code and avoids creating an empty dict for attributes if not needed. -- stage: -> patch review Added file:

[issue5501] Update multiprocessing docs re: freeze_support

2015-12-09 Thread Camilla Montonen
Camilla Montonen added the comment: Hi everyone! It has been a while since this issue has been updated. The addition requested by Brandon Corfman is a simple clarification of what happens when the freeze_support function from multiprocessing is called on non-Windows platforms (if I understand

[issue25768] compileall functions do not document or test return values

2015-12-09 Thread Nicholas Chammas
Nicholas Chammas added the comment: I've added the tests as we discussed. A couple of comments: * I found it difficult to reuse the existing setUp() code so had to essentially repeat a bunch of very similar code to create "bad" files. Let me know if you think there is a better way to do this.

[issue25831] dbm.gnu leaks file descriptors on .reorganize()

2015-12-09 Thread Isaac Schwabacher
Isaac Schwabacher added the comment: Further searching reveals this as a dupe of #13947. Closing. -- status: open -> closed ___ Python tracker ___

[issue25274] sys.setrecursionlimit() must fail if the current recursion depth is higher than the new low-water mark

2015-12-09 Thread A. Jesse Jiryu Davis
Changes by A. Jesse Jiryu Davis : -- nosy: +emptysquare ___ Python tracker ___ ___

[issue25711] Rewrite zipimport from scratch

2015-12-09 Thread Rose Ames
Rose Ames added the comment: Serhiy, how far along are you on this? I have a wip from this summer that I could finish over the holidays. -- ___ Python tracker

[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

2015-12-09 Thread Swati Jaiswal
Swati Jaiswal added the comment: I want to work on this issue. @lac, can you please help as I searched but couldn't find the related files. Where can I find the code for this? -- nosy: +curioswati ___ Python tracker

[issue23948] Deprecate os.kill() on Windows

2015-12-09 Thread Eryk Sun
Eryk Sun added the comment: The signal module switched to using an enum for signal values: >>> print(*map(repr, sorted(signal.Signals)), sep='\n') We can use the console API when passed the CTRL_C_EVENT or CTRL_BREAK_EVENT enum. It may be

[issue25493] warnings.warn: wrong stacklevel causes import of local file "sys"

2015-12-09 Thread John Mark Vandenberg
John Mark Vandenberg added the comment: It seems like there is already sufficient detection of invalid stack levels in warnings.warn, and one of the code paths does `module = ""` and later another does `filename = module`, so `filename` can be intentionally junk data, which will be passed to

[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-12-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1fe904420c20 by Serhiy Storchaka in branch 'default': Issue #25638: Optimized ElementTree parsing; it is now 10% faster. https://hg.python.org/cpython/rev/1fe904420c20 -- ___ Python tracker