After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 118151 - Crash in new gst_debug code
Crash in new gst_debug code
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.7.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-07-23 22:55 UTC by Iain
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Suggested patch for gst_debug_logv() (1.19 KB, patch)
2003-07-27 19:21 UTC, David Schleef
none Details | Review

Description Iain 2003-07-23 22:55:36 UTC
Found this crash in with Marlin, but the Marlin code hasn't changed since
before the new GstDebug stuff landed.

Basic scenerio is GstThread hits EOF, Marlin changes the state of this
pipeline to GST_STATE_NULL and this happens.
I had to set MALLOC_CHECK_ to 2 to see the crash, otherwise, the
application continues and eventually gives an X ASync error and dies
shortly afterwards.

(gdb) bt
  • #0 strlen
  • #1 vfprintf
    from /lib/libc.so.6
  • #2 vasprintf
    from /lib/libc.so.6
  • #3 g_vasprintf
    at gprintf.c line 295
  • #4 g_strdup_vprintf
    at gstrfuncs.c line 189
  • #5 gst_debug_logv
    at gstinfo.c line 287
  • #6 gst_debug_log
    at gstinfo.c line 258
  • #7 gst_thread_main_loop
    at gstthread.c line 579
  • #8 g_thread_create_proxy
    at gthread.c line 563
  • #9 pthread_start_thread
    from /lib/libpthread.so.0
  • #10 pthread_start_thread_event
    from /lib/libpthread.so.0

Comment 1 David Schleef 2003-07-23 23:49:38 UTC
The backtrace appears to be inconsistent, possibly indicating prior
corruption.

Does it work with debugging off?

Did you recompile gstreamer, gst-plugins, and marlin from scratch
after the debug update?  (And could you do this again just to check.)

Care to try it with electric fence or valgrind?

Comment 2 Iain 2003-07-24 08:43:24 UTC
How do I turn off debugging?

Everything was recompiled, but I shall try again.

Tried it with EF, but it just sat there for ages. I'll give it another
go too.

Valgrind never works for me...
Comment 3 Iain 2003-07-26 10:55:42 UTC
10 hours of running under EFence and GDB later (yes, it took that long
to load a 500k mp3)...
The crash doesn't occur.

Running without EFence and GDB...occurs.

--------------------------------------------

Recompiled GStreamer with --disable-gst_debug and the crash doesn't
occur. Running like this also shows up how very very badly the new
debugging stuff needs to be profiled, because it is slow.
Comment 4 Benjamin Otte (Company) 2003-07-27 13:13:08 UTC
This was a bug in the threading code, where the GstThread is assumed
to still exist when it not necissarily does anymore while outputting
the debug message.

As for the new debugging being slower than the old: Yes, that's true,
but I prefered a good debugging interface to a fast one. And there are
multiple ways to make it faster: 
- compile it out via the configure switch --disable-gst-debug
- use --gst-disable-debug with your application (saves a
g_strdup_vprintf for every debugging statement)
I did not however notice differences in CPU usage when testing mp3
decoding so I assume that might be a EFence or GDB issue.

I'm closing this now.
Comment 5 David Schleef 2003-07-27 19:21:06 UTC
Created attachment 18651 [details] [review]
Suggested patch for gst_debug_logv()
Comment 6 David Schleef 2003-07-27 19:22:45 UTC
How about changing gst_debug_logv() in the way suggested by the patch?
 It requires adding a function to LogFuncEntry.
Comment 7 Benjamin Otte (Company) 2003-08-03 17:24:32 UTC
Your patch is fine with me. I don't know how important that is though.

I have done some oprofile profiling and optimized the debugging stuff
quite a bit. Iain, you may want to change if his problem is still there.