[issue13070] segmentation fault in pure-python multi-threaded server
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 http://bugs.python.org/issue13070 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13070] segmentation fault in pure-python multi-threaded server
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13070] segmentation fault in pure-python multi-threaded server
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 here. RuntimeError perhaps. Does that mean that an application will see a Python exception? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13070 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13070] segmentation fault in pure-python multi-threaded server
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13070] segmentation fault in pure-python multi-threaded server
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2771] Test issue
Victor Semionov vsemio...@gmail.com added the comment: Testing. -- nosy: +vsemionov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2771 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2771] Test issue
Victor Semionov vsemio...@gmail.com added the comment: testing -- Added file: http://bugs.python.org/file23266/test.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2771 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2771] Test issue
Victor Semionov vsemio...@gmail.com added the comment: adsfaf -- hgrepos: +78 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2771 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2771] Test issue
Changes by Victor Semionov vsemio...@gmail.com: -- hgrepos: -78 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2771 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13065] test
New submission from Victor Semionov vsemio...@gmail.com: ignore me -- messages: 144647 nosy: vsemionov priority: normal severity: normal status: open title: test ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13065 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13065] test
Changes by Victor Semionov vsemio...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13065 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13066] test
New submission from Victor Semionov vsemio...@gmail.com: ignore me -- components: IO, Interpreter Core messages: 144648 nosy: vsemionov priority: normal severity: normal status: open title: test type: crash versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13066 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13066] test
Changes by Victor Semionov vsemio...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13066 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13067] test
New submission from Victor Semionov vsemio...@gmail.com: ignore me -- components: IO, Interpreter Core files: backtrace messages: 144651 nosy: vsemionov priority: normal severity: normal status: open title: test type: crash versions: Python 3.2 Added file: http://bugs.python.org/file23269/backtrace ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13067 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13067] test
Changes by Victor Semionov vsemio...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13067 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13068] test
New submission from Victor Semionov vsemio...@gmail.com: ignore me -- messages: 144654 nosy: vsemionov priority: normal severity: normal status: open title: test type: crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13068 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13068] test
Changes by Victor Semionov vsemio...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13068 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13070] segmentation fault in pure-python multi-threaded server
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 issue is very easy to reproduce with my code, but I think it is obscure, because I have not been able to reproduce it with a smaller program. Here's what happens. The server accepts TCP connections, and creates a thread for every new connection. When the client sends a request, the server initiates its own TCP connection to a database. If any socket IO operation fails by raising a socket error (e.g. the database is down), those errors are caught by the calling code, and it gracefully terminates the thread. However, when the next client connects and sends a request, even if the server-initiated connections are successfully established, the interpreter crashes a bit later during the processing of the client's request (I think during IO operations). Strangely, this does not occur if the thread recovers and does not terminate after catching an exception (as the case with failed redis connections). Also, I was able to port my program to python 2.7, and it did not crash. To reproduce, you will need pg8000, which is a pure-python dbapi driver. You will need to get my program, wordbase, from the mercurial repository at https://bitbucket.org/vsemionov/wordbase (changeset 31c6554e67ee) and edit src/wordbase/db/pgsql.py. Change import psycopg2 as dbapi to import pg8000.dbapi as dbapi. This is just to ensure that no C-based library is used. Steps to reproduce: 0. Ensure postgres is not running 1. Start wordbase with src/wordbase/wordbase.py -f conf_file. Use the path to the provided sample conf file at src/wordbase/wordbase.conf. By default you'll need to be root, in order to be able to create a log file. 2. Connect a client with telnet localhost 2628 and enter d hello. This should fail with status 420. Reconnect and repeat the same step a couple of times. The interpreter usually crashes after repeating this step. I'm providing the interpreter's backtrace, which is obtained from Python 3.2 on Linux. It is attached in a separate file. If you need any other information, please let me know. Best regards, Victor Semionov -- components: IO, Interpreter Core files: backtrace messages: 144656 nosy: vsemionov priority: normal severity: normal status: open title: segmentation fault in pure-python multi-threaded server type: crash versions: Python 3.2 Added file: http://bugs.python.org/file23270/backtrace ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13070 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com