[issue12905] multiple errors in test_socket on OpenBSD

2012-02-28 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12905 ___ ___

[issue12905] multiple errors in test_socket on OpenBSD

2012-02-27 Thread Remi Pointel
Remi Pointel pyt...@xiri.fr added the comment: I think we could close this bug because it's du to the pthread library on OpenBSD and not Python. We are switching to rthreads and I can't reproduce this bug. Thanks for your help and sorry for the delay. --

[issue12905] multiple errors in test_socket on OpenBSD

2012-02-27 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: I think we could close this bug because it's du to the pthread library on OpenBSD and not Python. Indeed. -- resolution: - invalid stage: - committed/rejected type: - behavior ___

[issue12905] multiple errors in test_socket on OpenBSD

2011-10-29 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Rémi, do you want to submit a patch to skip those tests on OpenBSD? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12905 ___

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-09 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: It looks like Python cannot do much to workaround OpenBSD issues. IMO the best fix is just to skip these tests on OpenBSD, until OpenBSD handles correctly signals in programs linked to pthread. The same fix can be used for

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: It looks like Python cannot do much to workaround OpenBSD issues. IMO the best fix is just to skip these tests on OpenBSD, until OpenBSD handles correctly signals in programs linked to pthread. The same fix can be used for #12903.

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-07 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Using SA_RESTART, read() is not interrupted. But if the program is linked to pthread, read() is always interrupted: with sa_flags=0 or sa_flags=SA_RESTART. Ouch... But OpenBSD's pthread implementation has severe limitations/bugs.

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-06 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: I hope that this issue is not related to threads+signals. We got many threads+signals issues on FreeBSD 6. Yep. OpenBSD has a really specific pthread implementation (in user-space, using non-blocking I/O), so it might very well be

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-06 Thread Remi Pointel
Remi Pointel pyt...@xiri.fr added the comment: What happens if you run a code equivalent to test_sendall_interrupted on its own? I mean, if you try something like this: Hi, it blocks too: $ gdb -args ./python [...] (gdb) run Starting program: /usr/ports/pobj/Python-3.2.2/Python-3.2.2/python

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-06 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Hi, it blocks too: Oops, I just realized there was a typo in the sample test. The signal handler should be lambda x,y: 1/0 and not lambda x,y: 0 -- ___ Python tracker

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-06 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I tried the following script on OpenBSD 5 with Python 3.3: --- import signal import sys s = signal.SIGALRM

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-06 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I tried the following script on OpenBSD 5 with Python 3.3: ... Bad news: the script doesn't hang if Python is build without threads. Short C program to test interrupted syscalls: -

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-06 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh, siginterrupt(SIGALRM, 0) doesn't work in a program linked to pthread. Example: #include signal.h #include stdio.h void handler(int signum) { printf(HANDLER!\n); } int main() { int s = SIGALRM; char buffer[1024]; int

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-06 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: The C signal handler is called, but the system call (read in this case) is not interrupted. That's what I thought... Bad news: the script doesn't hang if Python is build without threads. Makes sense. When linked with pthread, all

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-06 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: read() is interrupted after 1 second, it works. Does it still work if you don't a create thread beforehand? Yes, the read() is also interrupted as expected if no thread is created. one difference is that Python uses sigaction

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-05 Thread Remi Pointel
New submission from Remi Pointel pyt...@xiri.fr: Hi, I have few problems in test_socket.py. 1) test_sendall_interrupted blocks on OpenBSD, I must Ctrl+c to interrupt the test. I added a skip to have full regress tests, but I think it's not the proper way. I have run it into gdb, and ctrl+c

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-05 Thread Remi Pointel
Remi Pointel pyt...@xiri.fr added the comment: I add bt output with gdb 7, to have more informations. -- Added file: http://bugs.python.org/file23105/OpenBSD_test_socket_gdb.log ___ Python tracker rep...@bugs.python.org

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-05 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +haypo, neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12905 ___ ___ Python-bugs-list

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-05 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I hope that this issue is not related to threads+signals. We got many threads+signals issues on FreeBSD 6. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12905

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-05 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Issue #12903 is similar to this one. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12905 ___