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.

classification
Title: another threads+readline+signals nasty
Type: Stage:
Components: Interpreter Core Versions:
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: anthonybaxter Nosy List: anthonybaxter, georg.brandl, mpasternak, mwh, nnorwitz
Priority: high Keywords:

Created on 2004-06-11 15:30 by anthonybaxter, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (12)
msg21149 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2004-06-11 15:30
python -c "import time, readline, thread;
thread.start_new_thread(raw_input, ()); time.sleep(2)"

Segfaults on ^C<return>

Fails on Linux, freebsd.

On linux (FC - using kernel 2.6.1, glibc 2.3.3, gcc-3.3.3)

(gdb) where
#0  0x002627a2 in _dl_sysinfo_int80 () from
/lib/ld-linux.so.2
#1  0x008172b1 in ___newselect_nocancel () from
/lib/tls/libc.so.6
#2  0x0011280b in time_sleep (self=0x0, args=0xb7fe17ac)
    at Modules/timemodule.c:815

on FreeBSD 5.2.1-RC, a different error.

Fatal error 'longjmp()ing between thread contexts is
undefined by POSIX 1003.1' at line 72 in file
/usr/src/lib/libc_r/uthread/uthread_jmp.c (errno = 2)
Abort (core dumped)
msg21150 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2004-06-11 15:38
Logged In: YES 
user_id=6656

Hmm.  Doesn't crash on OS X.  Messes the terminal up good and 
proper, though.
msg21151 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2004-06-11 15:39
Logged In: YES 
user_id=29957

The patch in #960406 doesn't help here.

The FC test system also has readline-4.3, if it helps, as
does the FreeBSD box. It apparently doesn't crash on OSX.

msg21152 - (view) Author: Michal Pasternak (mpasternak) Date: 2004-06-11 15:43
Logged In: YES 
user_id=799039

readline used on FreeBSD was readline-4.3pl5; everything else: gcc 3.3.3, 
ncurses, libc were standard from 5.2.1.
msg21153 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2004-06-21 10:45
Logged In: YES 
user_id=6656

Can you try the patch that's *now* in 960406?  It seems to help 
for me (but I really would rather not think too hard about this!).
msg21154 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2004-08-07 21:41
Logged In: YES 
user_id=6656

Bah, this still segfaults with CVS head.
msg21155 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2005-04-07 09:03
Logged In: YES 
user_id=6656

I think this is fixed now, as in I can't reproduce it with CVS 
HEAD. Not sure why!  I can think of a few fixes that might be responsible.

It still messes the terminal up, though.
msg21156 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2005-10-03 04:12
Logged In: YES 
user_id=33168

I can reproduce with cvs head (gentoo linux/amd64).
msg21157 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2005-10-03 11:13
Logged In: YES 
user_id=6656

I can't, on OS X or debian.  
msg21158 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-08-19 03:09
Logged In: YES 
user_id=33168

This doesn't crash for me any more.  I remember there was
another fix for socket timeouts and Ctrl-C.  Maybe that
fixed this too?  Anthony, can you reproduce this?
msg21159 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-08-19 05:35
Logged In: YES 
user_id=849994

Not reproducable here either (Gentoo x86).
msg21160 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-10-07 23:25
Logged In: YES 
user_id=33168

I'm closing this since it's presumably fixed.
History
Date User Action Args
2022-04-11 14:56:04adminsetgithub: 40385
2004-06-11 15:30:22anthonybaxtercreate