Segmentation fault on playback

Bug #247018 reported by Konrad Siek
90
Affects Status Importance Assigned to Milestone
Jokosher
Fix Released
High
Laszlo Pandy

Bug Description

After creating a new project the following sequences caused the application to exit and 'Segmentation fault' to appear in the terminal:

- add instrument, record, play,
- add instrument, record, play, play,
- add instrument, record, play, record, play,
- add instrument, record, add instrument, record, play.

They sometimes go off, and sometimes they don't.

System:
Ubuntu Hardy, Linux kernel 2.6.24-19-generic

Device:
Intel 82801CA-ICH3

Backtrace:
#0 0x080f3ec0 in _PyObject_GC_Resize (op=0x8eda3cc, nitems=4)
    at ../Modules/gcmodule.c:1365
#1 0x08112c68 in PyFrame_New (tstate=0x816b1b8, code=0x861e800,
    globals=0x8643b54, locals=0x0) at ../Objects/frameobject.c:627
#2 0x080c968b in PyEval_EvalFrameEx (f=0x8eded24, throwflag=0)
    at ../Python/ceval.c:3648
#3 0x080cb1f7 in PyEval_EvalCodeEx (co=0x8596d58, globals=0x859157c,
    locals=0x0, args=0x8b7b3a8, argcount=3, kws=0x0, kwcount=0, defs=0x0,
    defcount=0, closure=0x0) at ../Python/ceval.c:2836
#4 0x0811372e in function_call (func=0x86d6764, arg=0x8b7b39c, kw=0x0)
    at ../Objects/funcobject.c:517
#5 0x0805cb97 in PyObject_Call (func=0x8eda3cc, arg=0x8b7b39c, kw=0x0)
    at ../Objects/abstract.c:1861
#6 0x08062bfb in instancemethod_call (func=0x86d6764, arg=0x8b7b39c, kw=0x0)
    at ../Objects/classobject.c:2519
#7 0x0805cb97 in PyObject_Call (func=0x8eda3cc, arg=0x8bd04cc, kw=0x0)
    at ../Objects/abstract.c:1861
#8 0x080c2e9c in PyEval_CallObjectWithKeywords (func=0x8bc8cd4,
    arg=0x8bd04cc, kw=0x0) at ../Python/ceval.c:3442
#9 0x0805d040 in PyObject_CallObject (o=0x8bc8cd4, a=0x8bd04cc)
    at ../Objects/abstract.c:1852
#10 0xb7d23afb in ?? ()
   from /var/lib/python-support/python2.5/gtk-2.0/gobject/_gobject.so
---Type <return> to continue, or q <return> to quit---
#11 0xb7cc6759 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#12 0xb7cdaf8b in ?? () from /usr/lib/libgobject-2.0.so.0
#13 0xb7cdcc1f in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#14 0xb7cdcf69 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#15 0xb6d0c3e7 in gst_bus_async_signal_func (bus=0x8db4860, message=0x8f36b80,
    data=0x0) at gstbus.c:1059
#16 0xb6d0d0bf in gst_bus_source_dispatch (source=0x8de6e60,
    callback=0xb6d0c330 <gst_bus_async_signal_func>, user_data=0x0)
    at gstbus.c:779
#17 0xb7c34dd6 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#18 0xb7c38193 in ?? () from /usr/lib/libglib-2.0.so.0
#19 0xb7c38577 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#20 0xb77a9264 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#21 0xb7b28ee0 in ?? ()
   from /var/lib/python-support/python2.5/gtk-2.0/gtk/_gtk.so
#22 0x080ca5c6 in PyEval_EvalFrameEx (f=0x817757c, throwflag=0)
    at ../Python/ceval.c:3557
#23 0x080cb1f7 in PyEval_EvalCodeEx (co=0xb7dc58d8, globals=0xb7e16acc,
    locals=0xb7e16acc, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0,
    defcount=0, closure=0x0) at ../Python/ceval.c:2836
#24 0x080cb347 in PyEval_EvalCode (co=0xb7dc58d8, globals=0xb7e16acc,
    locals=0xb7e16acc) at ../Python/ceval.c:494
#25 0x080ea818 in PyRun_FileExFlags (fp=0x816b008,
---Type <return> to continue, or q <return> to quit---
    filename=0xbffc671e "/usr/bin/jokosher", start=257, globals=0xb7e16acc,
    locals=0xb7e16acc, closeit=1, flags=0xbffc54b8)
    at ../Python/pythonrun.c:1273
#26 0x080eaab9 in PyRun_SimpleFileExFlags (fp=0x816b008,
    filename=0xbffc671e "/usr/bin/jokosher", closeit=1, flags=0xbffc54b8)
    at ../Python/pythonrun.c:879
#27 0x08059335 in Py_Main (argc=1, argv=0xbffc5584) at ../Modules/main.c:523
#28 0x080587f2 in main (argc=1, argv=0x0) at ../Modules/python.c:23

Revision history for this message
Laszlo Pandy (laszlok) wrote :

This really needs a stacktrace to be useful. Is the bug reproducible every time?

Changed in jokosher:
status: New → Incomplete
Revision history for this message
Konrad Siek (konrad-siek) wrote : Re: [Bug 247018] Re: Segmentation fault on playback

It happens every time (so I can't actually use the program at all).

Can do a stacktrace, if you let me know how to do it exactly...

On Wed, Aug 27, 2008 at 2:21 AM, Laszlo Pandy <email address hidden> wrote:

> This really needs a stacktrace to be useful. Is the bug reproducible
> every time?
>
> ** Changed in: jokosher
> Status: New => Incomplete
>
> --
> Segmentation fault on playback
> https://bugs.launchpad.net/bugs/247018
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Laszlo Pandy (laszlok) wrote :

I am assuming since you are using Hardy that the Python version you have is 2.5. You can check this with:
  python --version

You need to install the Ubuntu package python2.5-dbg. If you are using python 2.4, then install python2.4-dbg.

Here are the other debugging packages required to get a proper stacetrace of jokosher:
libgstreamer0.10-0-dbg
gstreamer0.10-plugins-base-dbg
gstreamer0.10-plugins-good-dbg
gstreamer0.10-plugins-ugly-dbg
gdb

All of those are debugging symbols for Gstreamer, except the last one which is the GNU Debugger.

Now you can run Jokosher in the debugger to try and get a stack trace. Run the following command:
  gdb --args python /usr/bin/jokosher

When you see the (gdb) prompt, enter "run":
(gdb) run
Starting program: /usr/bin/python /usr/bin/jokosher
[Thread debugging using libthread_db enabled]
[New Thread 0xb7d7e6b0 (LWP 17916)]

Program received signal SIGINT, Interrupt.
[Switching to Thread 0xb7d7e6b0 (LWP 17916)]
0xb7f2c410 in __kernel_vsyscall ()
(gdb)

You should see the same thing, except the signal name will be SIGSEGV instead meaning Segmentation Fault.
At this point you are given the (gdb) prompt again, and we will enter the command backtrace:
(gdb) backtrace
#0 0xb7f2c410 in __kernel_vsyscall ()
#1 0xb7e4cbcb in poll () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7bb91c6 in ?? () from /usr/lib/libglib-2.0.so.0
#3 0xb7bb9577 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#4 0xb772a264 in IA__gtk_main ()

Your backtrace will look something like that. If it is too long to fit in the screen you may need to press enter a couple of times to see it all. Copy and paste the section from #0 to the very last line in the terminal into this bug report and I will analyse it.

Revision history for this message
Konrad Siek (konrad-siek) wrote :

Done.

I hope it's useful.

On Wed, Aug 27, 2008 at 3:41 PM, Laszlo Pandy <email address hidden> wrote:

> I am assuming since you are using Hardy that the Python version you have is
> 2.5. You can check this with:
> python --version
>
> You need to install the Ubuntu package python2.5-dbg. If you are using
> python 2.4, then install python2.4-dbg.
>
> Here are the other debugging packages required to get a proper stacetrace
> of jokosher:
> libgstreamer0.10-0-dbg
> gstreamer0.10-plugins-base-dbg
> gstreamer0.10-plugins-good-dbg
> gstreamer0.10-plugins-ugly-dbg
> gdb
>
> All of those are debugging symbols for Gstreamer, except the last one
> which is the GNU Debugger.
>
> Now you can run Jokosher in the debugger to try and get a stack trace. Run
> the following command:
> gdb --args python /usr/bin/jokosher
>
> When you see the (gdb) prompt, enter "run":
> (gdb) run
> Starting program: /usr/bin/python /usr/bin/jokosher
> [Thread debugging using libthread_db enabled]
> [New Thread 0xb7d7e6b0 (LWP 17916)]
>
> Program received signal SIGINT, Interrupt.
> [Switching to Thread 0xb7d7e6b0 (LWP 17916)]
> 0xb7f2c410 in __kernel_vsyscall ()
> (gdb)
>
> You should see the same thing, except the signal name will be SIGSEGV
> instead meaning Segmentation Fault.
> At this point you are given the (gdb) prompt again, and we will enter the
> command backtrace:
> (gdb) backtrace
> #0 0xb7f2c410 in __kernel_vsyscall ()
> #1 0xb7e4cbcb in poll () from /lib/tls/i686/cmov/libc.so.6
> #2 0xb7bb91c6 in ?? () from /usr/lib/libglib-2.0.so.0
> #3 0xb7bb9577 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
> #4 0xb772a264 in IA__gtk_main ()
>
> Your backtrace will look something like that. If it is too long to fit
> in the screen you may need to press enter a couple of times to see it
> all. Copy and paste the section from #0 to the very last line in the
> terminal into this bug report and I will analyse it.
>
> --
> Segmentation fault on playback
> https://bugs.launchpad.net/bugs/247018
> You received this bug notification because you are a direct subscriber
> of the bug.
>

description: updated
Revision history for this message
Laszlo Pandy (laszlok) wrote :

Thanks very much, this is a good stacktrace.
I have seen this error before but not in a long time so I assumed it had been fixed in the newer version of Gstreamer or GTK.
It seems like the memory management in Python is crashing, which suggests that there is a problem with the Gstreamer python bindings.

Changed in jokosher:
assignee: nobody → laszlok2
importance: Undecided → High
status: Incomplete → Confirmed
Revision history for this message
Laszlo Pandy (laszlok) wrote :

I'm fairly certain this was fixed with the threading fix in 0.10. Please let me know if anyone knows otherwise and I will reopen it.

Changed in jokosher:
status: Confirmed → Fix Released
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.