[gst-devel] Question: How do I obtain a better gdb back traceof segmentation faults?

David Parr DParr at inspireworksinc.com
Mon Jan 10 16:49:13 CET 2005


Thank you all for the responses!  I really appreciate it!

I turned out (as Benjamin Otte suggested), that I was debugging ./gst-launch from my build directory instead of ./.libs/lt-gst-launch-0.8.  After I made that change, it came together.  After that change, I also no longer had to continue to specifically list the directories that contain the gst source code as args to gdb.  I assume that the debugging information in the binaries contains references to the absolute source file names.  

The defect is not solved, but maybe this will better help me document the defect (#163159)

RELATED QUESTION: what is the difference between ./.libs/gst-launch-0.8 and ./.libs/lt-gst-launch-0.8 ?

RELATED QUESTION: ("Maciej Katafiasz") how did you know that "backtrace has definitely been stomped on, as can be seen from #..." ? Are there valid ranges for stack frames in linux?  See my #25 from the new trace.  It looks much like the frames you identified in my previous trace.

The following was the back trace from debugging './tools/.libs/lt-gst-launch-0.8' off of my build directory.  The segmentation fault occurred on the second video buffer in the ffmpeg avcodec code within ffcolorspace plugin.  I am not familiar with whats going on here, but my impression is that the media type 'video/x-raw-yuv' (videobox src) is being converted to 'video/x-raw-rgb' (ximagesink sink).  As I assume that this is a common conversion, I would guess (and that's all that it is) that the problem would be in farther upstream in the pipeline (videobox plugin or gstreamer main code).

(gdb) r
Starting program: /home/dparr/gst/gstreamer-0.8.8/tools/.libs/lt-gst-launch-0.8 filesrc location=/home/dparr/media.samples/MOV00053.MPG \! mpegdemux name=demux demux.video_00\! mpeg2dec \! videobox left=-10 right=-10 top=-10 bottom=-10 fill=1 \! ffcolorspace \! ximagesink
[Thread debugging using libthread_db enabled]
[New Thread 1078454208 (LWP 18665)]
RUNNING pipeline ...

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1078454208 (LWP 18665)]
0x4063ade5 in yuv420p_to_rgba32 (dst=0x80a1bf8, src=0x80a1bd8, width=660, height=4)
    at imgconvert_template.h:43
43                  YUV_TO_RGB1_CCIR(cb_ptr[0], cr_ptr[0]);
(gdb) i threads
* 1 Thread 1078454208 (LWP 18665)  0x4063ade5 in yuv420p_to_rgba32 (dst=0x80a1bf8, src=0x80a1bd8, width=660,
    height=4) at imgconvert_template.h:43
(gdb) bt
#0  0x4063ade5 in yuv420p_to_rgba32 (dst=0x80a1bf8, src=0x80a1bd8, width=660, height=4)
    at imgconvert_template.h:43
#1  0x4063ce15 in img_convert (dst=0x80a1bf8, dst_pix_fmt=6, src=0x80a1bd8, src_pix_fmt=0, src_width=660,
    src_height=500) at imgconvert.c:1982
#2  0x4054a6c9 in gst_ffmpegcsp_chain (pad=0x80a16f8, data=0x8064db0) at gstffmpegcolorspace.c:374
#3  0x4005cb97 in gst_pad_call_chain_function (pad=0x80a16f8, data=0x8064db0) at gstpad.c:4430
#4  0x40058e7d in gst_pad_push (pad=0x83b92b8, data=0x8064db0) at gstpad.c:3241
#5  0x4052fef0 in gst_video_box_chain (pad=0x83b8ff8, _data=0x8064e98) at gstvideobox.c:699
#6  0x4005cb97 in gst_pad_call_chain_function (pad=0x83b8ff8, data=0x8064e98) at gstpad.c:4430
#7  0x40058e7d in gst_pad_push (pad=0x83b7a00, data=0x8064e98) at gstpad.c:3241
#8  0x4050f69b in gst_mpeg2dec_chain (pad=0x83b7938, _data=0x8065150) at gstmpeg2dec.c:773
#9  0x4005cb97 in gst_pad_call_chain_function (pad=0x83b7938, data=0x8065150) at gstpad.c:4430
#10 0x40058e7d in gst_pad_push (pad=0x83ab240, data=0x8065150) at gstpad.c:3241
#11 0x404f6f22 in gst_mpeg_demux_send_subbuffer (mpeg_demux=0x83b5c20, outstream=0x80a6bf0,
    buffer=0x80650dc, timestamp=270000000, offset=12, size=19177) at gstmpegdemux.c:928
#12 0x404f6158 in gst_mpeg_demux_parse_packet (mpeg_parse=0x83b5c20, buffer=0x80650dc) at gstmpegdemux.c:763
#13 0x404f1b45 in gst_mpeg_parse_loop (element=0x83b5c20) at gstmpegparse.c:530
#14 0x407eeeca in loop_group_schedule_function (argc=0, argv=0x80a2c98) at gstoptimalscheduler.c:1332
#15 0x407ee703 in schedule_group (group=0x80a2c98) at gstoptimalscheduler.c:1154
#16 0x407ee8a3 in gst_opt_scheduler_schedule_run_queue (osched=0x80a0520, only_group=0x0)
    at gstoptimalscheduler.c:1205
#17 0x407eeaea in schedule_chain (chain=0x80a2c78) at gstoptimalscheduler.c:1258
#18 0x407f2605 in gst_opt_scheduler_iterate (sched=0x80a0520) at gstoptimalscheduler.c:2629
#19 0x40066fd2 in gst_scheduler_iterate (sched=0x80a0520) at gstscheduler.c:738
#20 0x400325cc in gst_bin_iterate_func (bin=0x809ffb0) at gstbin.c:1220
#21 0x4008198d in gst_marshal_BOOLEAN__VOID (closure=0x8059e28, return_value=0xbfffedc0, n_param_values=1,
    param_values=0xbfffef00, invocation_hint=0xbfffede8, marshal_data=0x40032566) at gstmarshal.c:509
#22 0x40282d5d in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
#23 0x08059e28 in ?? ()
#24 0xbfffedc0 in ?? ()
#25 0x00000001 in ?? ()
#26 0xbfffef00 in ?? ()
#27 0xbfffede8 in ?? ()
#28 0x40032566 in gst_bin_restore_thyself (object=0x8057438, self=0x8059d90) at gstbin.c:1204
Previous frame inner to this frame (corrupt stack?)
(gdb)






More information about the gstreamer-devel mailing list