elisa hangs and crashes on Solaris

Bug #345633 reported by yippi
4
Affects Status Importance Assigned to Milestone
Moovida
Invalid
High
Unassigned

Bug Description

Elisa 0.5.32 frequently crashes or hangs on exit. I find that replacing calls to sys.exit() with os._exit() makes this problem go away and makes Elisa exit normally.

I am attaching a patch for elisa and elisa-plugins-bad which make this change. Can this go upstream?

Tags: crash
Revision history for this message
yippi (brian-cameron) wrote :
Revision history for this message
yippi (brian-cameron) wrote :
Revision history for this message
Philippe Normand (philn) wrote : Re: [Bug 345633] [NEW] elisa hangs and crashes on Solaris

sys.exit() is supposed to be *the* portable way to do the thing, and it
works on all platforms except Solaris, it seems. Could that be a bug in
your python package?

Le jeudi 19 mars 2009 à 21:50 +0000, yippi a écrit :
> Public bug reported:
>
>
> Elisa 0.5.32 frequently crashes or hangs on exit. I find that replacing calls to sys.exit() with os._exit() makes this problem go away and makes Elisa exit normally.
>
> I am attaching a patch for elisa and elisa-plugins-bad which make this
> change. Can this go upstream?
>
> ** Affects: elisa
> Importance: Undecided
> Status: New
>

Revision history for this message
yippi (brian-cameron) wrote :

Doing a Google search, it does seem that os._exit() is reported to work better with multithreaded programs. For example:

http://mail.python.org/pipermail/python-list/2005-July/333642.html
http://code.djangoproject.com/ticket/6175

Revision history for this message
Philippe Normand (philn) wrote : Re: [Bug 345633] Re: elisa hangs and crashes on Solaris

http://docs.python.org/library/os.html#os._exit

So it makes sense to use os._exit() only for forked process, which I
guess concerns only the gst_metadata thing.

Brian, can you try to only change this file and see if it works?

elisa-plugins-bad-0.5.32/elisa/plugins/amp/slave.py

Le vendredi 20 mars 2009 à 18:05 +0000, yippi a écrit :
> Doing a Google search, it does seem that os._exit() is reported to work better with multithreaded programs. For example:
>
> http://mail.python.org/pipermail/python-list/2005-July/333642.html
> http://code.djangoproject.com/ticket/6175
>

Revision history for this message
yippi (brian-cameron) wrote :

Yes, I do notice that only making the change to slave.py does improve elisa so it does not crash as frequently on exit. Could the change for just the amp slave.py file go upstream?

I agree with your analysis that the other points do not need the change. I was a bit too enthusiastic with my first patch, I think.

However, I am also still experiencing some crashes when exiting elisa, which I believe are due to this bug in libpigment:

  https://code.fluendo.com/pigment/trac/ticket/308

Olivier Tilloy (osomon)
Changed in elisa:
importance: Undecided → High
status: New → Triaged
Revision history for this message
yippi (brian-cameron) wrote :

I reported the above bug for elisa 0.5.32. Elisa had problems with crashing on Solaris until 0.5.35. Then elisa
seemed to work much better. It also worked well with 0.5.36. However, now using elisa 0.5.37 it is hanging on exit again. I don't see any messages echoed to the terminal, nor any /tmp/elisa*txt files to indicate what the problem might be.

I notice if I build elisa and elisa-plugins-good 0.5.37 with elisa-plugins-bad 0.5.36 that it doesn't crash, if that is helpful.

I think the os._exit() discussion above is a red herring. I don't notice that it affects whether elisa crashes or not.

Revision history for this message
Philippe Normand (philn) wrote :

But would changing the amp slave code like you suggested be a good improvement or not?

Revision history for this message
yippi (brian-cameron) wrote :

I think it would be good to change the amp code to use os._exit. Based on the reading I've done, it's good to use in forked processes.

However, it doesn't really resolve the hanging/crashing issues on exit that seem to come and go in Elisa, and which exists in the new 0.5.37 version. If there is any testing I can do to help track down the hanging/crashing problem, let me know.

Revision history for this message
yippi (brian-cameron) wrote :

I just noticed that os._exit requires that the argument is an integer, so this version of the patch works better.

Revision history for this message
yippi (brian-cameron) wrote :

I just noticed that os._exit requires that the argument is an integer, so this version of the patch works better.

Revision history for this message
yippi (brian-cameron) wrote :

I was hoping that the fact that pigment bug #308 is fixed would improve the situation with elisa crashing/hanging on Solaris. I just built and installed pigment and pigment-python from SVN head and it doesn't seem to help much. Elisa 0.5.37 seems to crash about 3-out-of-4 times when I exit it.

https://code.fluendo.com/pigment/trac/ticket/308

It crashes with the attached stack trace. I notice that thread #3 seems to typically be in pgm_context_remove_tasks_with_data when it crashes.

Revision history for this message
yippi (brian-cameron) wrote :

Sometimes I also see this stack trace, which is a little different. Crashing in pgm_gl_viewport_flush_update.

Revision history for this message
yippi (brian-cameron) wrote :

I'm not sure why, but reverting the elisa-plugins-bad 0.5.37 elisa/plugins/pigment/pigment_frontend.py file so it is the same as the 0.5.36 version fixes this issue and makes elisa exit without crashing or hanging anymore. I've attached a patch that reverts this file back to the 0.5.36 version, which we are now using in our Solaris builds.

So, we are applying this patch and the previous patch to change sys.exit to os._exit in elisa/plugins/amp/slave.py on Solaris.

Revision history for this message
Philippe Normand (philn) wrote :

reverting back to an old version of the pigment_frontend.py is not very
nice. Those modifications were made on purpose because they trigger the
correct cleanup of the amp_master, which in your case, somehow triggers
crashes.

Le mercredi 06 mai 2009 à 04:21 +0000, yippi a écrit :
> I'm not sure why, but reverting the elisa-plugins-bad 0.5.37 elisa/plugins/pigment/pigment_frontend.py file so it is the same as the 0.5.36 version fixes this issue and makes elisa exit without crashing or hanging anymore. I've attached a patch that reverts this file back to the 0.5.36 version, which we are now using in our Solaris builds.
>
> So, we are applying this patch and the previous patch to change sys.exit
> to os._exit in elisa/plugins/amp/slave.py on Solaris.
>
>
> ** Attachment added: "patch fixing issue"
> http://launchpadlibrarian.net/26379852/elisa-plugins-bad-05-pigment-frontend.diff
>

Revision history for this message
Loïc Molinari (loic.molinari) wrote :

The recent patches in Pigment SVN TRUNK fixed crashes at viewport disposition. I just noticed that now if the viewport is not disposed before calling pgm_main_quit(), it makes the application crash, I think that's what's happening here. I'll try to investigate further on the Pigment side.

Olivier Tilloy (osomon)
tags: added: crash
Revision history for this message
dino99 (9d9) wrote :

The latest free moovida 1.09 does not get any maintenance since a while. Now moovidadb.com is supporting Linux and support can be found at : http://www.fluendo.com/faq/

Changed in moovida:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.