[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-06 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 89b9e4bf6f1f by Charles-François Natali in branch '2.7': Issue #13070: Fix a crash when a TextIOWrapper caught in a reference cycle http://hg.python.org/cpython/rev/89b9e4bf6f1f --

[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-06 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: The issue doesn't affect Python 2.7? Duh! I was sure the _io module had been introduced in Python 3 (I/O layer rewrite, etc). Yes, it does apply to 2.7. I'll commit the patch later today. --

[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-06 Thread Victor Semionov
Victor Semionov vsemio...@gmail.com added the comment: I did not see any segfaults when I ran my app on 2.7. Please verify that 2.7 is really affected before making changes. -- ___ Python tracker rep...@bugs.python.org

[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Your application does not segfault with 2.7 because buffered files and sockets use a very different implementation. The io module is present in all versions, but only Python3 uses it for all file-like objects. If the unit test

[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-05 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Sorry, forgot about this issue... Updated patch (I'm not really satisfied with the error message, don't hesitate if you can think of a better wording). -- Added file: http://bugs.python.org/file23319/buffered_closed_gc-3.diff

[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The latest patch looks good to me. As for the error message, how about the BufferedRWPair object is being garbage-collected. -- ___ Python tracker rep...@bugs.python.org

[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-05 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset d60c00015f01 by Charles-François Natali in branch '3.2': Issue #13070: Fix a crash when a TextIOWrapper caught in a reference cycle http://hg.python.org/cpython/rev/d60c00015f01 New changeset 7defc1e5d13a by

[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-05 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Committed to 3.2 and default. Victor, thanks for the report! -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-05 Thread Victor Semionov
Victor Semionov vsemio...@gmail.com added the comment: Great, thanks to you too, for fixing it! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13070 ___

[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-05 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The issue doesn't affect Python 2.7? -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13070 ___

[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-04 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Also, is it ok to just return NULL or should the error state also be set? Well, I'm not sure, that why I made you and Amaury noisy :-) AFAICT, this is the only case where _check_closed can encounter a NULL self-writer. Probably. OTOH,

[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-04 Thread Victor Semionov
Victor Semionov vsemio...@gmail.com added the comment: Probably. OTOH, not setting the error state when returning NULL is usually an error (and can result in difficult-to-debug problems), so let's stay on the safe side. Furthermore, I'm not sure about what kind of error would make sense

[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: An unraisable exception warning will be displayed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13070 ___

[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-04 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Probably. OTOH, not setting the error state when returning NULL is usually an error (and can result in difficult-to-debug problems), so let's stay on the safe side. RuntimeError perhaps. OK, I'll update the patch accordingly.

[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-03 Thread Victor Semionov
Victor Semionov vsemio...@gmail.com added the comment: Any plans to fix this in the next release? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13070 ___

[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-01 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Shouldn't the test use self.BufferedRWPair instead of io.BufferedRWPair? Also, is it ok to just return NULL or should the error state also be set? -- ___ Python tracker rep...@bugs.python.org

[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-01 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Shouldn't the test use self.BufferedRWPair instead of io.BufferedRWPair? Yes. Also, is it ok to just return NULL or should the error state also be set? Well, I'm not sure, that why I made you and Amaury noisy :-) AFAICT, this is

[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-01 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: Removed file: http://bugs.python.org/file23279/buffered_closed_gc-1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13070 ___

[issue13070] segmentation fault in pure-python multi-threaded server

2011-09-30 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Confirmed with default. The problem is that the TextIOWrapper gets collected after the underlying BufferedRWPair has been cleared (tp_clear) by the garbage collector: when _PyIOBase_finalize() is called for the TextIOWrapper, it

[issue13070] segmentation fault in pure-python multi-threaded server

2011-09-30 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: With test. -- Added file: http://bugs.python.org/file23278/buffered_closed_gc-1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13070

[issue13070] segmentation fault in pure-python multi-threaded server

2011-09-30 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: Removed file: http://bugs.python.org/file23277/buffered_closed_gc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13070 ___

[issue13070] segmentation fault in pure-python multi-threaded server

2011-09-30 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: Removed file: http://bugs.python.org/file23278/buffered_closed_gc-1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13070 ___

[issue13070] segmentation fault in pure-python multi-threaded server

2011-09-30 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: Added file: http://bugs.python.org/file23279/buffered_closed_gc-1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13070 ___

[issue13070] segmentation fault in pure-python multi-threaded server

2011-09-30 Thread Victor Semionov
Victor Semionov vsemio...@gmail.com added the comment: Thanks Charles-François, I tested your patch with make test and with my program. Both work fine. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13070

[issue13070] segmentation fault in pure-python multi-threaded server

2011-09-29 Thread Victor Semionov
New submission from Victor Semionov vsemio...@gmail.com: Hello, I'm developing a multi-threaded TCP server and have been seeing segmentation faults on 3.2 on Linux and 3.2.2 on Windows. This happens when using only pure-Python libraries, so I believe the problem is in the interpreter. The