[IPython-user] Segmentation fault with -pylab

Fernando.Perez at colorado.edu Fernando.Perez at colorado.edu
Thu Oct 28 15:57:52 CDT 2004

Quoting Francesc Alted <falted at pytables.org>:

> > KeyboardInterrupt
> >
> > 1 >>> [CTRL-D]
> >
> > Segmentation fault
> Well, the same here. The problem is that after the first ctrl-C, you cannot
> issue any other command in ipython: it remains blocked.
> > I see this with the GTKAgg and WXAgg but not the TkAgg backend --
> > the former two require threading and the latter does not.  No more
> > insights right now....

I can also confirm the problem.  However, here's an interesting tidbit: running
it under gdb (with WXAgg) I get the following:

In [1]:
Program received signal SIGINT, Interrupt.
[Switching to Thread 1073587520 (LWP 1569)]
0x0032fc32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb) bt
#0  0x0032fc32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x001e36f7 in poll () from /lib/tls/libc.so.6
#2  0x02dcb8db in wxapp_poll_func () from
#3  0x00456e46 in g_main_loop_get_context () from /usr/lib/libglib-2.0.so.0
#4  0x00456276 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#5  0x004569cf in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#6  0x0512c44f in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#7  0x08371610 in ?? ()
#8  0x000001d4 in ?? ()
#9  0x010085e0 in ?? () from /usr/lib/python2.2/site-packages/wxPython/wxc.so
(gdb) c
In [1]: 99+1
Out[1]: 100

I suspect that the fact that gdb traps the SIGINT is what allows the program to
continue happily.  So I suspect what I need to do is install a signal handler
into  the threading code.  If someone has a stab at this, great (it doesn't
seem too hard).  Otherwise it will have to wait until next week at the
earliest, as I am currently at a workshop and will be traveling for a few days
with no computer access.



More information about the IPython-user mailing list