listen.py crashed with SIGSEGV in PyThreadState_New()

Bug #123870 reported by Timo Saloranta
272
Affects Status Importance Assigned to Milestone
Listen
Won't Fix
Unknown
gst0.10-python (Ubuntu)
Fix Released
Medium
Unassigned
pygobject (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: listen

The program crashed when I exited by choosing "Music" and "Quit" from menu.

It doesn't crash every time, though.

ProblemType: Crash
Architecture: i386
CrashCounter: 1
Date: Wed Jul 4 00:46:57 2007
DistroRelease: Ubuntu 7.10
ExecutablePath: /usr/lib/listen/listen.py
InterpreterPath: /usr/bin/python2.5
NonfreeKernelModules: nvidia
Package: listen 0.5-4ubuntu1
PackageArchitecture: i386
ProcCmdline: python -OO /usr/lib/listen/listen.py
ProcCwd: /usr/lib/listen
ProcEnviron:
 LANGUAGE=en_US.UTF-8
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_US.UTF-8
 SHELL=/bin/bash
Signal: 11
SourcePackage: listen
StacktraceTop:
 PyThreadState_New ()
 PyGILState_Ensure ()
 ?? ()
 __pthread_mutex_unlock_usercnt ()
 g_datalist_clear () from /usr/lib/libglib-2.0.so.0
Title: listen.py crashed with SIGSEGV in PyThreadState_New()
Uname: Linux tosalora-home 2.6.22-7-generic #1 SMP Mon Jun 25 17:33:14 GMT 2007 i686 GNU/Linux
UserGroups: adm admin audio cdrom dialout dip floppy lpadmin netdev plugdev powerdev scanner video

Tags: apport-crash
Revision history for this message
Timo Saloranta (timo-saloranta) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

I deleted CoreDump.gz, because the attachment is broken. I suspect something went wrong during upload.

Revision history for this message
Chris Wagner (chris-wagner) wrote :

The stacktrace in #131666 (reported by me) looks very similar to that of this bug report. However, I'll let someone else determine whether these reports are for the same bug; I don't know how significant those similarities are.

Changed in listen:
importance: Undecided → Medium
Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :

To reproduce:

- Open listen
- Exit.

From gdb:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1210197824 (LWP 24525)]
PyThreadState_New (interp=0x0) at ../Python/pystate.c:201
201 ../Python/pystate.c: No such file or directory.
        in ../Python/pystate.c

(gdb) bt
#0 PyThreadState_New (interp=0x0) at ../Python/pystate.c:201
#1 0x080e7772 in PyGILState_Ensure () at ../Python/pystate.c:567
#2 0xb7cc2c2d in ?? () from /var/lib/python-support/python2.5/gtk-2.0/gobject/_gobject.so
#3 0xb7f5ec80 in ?? () from /lib/tls/i686/cmov/libpthread.so.0
#4 0xb7f5e8ac in __pthread_mutex_unlock_usercnt () from /lib/tls/i686/cmov/libpthread.so.0
#5 0xb7baf488 in g_datalist_clear () from /usr/lib/libglib-2.0.so.0
#6 0xb7c6dd40 in ?? () from /usr/lib/libgobject-2.0.so.0
#7 0x084ee030 in ?? ()
#8 0xb676b248 in ?? () from /usr/lib/libgstreamer-0.10.so.0
#9 0xbfede1c8 in ?? ()
#10 0xb66ec35e in ?? () from /usr/lib/libgstreamer-0.10.so.0
#11 0x084ee028 in ?? ()
#12 0x08451a68 in ?? ()
#13 0xbfede1c8 in ?? ()
#14 0xb7bca8c1 in g_free () from /usr/lib/libglib-2.0.so.0
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)

Changed in listen:
status: New → Confirmed
Changed in listen:
status: Unknown → New
Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :

Moving to pygobject.
Increasing importance due to all the packages it's affecting.

From the dups, this is happening in some apps, all of them with a similar backtrace.
In listen's case, it's not very important, since it's upon exit, but in other apps it's happening at startup, which is worse.

Changed in listen:
importance: Medium → High
Changed in pygobject:
status: Confirmed → Triaged
Revision history for this message
Sebastien Bacher (seb128) wrote :

Why do you think that's a pygobject bug? Do you a simple testcase to trigger it?

Changed in pygobject:
status: Triaged → Incomplete
Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :

I'm not sure, since I'm not an expert with gdb, but every crash (including all the duplicates) has a call to gobject before the crash:
#2 0xb7cc2c2d in ?? () from /var/lib/python-support/python2.5/gtk-2.0/gobject/_gobject.so

So I thought that was the cause.

Also, bdmurray told me to move it here.

Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :

And the testcase:

Install listen, and then:

MOZILLA_FIVE_HOME=/usr/lib/firefox LD_LIBRARY_PATH=/usr/lib/firefox gdb python
(gdb) run /usr/lib/listen/listen.py

Then simply close listen, and you'll have the crash.

Changed in pygobject:
importance: High → Medium
status: Incomplete → New
Revision history for this message
bert07 (marien.bert) wrote :

Using Gutsy beta. Quod Libet crashed when adding Internet Radio tags.

Revision history for this message
murmelhunter (d-drehlich) wrote :

using Gutsy Studio release found this crash report today in my crash folder

Revision history for this message
Kjell Braden (afflux) wrote :

This still happens on hardy, with python-gobject 2.14.0-4, and libglib2.0-0 2.14.4-1ubuntu1.

I found out that Py_Finalize calls _PyGILState_Fini which sets the autoInterpreterState to NULL. Libgstreamer is deinitialized after that in the exit call from libc and calls the finalize method of the pygobject, which causes the segfault because python is already deinitialized.

Changed in pygobject:
status: New → Confirmed
Revision history for this message
Kjell Braden (afflux) wrote :

I believe that this is a bug in gst0.10-python, which calls the gst_deinit via "atexit" (the C function, not the python module). Since I'm absolutely clueless about extension modules, somebody else should confirm this ;)

Changed in pygobject:
status: Confirmed → New
Changed in listen:
status: New → Won't Fix
Revision history for this message
Kjell Braden (afflux) wrote :

Fixed with:
gst0.10-python (0.10.9-1) unstable; urgency=low

  * New upstream release, "I've heard a lot of stories in my time":
    + Fixes crash at exit (Closes: #448621).
  * debian/control:
    + Build depend on gstreamer and gst-plugins-base >= 0.10.15 to get
      bindings for the new APIs.
  * debian/rules:
    + Don't call dh_python anymore.

Changed in pygobject:
status: New → Invalid
Changed in gst0.10-python:
importance: Undecided → Medium
status: New → Fix Released
Revision history for this message
Tiede (marcarthur) wrote :

Sorry, I accidently wrote to a duplicate of this bug instead of this one.
I do have a question though: I see there is a fix released. Is it already implemented?
I am un gutsy with the latest updates and the error is still happening.

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.