pylab or not... crashes or not

Salut Eric,

Date: Mon, 01 Dec 2008 20:08:00 +0100
From: Eric Emsellem <emsellem@...419...>
Subject: [Matplotlib-users] pylab or not... crashes or not

- when I start a session with "ipython -pylab" I often get crashes with my
session. When I mean "often", it means really often like once everything 1/2h or
so. A crash means that the command I just sent gets stuck and the only way for
me to get it back is to kill the PID of the ipython process...

[...]

IPython 0.8.1 -- An enhanced Interactive Python.

I would say the pb is actually coming from ipython. I experienced it while using ipython-0.8.1, but I guess it disappeared starting with ipython-0.8.3 (see http://ipython.scipy.org/moin/WhatsNew083: "Multithreaded shells (used e.g. by matplotlib interaction) have been improved, reducing the possibility of corner case deadlocks."). I'm now using 0.8.4 and I don't remember I ever had this pb again.

See you! (and congrats :wink: )

···

--
    .~. Yannick COPIN (o:>* Doctus cum libro
    /V\ Institut de physique nucleaire de Lyon (IN2P3 - France)
   // \\ Tel: (33/0) 472 431 968 AIM: YnCopin ICQ: 236931013
  /( )\ http://snovae.in2p3.fr/ycopin/
   ^`~'^

I am indeed using ipython 0.8.1. Will try to upgrade and see how it goes.
Indeed this looks like the deadlocks people mentioned, within, as Xavier
emphasised, no way to CTRL-C it to kill it.

thanks for the tips
Eric

Yannick Copin wrote:

···

Salut Eric,

Date: Mon, 01 Dec 2008 20:08:00 +0100
From: Eric Emsellem <emsellem@...419...>
Subject: [Matplotlib-users] pylab or not... crashes or not

- when I start a session with "ipython -pylab" I often get crashes
with my
session. When I mean "often", it means really often like once
everything 1/2h or
so. A crash means that the command I just sent gets stuck and the only
way for
me to get it back is to kill the PID of the ipython process...

[...]

IPython 0.8.1 -- An enhanced Interactive Python.

I would say the pb is actually coming from ipython. I experienced it
while using ipython-0.8.1, but I guess it disappeared starting with
ipython-0.8.3 (see http://ipython.scipy.org/moin/WhatsNew083:
"Multithreaded shells (used e.g. by matplotlib interaction) have been
improved, reducing the possibility of corner case deadlocks."). I'm now
using 0.8.4 and I don't remember I ever had this pb again.

See you! (and congrats :wink: )

running the last ipython version now (0.9.1), and it does not help (got stuck
the same way).

The difference now is that ipython provides a message:

Warning: Timeout for mainloop thread exceeded
switching to nonthreaded mode (until mainloop wakes up again)

It seems that ipython developers did catch the issue and made this message to be
delivered so that at least you can go on working with your session. However, I
cannot do anything with matplotlib after that message is given, and I have to
get out of the session and start again if I want to plot something...

This seems therefore linked to matplotlib and not ipython.. Just that now
ipython does not get stuck anymore but provide a message regarding the thread
issue. (Not very useful in this context for me unfortunately)

See the ipython scipy thread in fact :
http://lists.ipython.scipy.org/pipermail/ipython-user/2008-July/005628.html

So as far as I can tell this is a matplotlib bug and noone so far encountering
this problem has a really good idea why it occurs. Indeed the problem occurs
*only* when I launch matplotlib commands (after some time in my ipython session).

Really annoying but as mentioned before, I cannot get a set of commands which
consistenly break the session, so...

Eric

Yannick Copin wrote:

···

I would say the pb is actually coming from ipython. I experienced it
while using ipython-0.8.1, but I guess it disappeared starting with
ipython-0.8.3 (see http://ipython.scipy.org/moin/WhatsNew083:
"Multithreaded shells (used e.g. by matplotlib interaction) have been
improved, reducing the possibility of corner case deadlocks."). I'm now
using 0.8.4 and I don't remember I ever had this pb again.

Since there does not appear to be an easy diagnosis or fix, you may
want to consider switching your backend to the non-threaded tkagg

JDH

···

On Tue, Dec 2, 2008 at 12:09 PM, Eric Emsellem <emsellem@...419...> wrote:

Really annoying but as mentioned before, I cannot get a set of commands which
consistenly break the session, so...