This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rpointel
Recipients neologix, rpointel, vstinner
Date 2011-09-06.18:01:02
SpamBayes Score 7.7987394e-11
Marked as misclassified No
Message-id <1315332063.76.0.155696048659.issue12905@psf.upfronthosting.co.za>
In-reply-to
Content
> 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 
Python 3.2.2 (default, Sep  5 2011, 21:21:34) 
[GCC 4.2.1 20070719 ] on openbsd5
Type "help", "copyright", "credits" or "license" for more information.
>>> import signal, socket
>>> c, s = socket.socketpair()
>>> signal.signal(signal.SIGALRM, lambda x,y: 0)
0
>>> signal.alarm(1)
0
>>> [New process 28830]
c.sendall(b"x" * (1024**2))
^C
Program received signal SIGINT, Interrupt.
Cannot access memory at address 0x98
(gdb) bt
#0  0x000000020125678a in poll () from /usr/lib/libc.so.60.1
#1  0x000000020619b4aa in _thread_kern_poll (wait_reqd=<value optimized out>)
    at /usr/src/lib/libpthread/uthread/uthread_kern.c:780
#2  0x000000020619c3a8 in _thread_kern_sched (scp=0x0)
    at /usr/src/lib/libpthread/uthread/uthread_kern.c:382
#3  0x0000000206190ade in sendto (fd=9, msg=0x2032d6020, len=1044480, flags=0, to=0x0, to_len=0)
    at /usr/src/lib/libpthread/uthread/uthread_sendto.c:63
#4  0x00000002105f670a in sock_sendall ()
   from /usr/ports/pobj/Python-3.2.2/Python-3.2.2/build/lib.openbsd-5.0-amd64-3.2/_socket.so
#5  0x000000020668b172 in PyEval_EvalFrameEx () from /usr/local/lib/libpython3.2m.so.1.0
#6  0x000000020668bf66 in PyEval_EvalCodeEx () from /usr/local/lib/libpython3.2m.so.1.0
#7  0x000000020668c22b in PyEval_EvalCode () from /usr/local/lib/libpython3.2m.so.1.0
#8  0x00000002066a93d7 in run_mod () from /usr/local/lib/libpython3.2m.so.1.0
#9  0x00000002066abcae in PyRun_InteractiveOneFlags () from /usr/local/lib/libpython3.2m.so.1.0
#10 0x00000002066abf3e in PyRun_InteractiveLoopFlags () from /usr/local/lib/libpython3.2m.so.1.0
#11 0x00000002066ac04c in PyRun_AnyFileExFlags () from /usr/local/lib/libpython3.2m.so.1.0
#12 0x00000002066bc9f4 in Py_Main () from /usr/local/lib/libpython3.2m.so.1.0
#13 0x0000000000400e75 in main ()

Thanks for your help,

Remi.
History
Date User Action Args
2011-09-06 18:01:03rpointelsetrecipients: + rpointel, vstinner, neologix
2011-09-06 18:01:03rpointelsetmessageid: <1315332063.76.0.155696048659.issue12905@psf.upfronthosting.co.za>
2011-09-06 18:01:02rpointellinkissue12905 messages
2011-09-06 18:01:02rpointelcreate