[IPython-dev] Weird KeyboardInterrupts

Fernando Perez fperez.net at gmail.com
Wed May 2 13:29:15 EDT 2007


On 5/2/07, Ville M. Vainio <vivainio at gmail.com> wrote:
> On 5/2/07, Fernando Perez <fperez.net at gmail.com> wrote:
>
> > On 5/2/07, Ville M. Vainio <vivainio at gmail.com> wrote:
> > > I've been getting numerous ipython crash reports that indicate
> > > "KeyboardInterrupt" as the problem, yet the users claim to not have
> > > pressed ctrl+c. Anyone have this happening right now?
> >
> > Can you post one such traceback so we can have a look?
>
> Attached.
>
> It seems to be a part of a "missing readline" exception handling, but
> turns to KeyboardInterrupt.

That's weird... Are all of these reports under Darwin (OSX)?

It's worth noting that the 'readline' mentioned in there is NOT the
keyboard-handling readline library, but rather an argument to the
input tokenization routines.  See the source to tokenize.py in the
stdlib for details; unfortunately they use the name 'readline' in many
places as an argument, which is very confusing.

These crashes are even stranger because they do NOT report using any
of the threaded exception handling at all, so that's not the root
cause of the problem.

All I can think of is that this is happening to someone who mis-built
his or her python.  The tb indicates the user has a hand-built python:

/opt/local/lib/python2.5/tokenize.py

and under OSX GNU readline is NOT available by default.  So it's quite
possible that they have a mis-built Python and we're failing
ungracefully in such circumstances.

Since we provide our own readline under Win32, and Linux pretty much
always has it around, this leaves OSX as a potentially problematic
platform, especially because Apple ships something that *seems* to be
readline but isn't (for BSD/GPL reasons).

In summary, it's possible that this is a problem on the user's end, to
which we are not responding as robustly as we should.  But I'm not
really 100% sure, unfortunately.

What is certain is that it's NOT related to the threading/Ctrl-C
tricks I added recently, since none of the threaded classes are active
in this traceback.

Cheers,


f



More information about the IPython-dev mailing list