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 304136 - Crash when trying to play a dv file after query for length from iterating pipeline. MPG files work fine.
Crash when trying to play a dv file after query for length from iterating pip...
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.8.x
Other All
: Normal critical
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-05-14 00:59 UTC by Rob Hare
Modified: 2006-01-16 10:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
valgrind log (351.20 KB, text/plain)
2005-06-04 21:01 UTC, Rob Hare
Details

Description Rob Hare 2005-05-14 00:59:53 UTC
Steps to reproduce:
1. Hacked version of kiss kde video player demonstrates problem.
http://www.nocturnalatl.com/gstreamer.html

2. Query the length on a dv file using pipeline. filesrc ! decodebin ! fakesink.
unref the pipeline. then try to play the same file in a thread.

3. 


Stack trace:
  • #0 __pthread_sigsuspend
    from /lib/libpthread.so.0
  • #1 __pthread_wait_for_restart_signal
    from /lib/libpthread.so.0
  • #2 pthread_cond_wait
    from /lib/libpthread.so.0
  • #3 gst_queue_get_type
    from /usr/lib/./libgstreamer-0.8.so.1
  • #4 gst_pad_call_get_function
    from /usr/lib/./libgstreamer-0.8.so.1
  • #5 ??
    from /usr/lib/gstreamer-0.8/libgstoptscheduler.so
  • #6 ??
  • #7 ??
  • #8 ??
    from /usr/lib/gstreamer-0.8/libgstoptscheduler.so
  • #9 ??
  • #10 ??
  • #11 ??
  • #12 ??
  • #13 ??
    from /usr/lib/gstreamer-0.8/libgstoptscheduler.so
  • #14 ??
  • #15 ??
  • #16 ??
  • #17 ??
    from /usr/lib/gstreamer-0.8/libgstoptscheduler.so


Other information:
I previously sent an email to the mailing list and received help. Thank you.
After some changes in my application I thought I had fixed the problem. Once I
reinstated the file length query, dv files started crashing again but mpg files
using the same threaded pipeline are playing fine. I was able to re-create the
problem in a quick hack of the kiss kde video player. note: restart the player
between every test because of my bad hack job. :)
Comment 1 Ronald Bultje 2005-05-18 10:20:34 UTC
I don't see a crash. Can you please install gst-plugins debug symbols, and
provei a full backtrace for all threads (thread apply all bt)? Also see
http://live.gnome.org/GettingTraces.
Comment 2 Rob Hare 2005-05-19 03:19:01 UTC
I installed the gst-plugin symbols. Here's another backtrace. I previously
forgot to mention the crash happens randomly.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16386 (LWP 25876)]
0x400636f2 in gst_structure_free (structure=0x809f6d0) at gststructure.c:224
224       for (i = 0; i < structure->fields->len; i++) {
Current language:  auto; currently c
(gdb) thread apply all bt

Thread 5 (Thread 49156 (LWP 25878))

  • #0 __pthread_sigsuspend
    from /lib/libpthread.so.0
  • #1 __pthread_wait_for_restart_signal
    from /lib/libpthread.so.0
  • #2 pthread_cond_wait
    from /lib/libpthread.so.0
  • #3 gst_queue_get
    at gstqueue.c line 852
  • #4 gst_pad_call_get_function
    at gstpad.c line 4562
  • #5 get_group_schedule_function
    at gstoptimalscheduler.c line 1409
  • #6 schedule_group
    at gstoptimalscheduler.c line 1222
  • #7 gst_opt_scheduler_schedule_run_queue
    at gstoptimalscheduler.c line 1274
  • #8 schedule_chain
    at gstoptimalscheduler.c line 1331
  • #9 gst_opt_scheduler_iterate
    at gstoptimalscheduler.c line 2790
  • #10 gst_scheduler_iterate
    at gstscheduler.c line 744
  • #11 gst_bin_iterate_func
    at gstbin.c line 1281
  • #12 gst_marshal_BOOLEAN__VOID
    at gstmarshal.c line 509
  • #13 g_cclosure_new_swap
    from /usr/lib/./libgobject-2.0.so.0
  • #14 g_closure_invoke
    from /usr/lib/./libgobject-2.0.so.0
  • #15 g_signal_emit_by_name
    from /usr/lib/./libgobject-2.0.so.0
  • #16 g_signal_emit_valist
    from /usr/lib/./libgobject-2.0.so.0
  • #17 g_signal_emit
    from /usr/lib/./libgobject-2.0.so.0
  • #18 gst_bin_iterate
    at gstbin.c line 1341
  • #19 gst_thread_main_loop
    at gstthread.c line 675
  • #20 g_static_private_free
    from /usr/lib/./libglib-2.0.so.0
  • #21 pthread_start_thread
    from /lib/libpthread.so.0
  • #22 pthread_start_thread_event
    from /lib/libpthread.so.0
  • #23 clone
    from /lib/libc.so.6

Thread 4 (Thread 32771 (LWP 25877))

  • #0 nanosleep
    from /lib/libpthread.so.0
  • #1 ??
  • #2 g_usleep
    from /usr/lib/./libglib-2.0.so.0
  • #3 gst_bin_iterate_func
    at gstbin.c line 1300
  • #4 gst_marshal_BOOLEAN__VOID
    at gstmarshal.c line 509
  • #5 g_cclosure_new_swap
    from /usr/lib/./libgobject-2.0.so.0
  • #6 g_closure_invoke
    from /usr/lib/./libgobject-2.0.so.0
  • #7 g_signal_emit_by_name
    from /usr/lib/./libgobject-2.0.so.0
  • #8 g_signal_emit_valist
    from /usr/lib/./libgobject-2.0.so.0
  • #9 g_signal_emit
    from /usr/lib/./libgobject-2.0.so.0
  • #10 gst_bin_iterate
    at gstbin.c line 1341
  • #11 gst_thread_main_loop
    at gstthread.c line 675
  • #12 g_static_private_free
    from /usr/lib/./libglib-2.0.so.0
  • #13 pthread_start_thread
    from /lib/libpthread.so.0
  • #14 pthread_start_thread_event
    from /lib/libpthread.so.0
  • #15 clone
    from /lib/libc.so.6

Thread 3 (Thread 16386 (LWP 25876))

  • #0 gst_structure_free
    at gststructure.c line 224
  • #1 gst_caps_free
    at gstcaps.c line 233
  • #2 gst_pad_link_free
    at gstpad.c line 1135
  • #3 gst_pad_link_try
    at gstpad.c line 1437
  • #4 gst_dvdec_loop
    at gstdvdec.c line 1056
  • #5 loop_group_schedule_function
    at gstoptimalscheduler.c line 1451
  • #6 schedule_group
    at gstoptimalscheduler.c line 1222
  • #7 gst_opt_scheduler_schedule_run_queue
    at gstoptimalscheduler.c line 1274
  • #8 schedule_chain
    at gstoptimalscheduler.c line 1331
  • #9 gst_opt_scheduler_iterate
    at gstoptimalscheduler.c line 2790
  • #10 gst_scheduler_iterate
    at gstscheduler.c line 744
  • #11 gst_bin_iterate_func
    at gstbin.c line 1281
  • #12 gst_marshal_BOOLEAN__VOID
    at gstmarshal.c line 509
  • #13 g_cclosure_new_swap
    from /usr/lib/./libgobject-2.0.so.0
  • #14 g_closure_invoke
    from /usr/lib/./libgobject-2.0.so.0
  • #15 g_signal_emit_by_name
    from /usr/lib/./libgobject-2.0.so.0
  • #16 g_signal_emit_valist
    from /usr/lib/./libgobject-2.0.so.0
  • #17 g_signal_emit
    from /usr/lib/./libgobject-2.0.so.0
  • #18 gst_bin_iterate
    at gstbin.c line 1341
  • #19 gst_thread_main_loop
    at gstthread.c line 675
  • #20 g_static_private_free
    from /usr/lib/./libglib-2.0.so.0
  • #21 pthread_start_thread
    from /lib/libpthread.so.0
  • #22 pthread_start_thread_event
    from /lib/libpthread.so.0
  • #23 clone
    from /lib/libc.so.6

Comment 3 Ronald Bultje 2005-05-19 09:11:50 UTC
Thank you; the problem is thread 3 frame 4. Can you please run this under
valgrind (--tool=memcheck) and see if there's any related errors? It should give
an error about accessing an already free'ed variable. I'd like to know when it
was free'ed (but attaching the whole log is ok, too).
Comment 4 Rob Hare 2005-05-19 16:09:57 UTC
Hope this helps. Valgrind spewed a lot of errors but they appeared to be
basically the same. So, I grabbed thread 3 and added the summary.

==26440== Thread 3:
==26440== Invalid write of size 4
==26440==    at 0x1E71F59D: _dv_bitstream_new_buffer (in /usr/lib/libdv.so.4.0.0)
==26440==    by 0x1E71AACC: dv_decode_full_frame (in /usr/lib/libdv.so.4.0.0)
==26440==    by 0x1E7121C9: gst_dvdec_loop (gstdvdec.c:1078)
==26440==    by 0x1DCC51F7: loop_group_schedule_function
(gstoptimalscheduler.c:1451)
==26440==    by 0x1DCC4792: schedule_group (gstoptimalscheduler.c:1222)
==26440==    by 0x1DCC4A68: gst_opt_scheduler_schedule_run_queue
(gstoptimalscheduler.c:1274)
==26440==    by 0x1DCC4BCA: schedule_chain (gstoptimalscheduler.c:1331)
==26440==    by 0x1DCC8623: gst_opt_scheduler_iterate (gstoptimalscheduler.c:2790)
==26440==    by 0x1B953CE2: gst_scheduler_iterate (gstscheduler.c:744)
==26440==    by 0x1B92B2C5: gst_bin_iterate_func (gstbin.c:1281)
==26440==    by 0x1B9678BA: gst_marshal_BOOLEAN__VOID (gstmarshal.c:509)
==26440==    by 0x1BA3AEC8: (within /usr/lib/libgobject-2.0.so.0.600.3)
==26440==  Address 0x1DA2AFD4 is 12 bytes inside a block of size 36 free'd
==26440==    at 0x1B9047ED: free (vg_replace_malloc.c:152)
==26440==    by 0x1E71A460: dv_decoder_free (in /usr/lib/libdv.so.4.0.0)
==26440==    by 0x1E7127CC: gst_dvdec_change_state (gstdvdec.c:1129)
==26440==    by 0x1B9365C5: gst_element_set_state_func (gstelement.c:2853)
==26440==    by 0x1B936304: gst_element_set_state (gstelement.c:2796)
==26440==    by 0x1B92A084: set_kid_state_func (gstbin.c:841)
==26440==    by 0x1B929FCB: gst_bin_foreach (gstbin.c:805)
==26440==    by 0x1B92A376: gst_bin_change_state (gstbin.c:903)
==26440==    by 0x1DA76E90: gst_decode_bin_change_state (gstdecodebin.c:930)
==26440==    by 0x1B9365C5: gst_element_set_state_func (gstelement.c:2853)
==26440==    by 0x1B92A56E: gst_bin_set_state (gstbin.c:953)
==26440==    by 0x1B936304: gst_element_set_state (gstelement.c:2796)


==26440== More than 30000 total errors detected.  I'm not reporting any more.
==26440== Final error counts will be inaccurate.  Go fix your program!
==26440== Rerun with --error-limit=no to disable this cutoff.  Note
==26440== that errors may occur in your program without prior warning from
==26440== Valgrind, because errors are no longer being displayed.
==26440==
==26438==
==26438== ERROR SUMMARY: 30000 errors from 198 contexts (suppressed: 223 from 9)
==26438== malloc/free: in use at exit: 1487530 bytes in 25117 blocks.
==26438== malloc/free: 234517 allocs, 209400 frees, 45438063 bytes allocated.
==26438== For counts of detected errors, rerun with: -v
==26438== searching for pointers to 25117 not-freed blocks.
==26438== checked 5533480 bytes.
==26438==
==26438== LEAK SUMMARY:
==26438==    definitely lost: 25881 bytes in 82 blocks.
==26438==      possibly lost: 1040 bytes in 26 blocks.
==26438==    still reachable: 1460609 bytes in 25009 blocks.
==26438==         suppressed: 0 bytes in 0 blocks.
Comment 5 Rob Hare 2005-06-04 18:45:23 UTC
Do you still need more info on this? I can attach the whole log. It doesn't
really crash when run with valgrind so the info you need may be missing. Any idea's?
Comment 6 Ronald Bultje 2005-06-04 20:41:26 UTC
I'll need the full log.
Comment 7 Rob Hare 2005-06-04 21:01:01 UTC
Created attachment 47242 [details]
valgrind log

Here's the whole log. This one actually captured a crash. thanks.
Comment 8 Ronald Bultje 2005-06-04 23:41:35 UTC
Seems like a libdv bug or so, it access memory that really no longer exists, and
I don't think we even provide it that memory, we release any references to it in
_change_state(). Maybe Wim knows more?
Comment 9 Andy Wingo 2006-01-13 16:29:27 UTC
Is libdv keeping any global state or something? I'd be surprised if the problem was there. Lots of folks use dv pipelines. I am inclined to close this as obsolete; dv scrubbing works fine in 0.10. Rob do you have any opinion about that?
Comment 10 Rob Hare 2006-01-13 22:58:29 UTC
I would agree that it is obsolete at this time.

thanks.
Comment 11 Andy Wingo 2006-01-16 10:11:09 UTC
Cheers. Do let us know of problems in 0.10.