Changes by Charles-François Natali neolo...@free.fr:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12905
___
___
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.
--
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
___
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
___
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
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.
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.
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
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
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
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
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:
-
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
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
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
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
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
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +haypo, neologix
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12905
___
___
Python-bugs-list
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
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
___
20 matches
Mail list logo