[Bug 761505] videoconvert / xvimagesink segment fault

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Feb 11 10:44:14 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=761505

--- Comment #10 from James Stevenson <james at stev.org> ---

Output from

GST_DEBUG=2,xv*:5 ORC_CODE=debug valgrind
./gstreamer/tools/.libs/gst-launch-1.0 -v videotestsrc num-buffers=2 !
videoconvert name=first ! video/x-raw, format=GRAY8 ! queue ! videoconvert
name=second ! xvimagesink


==27693== Memcheck, a memory error detector
==27693== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==27693== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==27693== Command: ./gstreamer/tools/.libs/gst-launch-1.0 -v videotestsrc
num-buffers=2 ! videoconvert name=first ! video/x-raw, format=GRAY8 ! queue !
videoconvert name=second ! xvimagesink
==27693== 
Setting pipeline to PAUSED ...
0:00:01.253846610 27693      0x87b8890 DEBUG            xvimagesink
xvimagesink.c:1746:gst_xv_image_sink_open:<xvimagesink0> set calculated PAR on
object's PAR
0:00:01.266707054 27693      0x87b8890 DEBUG            xvimagesink
xvimagesink.c:610:gst_xv_image_sink_manage_event_thread:<xvimagesink0> run
xevent thread, expose 1, events 1
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps =
"video/x-raw\,\ width\=\(int\)320\,\ height\=\(int\)240\,\
framerate\=\(fraction\)30/1\,\ format\=\(string\)GRAY8\,\
pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"
/GstPipeline:pipeline0/GstVideoConvert:first.GstPad:src: caps = "video/x-raw\,\
width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)30/1\,\
format\=\(string\)GRAY8\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\
interlace-mode\=\(string\)progressive"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps =
"video/x-raw\,\ width\=\(int\)320\,\ height\=\(int\)240\,\
framerate\=\(fraction\)30/1\,\ format\=\(string\)GRAY8\,\
pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = "video/x-raw\,\
width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)30/1\,\
format\=\(string\)GRAY8\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\
interlace-mode\=\(string\)progressive"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps =
"video/x-raw\,\ width\=\(int\)320\,\ height\=\(int\)240\,\
framerate\=\(fraction\)30/1\,\ format\=\(string\)GRAY8\,\
pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"
0:00:01.572801217 27693      0x87bc6c0 DEBUG            xvimagesink
xvimagesink.c:705:gst_xv_image_sink_setcaps:<xvimagesink0> In setcaps. Possible
caps video/x-raw, format=(string)YUY2, width=(int)[ 1, 8192 ], height=(int)[ 1,
8192 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw,
format=(string)UYVY, width=(int)[ 1, 8192 ], height=(int)[ 1, 8192 ],
framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string)BGRx,
width=(int)[ 1, 8192 ], height=(int)[ 1, 8192 ], framerate=(fraction)[ 0/1,
2147483647/1 ], setting caps video/x-raw, width=(int)320, height=(int)240,
framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1,
interlace-mode=(string)progressive, format=(string)BGRx
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps =
"video/x-raw\,\ width\=\(int\)320\,\ height\=\(int\)240\,\
framerate\=\(fraction\)30/1\,\ format\=\(string\)GRAY8\,\
pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"
0:00:01.579853660 27693      0x87bc6c0 DEBUG            xvimagesink
xvimagesink.c:748:gst_xv_image_sink_setcaps:<xvimagesink0> video width/height:
320x240, calculated display ratio: 4/3
/GstPipeline:pipeline0/GstVideoConvert:first.GstPad:sink: caps =
"video/x-raw\,\ width\=\(int\)320\,\ height\=\(int\)240\,\
framerate\=\(fraction\)30/1\,\ format\=\(string\)GRAY8\,\
pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"
0:00:01.581012194 27693      0x87bc6c0 DEBUG            xvimagesink
xvimagesink.c:757:gst_xv_image_sink_setcaps:<xvimagesink0> keeping video height
0:00:01.582176102 27693      0x87bc6c0 DEBUG            xvimagesink
xvimagesink.c:773:gst_xv_image_sink_setcaps:<xvimagesink0> scaling to 320x240
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink: caps =
"video/x-raw\,\ width\=\(int\)320\,\ height\=\(int\)240\,\
framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\
interlace-mode\=\(string\)progressive\,\ format\=\(string\)BGRx"
0:00:01.619628038 27693      0x87bc6c0 DEBUG            xvimagesink
xvimagesink.c:1069:gst_xv_image_sink_propose_allocation:<xvimagesink0> create
new pool
/GstPipeline:pipeline0/GstVideoConvert:second.GstPad:sink: caps =
"video/x-raw\,\ width\=\(int\)320\,\ height\=\(int\)240\,\
framerate\=\(fraction\)30/1\,\ format\=\(string\)GRAY8\,\
pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"
0:00:01.916671597 27693      0x87bc6c0 DEBUG       xvimageallocator
xvimageallocator.c:364:gst_xvimage_allocator_alloc:<xvimageallocator0> creating
image 0x88ef700 (320x240) cropped 0x0-320x240
0:00:01.921391342 27693      0x87bc6c0 DEBUG       xvimageallocator
xvimageallocator.c:503:gst_xvimage_allocator_alloc:<xvimageallocator0> memory
0x88f0500, align 15, offset 0
0:00:01.922853857 27693      0x87bc6c0 DEBUG            xvimagepool
xvimagepool.c:186:xvimage_buffer_pool_alloc:<xvimagebufferpool1> adding
GstVideoMeta
0:00:01.925998845 27693      0x87bc6c0 DEBUG       xvimageallocator
xvimageallocator.c:157:gst_xvimage_allocator_free:<xvimageallocator0> free
memory 0x88ef700
0:00:01.926768784 27693      0x87bc6c0 DEBUG       xvimageallocator
xvimageallocator.c:364:gst_xvimage_allocator_alloc:<xvimageallocator0> creating
image 0x88f1970 (320x240) cropped 0x0-320x240
0:00:01.927135744 27693      0x87bc6c0 DEBUG       xvimageallocator
xvimageallocator.c:503:gst_xvimage_allocator_alloc:<xvimageallocator0> memory
0x88f2770, align 15, offset 0
0:00:01.927258882 27693      0x87bc6c0 DEBUG            xvimagepool
xvimagepool.c:186:xvimage_buffer_pool_alloc:<xvimagebufferpool1> adding
GstVideoMeta
0:00:01.927356213 27693      0x87bc6c0 DEBUG       xvimageallocator
xvimageallocator.c:157:gst_xvimage_allocator_free:<xvimageallocator0> free
memory 0x88f1970
0:00:01.927910466 27693      0x87bc6c0 DEBUG       xvimageallocator
xvimageallocator.c:364:gst_xvimage_allocator_alloc:<xvimageallocator0> creating
image 0x88f3be0 (320x240) cropped 0x0-320x240
0:00:01.928390464 27693      0x87bc6c0 DEBUG       xvimageallocator
xvimageallocator.c:503:gst_xvimage_allocator_alloc:<xvimageallocator0> memory
0x88f49e0, align 15, offset 0
0:00:01.928555197 27693      0x87bc6c0 DEBUG            xvimagepool
xvimagepool.c:186:xvimage_buffer_pool_alloc:<xvimagebufferpool1> adding
GstVideoMeta
==27693== Thread 3 queue0:src:
==27693== Invalid write of size 8
==27693==    at 0x4036A67: ??? (in /run/user/1000/orcexec.ThdDHi)
==27693==    by 0x8B7B28D: video_orc_pack_BGRA (tmp-orc.c:4207)
==27693==    by 0x8B49F22: video_converter_generic (video-converter.c:2848)
==27693==    by 0x929D69B: gst_video_convert_transform_frame
(gstvideoconvert.c:692)
==27693==    by 0x8B57EE5: gst_video_filter_transform (gstvideofilter.c:271)
==27693==    by 0x8DE5684: default_generate_output (gstbasetransform.c:2180)
==27693==    by 0x8DE7B95: gst_base_transform_chain (gstbasetransform.c:2333)
==27693==    by 0x4EA6EF2: gst_pad_chain_data_unchecked (gstpad.c:4155)
==27693==    by 0x4EA6EF2: gst_pad_push_data (gstpad.c:4407)
==27693==    by 0x4EAF232: gst_pad_push (gstpad.c:4526)
==27693==    by 0x94CE918: gst_queue_push_one (gstqueue.c:1340)
==27693==    by 0x94CE918: gst_queue_loop (gstqueue.c:1487)
==27693==    by 0x4ED9D70: gst_task_func (gsttask.c:331)
==27693==    by 0x54282FD: ??? (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4600.2)
==27693==  Address 0x88f49f0 is 16 bytes inside a block of size 19 alloc'd
==27693==    at 0x4C2BBCF: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27693==    by 0x5406578: g_malloc (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4600.2)
==27693==    by 0x97067FD: gst_xvimage_allocator_alloc (xvimageallocator.c:494)
==27693==    by 0x9705987: xvimage_buffer_pool_alloc (xvimagepool.c:176)
==27693==    by 0x4E75E17: do_alloc_buffer.constprop.5 (gstbufferpool.c:268)
==27693==    by 0x4E760E2: default_acquire_buffer (gstbufferpool.c:1091)
==27693==    by 0x4E776F3: gst_buffer_pool_acquire_buffer
(gstbufferpool.c:1199)
==27693==    by 0x8DE6D31: default_prepare_output_buffer
(gstbasetransform.c:1661)
==27693==    by 0x8DE5593: default_generate_output (gstbasetransform.c:2151)
==27693==    by 0x8DE7B95: gst_base_transform_chain (gstbasetransform.c:2333)
==27693==    by 0x4EA6EF2: gst_pad_chain_data_unchecked (gstpad.c:4155)
==27693==    by 0x4EA6EF2: gst_pad_push_data (gstpad.c:4407)
==27693==    by 0x4EAF232: gst_pad_push (gstpad.c:4526)
==27693== 
==27693== Invalid write of size 8
==27693==    at 0x4036A59: ??? (in /run/user/1000/orcexec.ThdDHi)
==27693==    by 0x8B7B28D: video_orc_pack_BGRA (tmp-orc.c:4207)
==27693==    by 0x8B49F22: video_converter_generic (video-converter.c:2848)
==27693==    by 0x929D69B: gst_video_convert_transform_frame
(gstvideoconvert.c:692)
==27693==    by 0x8B57EE5: gst_video_filter_transform (gstvideofilter.c:271)
==27693==    by 0x8DE5684: default_generate_output (gstbasetransform.c:2180)
==27693==    by 0x8DE7B95: gst_base_transform_chain (gstbasetransform.c:2333)
==27693==    by 0x4EA6EF2: gst_pad_chain_data_unchecked (gstpad.c:4155)
==27693==    by 0x4EA6EF2: gst_pad_push_data (gstpad.c:4407)
==27693==    by 0x4EAF232: gst_pad_push (gstpad.c:4526)
==27693==    by 0x94CE918: gst_queue_push_one (gstqueue.c:1340)
==27693==    by 0x94CE918: gst_queue_loop (gstqueue.c:1487)
==27693==    by 0x4ED9D70: gst_task_func (gsttask.c:331)
==27693==    by 0x54282FD: ??? (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4600.2)
==27693==  Address 0x88f4a00 is 13 bytes after a block of size 19 alloc'd
==27693==    at 0x4C2BBCF: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27693==    by 0x5406578: g_malloc (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4600.2)
==27693==    by 0x97067FD: gst_xvimage_allocator_alloc (xvimageallocator.c:494)
==27693==    by 0x9705987: xvimage_buffer_pool_alloc (xvimagepool.c:176)
==27693==    by 0x4E75E17: do_alloc_buffer.constprop.5 (gstbufferpool.c:268)
==27693==    by 0x4E760E2: default_acquire_buffer (gstbufferpool.c:1091)
==27693==    by 0x4E776F3: gst_buffer_pool_acquire_buffer
(gstbufferpool.c:1199)
==27693==    by 0x8DE6D31: default_prepare_output_buffer
(gstbasetransform.c:1661)
==27693==    by 0x8DE5593: default_generate_output (gstbasetransform.c:2151)
==27693==    by 0x8DE7B95: gst_base_transform_chain (gstbasetransform.c:2333)
==27693==    by 0x4EA6EF2: gst_pad_chain_data_unchecked (gstpad.c:4155)
==27693==    by 0x4EA6EF2: gst_pad_push_data (gstpad.c:4407)
==27693==    by 0x4EAF232: gst_pad_push (gstpad.c:4526)
==27693== 
==27693== Jump to the invalid address stated on the next line
==27693==    at 0xFF515151FF515151: ???
==27693==    by 0x8B7AFBD: video_orc_unpack_GRAY8 (tmp-orc.c:3877)
==27693==    by 0x8B49A42: do_unpack_lines (video-converter.c:2519)
==27693==    by 0x8B49BC9: gst_line_cache_get_lines (video-converter.c:418)
==27693==    by 0x8B4A3D3: do_convert_lines (video-converter.c:2643)
==27693==    by 0x8B49BC9: gst_line_cache_get_lines (video-converter.c:418)
==27693==    by 0x8B49E6A: video_converter_generic (video-converter.c:2840)
==27693==    by 0x929D69B: gst_video_convert_transform_frame
(gstvideoconvert.c:692)
==27693==    by 0x8B57EE5: gst_video_filter_transform (gstvideofilter.c:271)
==27693==    by 0x8DE5684: default_generate_output (gstbasetransform.c:2180)
==27693==    by 0x8DE7B95: gst_base_transform_chain (gstbasetransform.c:2333)
==27693==    by 0x4EA6EF2: gst_pad_chain_data_unchecked (gstpad.c:4155)
==27693==    by 0x4EA6EF2: gst_pad_push_data (gstpad.c:4407)
==27693==  Address 0xff515151ff515151 is not stack'd, malloc'd or (recently)
free'd
==27693== 
Caught SIGSEGV
#0  0x0000000038135ecc in ?? ()
#1  0x00000000380d6311 in ?? ()
#2  0x00000000380d2d0b in ?? ()
#3  0x00000000380d43bf in ?? ()
#4  0x00000000380e3927 in ?? ()
#5  0x0000000000000000 in ?? ()
==27698== 
==27698== HEAP SUMMARY:
==27698==     in use at exit: 1,511,314 bytes in 15,484 blocks
==27698==   total heap usage: 63,431 allocs, 47,947 frees, 23,524,548 bytes
allocated
==27698== 
==27698== LEAK SUMMARY:
==27698==    definitely lost: 3,880 bytes in 4 blocks
==27698==    indirectly lost: 12 bytes in 2 blocks
==27698==      possibly lost: 4,828 bytes in 62 blocks
==27698==    still reachable: 1,414,146 bytes in 15,102 blocks
==27698==                       of which reachable via heuristic:
==27698==                         length64           : 432 bytes in 9 blocks
==27698==                         newarray           : 1,616 bytes in 21 blocks
==27698==         suppressed: 0 bytes in 0 blocks
==27698== Rerun with --leak-check=full to see details of leaked memory
==27698== 
==27698== For counts of detected and suppressed errors, rerun with: -v
==27698== ERROR SUMMARY: 6026 errors from 3 contexts (suppressed: 0 from 0)
Spinning.  Please run 'gdb gst-launch-1.0 27693' to continue debugging, Ctrl-C
to quit, or Ctrl-\ to dump core.
^Chandling interrupt.
Interrupt: Stopping pipeline ...
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink: caps = "NULL"
/GstPipeline:pipeline0/GstVideoConvert:second.GstPad:src: caps = "NULL"
^C==27693== 
==27693== Process terminating with default action of signal 2 (SIGINT)
==27693==    at 0x56D5B5D: __lll_lock_wait (lowlevellock.S:135)
==27693==    by 0x56CFD81: pthread_mutex_lock (pthread_mutex_lock.c:115)
==27693==    by 0x8DE81CF: gst_base_transform_activate
(gstbasetransform.c:2468)
==27693==    by 0x8DE834D: gst_base_transform_sink_activate_mode
(gstbasetransform.c:2504)
==27693==    by 0x4EAB14D: gst_pad_activate_mode (gstpad.c:1188)
==27693==    by 0x4EABB69: gst_pad_set_active (gstpad.c:1072)
==27693==    by 0x4E8D43C: activate_pads (gstelement.c:2714)
==27693==    by 0x4E9DADB: gst_iterator_fold (gstiterator.c:614)
==27693==    by 0x4E8D789: iterator_activate_fold_with_resync.constprop.5
(gstelement.c:2738)
==27693==    by 0x4E8F70D: gst_element_pads_activate (gstelement.c:2782)
==27693==    by 0x4E8F9A5: gst_element_change_state_func (gstelement.c:2848)
==27693==    by 0x4E9184D: gst_element_change_state (gstelement.c:2626)
==27693== 
==27693== HEAP SUMMARY:
==27693==     in use at exit: 1,513,142 bytes in 15,477 blocks
==27693==   total heap usage: 63,520 allocs, 48,043 frees, 23,529,561 bytes
allocated
==27693== 
==27693== LEAK SUMMARY:
==27693==    definitely lost: 1,824 bytes in 2 blocks
==27693==    indirectly lost: 0 bytes in 0 blocks
==27693==      possibly lost: 6,508 bytes in 65 blocks
==27693==    still reachable: 1,416,450 bytes in 15,097 blocks
==27693==                       of which reachable via heuristic:
==27693==                         length64           : 432 bytes in 9 blocks
==27693==                         newarray           : 1,616 bytes in 21 blocks
==27693==         suppressed: 0 bytes in 0 blocks
==27693== Rerun with --leak-check=full to see details of leaked memory
==27693== 
==27693== For counts of detected and suppressed errors, rerun with: -v
==27693== ERROR SUMMARY: 6026 errors from 3 contexts (suppressed: 0 from 0)
Killed

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list