Segfault in GStreamer application

Steve Cookson it at sca-uk.com
Tue Nov 18 16:39:48 PST 2014


Hi Guys,

I'm getting a segfault in gstreamer0.10 that is really defying my 
attempts to fix it.

The pipeline looks like this:

     // v4l2src device=/dev/video1 queue-size=1 always-copy=0 ! \
     // videoscale  ! ffmpegcolorspace ! videobalance brightness=.3 
contrast=.8 ! gamma gamma=.5  ! tee name=t1 \
     // t1. ! queue ! xvimagesink sync=false \
     // t1. ! queue ! videorate ! video/x-raw-yuv,framerate=30001/1001 ! 
theoraenc quality=63 keyframe-force=1 ! \
     // oggmux ! filesink location=video.ogg

If I put it through valgrind with gst-launch it looks fine.

The dmesg output is:

[  182.899761] monitorQueue:sr[2818]: segfault at 5c ip 00007fc801cd0e41 
sp 00007fc7da2797e0 error 4 in libperl.so.5.18.2[7fc801c82000+180000]

(where monitorQueue is the element name of the first queue which links 
to xvimagesink).

Valgrind output follows.

Could anyone give me some pointers about how to debug this.

Regards,

Steve.

Create Pipeline method starts.
==3801== Syscall param ioctl(generic) points to uninitialised byte(s)
==3801==    at 0x52B5399: syscall (syscall.S:38)
==3801==    by 0x26A1F2EF: ??? (in 
/usr/lib/x86_64-linux-gnu/libv4lconvert.so.0.0.0)
==3801==    by 0x26A356F5: ??? (in 
/usr/lib/x86_64-linux-gnu/libv4lconvert.so.0.0.0)
==3801==    by 0x26A1FADD: v4lconvert_create_with_dev_ops (in 
/usr/lib/x86_64-linux-gnu/libv4lconvert.so.0.0.0)
==3801==    by 0x26385525: v4l2_fd_open (in 
/usr/lib/x86_64-linux-gnu/libv4l2.so.0.0.0)
==3801==    by 0x258D6716: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x258CD40F: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x258D31ED: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x14937C71: gst_element_change_state (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x149382E2: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x149260B1: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x14937C71: gst_element_change_state (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==  Address 0xffeffbbf4 is on thread 1's stack
==3801==
==3801== Syscall param ioctl(generic) points to uninitialised byte(s)
==3801==    at 0x52B5399: syscall (syscall.S:38)
==3801==    by 0x26A1F2EF: ??? (in 
/usr/lib/x86_64-linux-gnu/libv4lconvert.so.0.0.0)
==3801==    by 0x26A34EA5: ??? (in 
/usr/lib/x86_64-linux-gnu/libv4lconvert.so.0.0.0)
==3801==    by 0x26A1FADD: v4lconvert_create_with_dev_ops (in 
/usr/lib/x86_64-linux-gnu/libv4lconvert.so.0.0.0)
==3801==    by 0x26385525: v4l2_fd_open (in 
/usr/lib/x86_64-linux-gnu/libv4l2.so.0.0.0)
==3801==    by 0x258D6716: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x258CD40F: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x258D31ED: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x14937C71: gst_element_change_state (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x149382E2: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x149260B1: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x14937C71: gst_element_change_state (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==  Address 0xffeffc04c is on thread 1's stack
==3801==
Enter SyncStateChange.
Exit SyncStateChange.
Playbin set.
Control created.
Enter SyncStateChange.
==3801== Syscall param ioctl(generic) points to uninitialised byte(s)
==3801==    at 0x52B5399: syscall (syscall.S:38)
==3801==    by 0x26A1F2EF: ??? (in 
/usr/lib/x86_64-linux-gnu/libv4lconvert.so.0.0.0)
==3801==    by 0x263866A6: v4l2_ioctl (in 
/usr/lib/x86_64-linux-gnu/libv4l2.so.0.0.0)
==3801==    by 0x258D7F98: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x258D5971: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x258CD4E5: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x258D31ED: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x14937C71: gst_element_change_state (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x149382E2: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x149260B1: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x14937C71: gst_element_change_state (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x149382E2: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==  Address 0xffeffcf14 is on thread 1's stack
==3801==
==3801== Syscall param ioctl(generic) points to uninitialised byte(s)
==3801==    at 0x52B5399: syscall (syscall.S:38)
==3801==    by 0x26A1F2EF: ??? (in 
/usr/lib/x86_64-linux-gnu/libv4lconvert.so.0.0.0)
==3801==    by 0x263866A6: v4l2_ioctl (in 
/usr/lib/x86_64-linux-gnu/libv4l2.so.0.0.0)
==3801==    by 0x258D8DB9: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x258D5831: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x258CD50C: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x258D31ED: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x14937C71: gst_element_change_state (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x149382E2: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x149260B1: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x14937C71: gst_element_change_state (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x149382E2: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==  Address 0xffeffcf14 is on thread 1's stack
==3801==
==3801== Conditional jump or move depends on uninitialised value(s)
==3801==    at 0x26385FB5: v4l2_ioctl (in 
/usr/lib/x86_64-linux-gnu/libv4l2.so.0.0.0)
==3801==    by 0x258CB9F8: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x258CE96B: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x258D30B3: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x25B0A5B5: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0.30.0)
==3801==    by 0x14949005: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x1494C77C: gst_pad_get_caps_reffed (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x1494C8D8: gst_pad_get_caps (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x258D1E6C: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x25B0BAAD: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0.30.0)
==3801==    by 0x25B0CD37: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0.30.0)
==3801==    by 0x149512C7: gst_pad_activate_push (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==
==3801== Syscall param ioctl(generic) points to uninitialised byte(s)
==3801==    at 0x52B5399: syscall (syscall.S:38)
==3801==    by 0x26A1F2EF: ??? (in 
/usr/lib/x86_64-linux-gnu/libv4lconvert.so.0.0.0)
==3801==    by 0x26385F33: v4l2_ioctl (in 
/usr/lib/x86_64-linux-gnu/libv4l2.so.0.0.0)
==3801==    by 0x258CB9F8: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x258CE96B: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x258D30B3: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x25B0A5B5: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0.30.0)
==3801==    by 0x14949005: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x1494C77C: gst_pad_get_caps_reffed (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x1494C8D8: gst_pad_get_caps (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x258D1E6C: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x25B0BAAD: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0.30.0)
==3801==  Address 0xffeffc9a0 is on thread 1's stack
==3801==
==3801== Conditional jump or move depends on uninitialised value(s)
==3801==    at 0x26385FB5: v4l2_ioctl (in 
/usr/lib/x86_64-linux-gnu/libv4l2.so.0.0.0)
==3801==    by 0x258CB9F8: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x258CE9EB: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x258D30B3: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x25B0A5B5: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0.30.0)
==3801==    by 0x14949005: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x1494C77C: gst_pad_get_caps_reffed (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x1494C8D8: gst_pad_get_caps (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x258D1E6C: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x25B0BAAD: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0.30.0)
==3801==    by 0x25B0CD37: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0.30.0)
==3801==    by 0x149512C7: gst_pad_activate_push (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==
==3801== Syscall param ioctl(generic) points to uninitialised byte(s)
==3801==    at 0x52B5399: syscall (syscall.S:38)
==3801==    by 0x26A1F2EF: ??? (in 
/usr/lib/x86_64-linux-gnu/libv4lconvert.so.0.0.0)
==3801==    by 0x26383EF2: ??? (in 
/usr/lib/x86_64-linux-gnu/libv4l2.so.0.0.0)
==3801==    by 0x26386189: v4l2_ioctl (in 
/usr/lib/x86_64-linux-gnu/libv4l2.so.0.0.0)
==3801==    by 0x258D0EFE: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x258DA4CA: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x258D28F2: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x1494D0D6: gst_pad_set_caps (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x258D2387: ??? (in 
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so)
==3801==    by 0x25B0BAAD: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0.30.0)
==3801==    by 0x25B0CD37: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0.30.0)
==3801==    by 0x149512C7: gst_pad_activate_push (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==  Address 0xffeffc688 is on thread 1's stack
==3801==
Enter SyncStateChange.
Exit SyncStateChange.
3955
==3801== Thread 7 monitorQueue:src:
==3801== Invalid read of size 4
==3801==    at 0x4E85E41: Perl_gv_fetchmeth_pvn (in 
/usr/lib/libperl.so.5.18.2)
==3801==    by 0x4E83AC0: Perl_gv_fetchmethod_pvn_flags (in 
/usr/lib/libperl.so.5.18.2)
==3801==    by 0x685B43C: 
wxPliVirtualCallback::FindCallback(interpreter*, char const*) const 
(v_cback.cpp:30)
==3801==    by 0x6865649: wxPliApp::Yield(bool) (app.h:184)
==3801==    by 0x146F016B: wxGStreamerMediaBackend::SetupXOverlay() (in 
/usr/local/lib/perl/5.18.2/Alien/wxWidgets/gtk_2_8_11_uni/lib/libwx_gtk2u_media-2.8.so.0.7.0)
==3801==    by 0x146F0265: gst_bus_sync_callback (in 
/usr/local/lib/perl/5.18.2/Alien/wxWidgets/gtk_2_8_11_uni/lib/libwx_gtk2u_media-2.8.so.0.7.0)
==3801==    by 0x14929601: gst_bus_post (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x14936EB2: gst_element_post_message (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x14922A53: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x14955384: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x1491F9B7: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x14929601: gst_bus_post (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==  Address 0x5c is not stack'd, malloc'd or (recently) free'd
==3801==
==3801==
==3801== Process terminating with default action of signal 11 (SIGSEGV)
==3801==  Access not within mapped region at address 0x5C
==3801==    at 0x4E85E41: Perl_gv_fetchmeth_pvn (in 
/usr/lib/libperl.so.5.18.2)
==3801==    by 0x4E83AC0: Perl_gv_fetchmethod_pvn_flags (in 
/usr/lib/libperl.so.5.18.2)
==3801==    by 0x685B43C: 
wxPliVirtualCallback::FindCallback(interpreter*, char const*) const 
(v_cback.cpp:30)
==3801==    by 0x6865649: wxPliApp::Yield(bool) (app.h:184)
==3801==    by 0x146F016B: wxGStreamerMediaBackend::SetupXOverlay() (in 
/usr/local/lib/perl/5.18.2/Alien/wxWidgets/gtk_2_8_11_uni/lib/libwx_gtk2u_media-2.8.so.0.7.0)
==3801==    by 0x146F0265: gst_bus_sync_callback (in 
/usr/local/lib/perl/5.18.2/Alien/wxWidgets/gtk_2_8_11_uni/lib/libwx_gtk2u_media-2.8.so.0.7.0)
==3801==    by 0x14929601: gst_bus_post (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x14936EB2: gst_element_post_message (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x14922A53: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x14955384: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x1491F9B7: ??? (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==    by 0x14929601: gst_bus_post (in 
/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0)
==3801==  If you believe this happened as a result of a stack
==3801==  overflow in your program's main thread (unlikely but
==3801==  possible), you can try to increase the size of the
==3801==  main thread stack using the --main-stacksize= flag.
==3801==  The main thread stack size used in this run was 8388608.
==3801==
==3801== HEAP SUMMARY:
==3801==     in use at exit: 118,290,163 bytes in 670,913 blocks
==3801==   total heap usage: 1,901,336 allocs, 1,230,423 frees, 
302,198,700 bytes allocated
==3801==
==3801== LEAK SUMMARY:
==3801==    definitely lost: 735,284 bytes in 53,082 blocks
==3801==    indirectly lost: 50,308 bytes in 1,776 blocks
==3801==      possibly lost: 37,175,845 bytes in 52,488 blocks
==3801==    still reachable: 79,691,166 bytes in 561,624 blocks
==3801==         suppressed: 0 bytes in 0 blocks
==3801== Rerun with --leak-check=full to see details of leaked memory
==3801==
==3801== For counts of detected and suppressed errors, rerun with: -v
==3801== Use --track-origins=yes to see where uninitialised values come from
==3801== ERROR SUMMARY: 28 errors from 9 contexts (suppressed: 1 from 1)
Killed




More information about the gstreamer-devel mailing list