Bug: Readline getting stuck on Linux and Solaris

Quinn Dunkan quinn at ngwee.ugcs.caltech.edu
Fri Dec 8 14:48:36 EST 2000


On 07 Dec 2000 09:57:23 +0000, Michael Hudson <mwh21 at cam.ac.uk> wrote:
>quinn at lira.ugcs.caltech.edu (Quinn Dunkan) writes:
>
>> Strange.. readline has *never* worked right for me, on IRIX or
>> Linux, on any version of python (1.4, 1.5.2, 2.0), and any version
>> of readline (3.0, 4.0, 4.1), if python is compiled with threads.
>> IRIX (6.4, 6.5, 6.5.2) hangs, Linux (2.0.36, 2.2.12, 2.2.17) exits.

Well, blow me down and pick me up, I just tried python 2.0 on linux (it was
2.0b1 before) and the problem is solved, even with threads.

>Well, I have readline 2.2.1, which may make a difference.  Can you
>supply a stacktrace?
>
>> I just tried your 'while 1: pass' thing, and the behaviour is the same there
>> too.
>
>That really is odd, because readline doesn't have control then and
>should be out of the picture.  Does control-C work as expected here if
>readline isn't enabled, or if you hit it before the first prompt
>appears (this may be tricky).

It's not tricky on an Indy :)  In any case, on the irix machine, I've been
using 2.0-for-real and it still locks.  It apparently works ok if I
hit control C quickly: I get 'import site' failed, presumably because it died
of a KeyboardInterrupt.  However, even a 'while 1: pass' ^C locks.  I got a
backtrace by suspending the locked python, and killng it with a SIGILL to get
a core.
(gdb) bt
#0  0xfa3ab88 in __ioctl () at lio.c:201
#1  0xfa434f0 in ioctl () at nftw.c:184
#2  0x5ffd2a74 in rl_restart_output ()
#3  0x5ffdd0f4 in _rl_clean_up_for_exit ()
#4  0x5ffdd860 in rl_cleanup_after_signal ()
#5  0x5ffdd304 in _rl_erase_entire_line ()

Once again, Irix has no problems if I compile --without-threads (which "fixed"
the linux problem too, so I assumed they were the same bug).  This is Irix
6.5, with gcc 2.8.1 and realine 4.  On Monday I'll try with readline 2 and
see if it's still there.

^C works properly in all instances if readline is disabled (via
'mv readline.so spam', if there's a more graceful way I don't know it).



More information about the Python-list mailing list