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 710564 - Need to convert OMX alignments to GStreamer alignments
Need to convert OMX alignments to GStreamer alignments
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-omx
1.2.4
Other Linux
: Normal major
: 1.2.0
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-10-20 19:47 UTC by m][sko
Modified: 2014-07-23 08:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description m][sko 2013-10-20 19:47:12 UTC
device: raspberry pi
os: debian
gstreamer 1.2 build from weezy packages from repo

this is my testing pipeline

ORC_CODE=backup GST_DEBUG="videorate:9,*:3,omx:3,omxvideoenc:3,omxvideodec:3,h264parse:3" gst-launch-1.0 -v uridecodebin uri="file:///home//pi//test2//test.ts" name=demux \
 ! video/x-raw, format="I420", framerate=25/1, width=720, height=576 \
 ! videorate skip-to-first=true ! video/x-raw, framerate=25/1 \
 ! fakesink sync=true

after I added videorate to pipeline I get segfault
test file included 
it is mpeg2 but it crash with any other mpeg4 avc file

(gst-launch-1.0:3191): GStreamer-CRITICAL **: gst_allocator_alloc: assertion `((params->align + 1) & params->align) == 0' failed

(gst-launch-1.0:3191): GStreamer-CRITICAL **: gst_memory_map: assertion `mem != NULL' failed
0:00:01.420407620  3191   0xe3e580 WARN              GST_MEMORY gstallocator.c:113:_fallback_mem_copy: could not write map memory (nil)

(gst-launch-1.0:3191): GStreamer-CRITICAL **: gst_allocator_free: assertion `memory != NULL' failed
Caught SIGSEGV
Comment 1 m][sko 2013-10-20 19:52:06 UTC
I don't know if it is related but
If I do videoscale

GST_DEBUG="videorate:9,*:3,omx:3,omxvideoenc:3,omxvideodec:3,h264parse:3" gst-launch-1.0 -v uridecodebin uri="file:///home//pi//test2//test.mp4" name=demux \
 ! video/x-raw, format="I420" \
 ! videoscale method=0 ! video/x-raw, width=720, height=288 \
 ! fakesink sync=true


it crash too
with ORC_CODE=backup all works fine
Comment 2 Sebastian Dröge (slomo) 2013-10-30 20:58:22 UTC
Could you get a backtrace with G_DEBUG=fatal_warnings of the first crash?
Comment 3 m][sko 2013-10-31 08:55:35 UTC
 G_DEBUG=fatal_warnings  gdb --args gst-launch-1.0 -v uridecodebin uri=http://192.168.1.89:3000/T-8395-518-770 name=demux ! video/x-raw, format=I420, framerate=25/1 ! videorate skip-to-first=true ! video/x-raw, framerate=25/1 ! fakesink sync=true


GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/gst-launch-1.0...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/gst-launch-1.0 -v uridecodebin uri=http://192.168.1.89:3000/T-8395-518-770 name=demux \! video/x-raw, format=I420, framerate=25/1 \! videorate skip-to-first=true \! video/x-raw, framerate=25/1 \! fakesink sync=true
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstURIDecodeBin:demux: source = "\(GstSoupHTTPSrc\)\ source"
[New Thread 0xb6518470 (LWP 17451)]
[New Thread 0xb5d18470 (LWP 17452)]
Pipeline is PREROLLING ...
[New Thread 0xb5518470 (LWP 17454)]

** (gst-launch-1.0:17448): WARNING **: Command line `dbus-launch --autolaunch=c1e593dbbed812ae92eec8cf522e59b2 --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n

Program received signal SIGTRAP, Trace/breakpoint trap.

Thread 3058795632 (LWP 17451)

  • #0 raise
    from /lib/arm-linux-gnueabihf/libpthread.so.0
  • #1 g_logv
    from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
  • #2 g_log
    from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
  • #3 ??
    from /usr/lib/arm-linux-gnueabihf/gio/modules/libdconfsettings.so

Comment 4 m][sko 2013-10-31 08:59:35 UTC
but it stop on connecting to X
is it possible to disable it?
Comment 5 Sebastian Dröge (slomo) 2013-10-31 14:05:18 UTC
Well, something was instantiating the dconf gio module. Best would be if you would run all that in an environment that does not produce any unrelated warnings, and as a first warning creates the ones you mentioned in the first comment.
Comment 6 m][sko 2013-10-31 17:04:07 UTC
(gst-launch-1.0:7833): GStreamer-CRITICAL **: gst_allocator_alloc: assertion `((params->align + 1) & params->align) == 0' failed

Program received signal SIGTRAP, Trace/breakpoint trap.

Thread 2946352240 (LWP 7851)

  • #0 raise
    from /lib/arm-linux-gnueabihf/libpthread.so.0
  • #1 g_logv
    from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
  • #2 g_log
    from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
  • #3 g_return_if_fail_warning
    from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
  • #4 gst_allocator_alloc
    at gstallocator.c line 302
  • #5 _fallback_mem_copy
    at gstallocator.c line 110
  • #6 gst_memory_copy
    at gstmemory.c line 361
  • #7 gst_buffer_copy_into
    at gstbuffer.c line 459
  • #8 _gst_buffer_copy
    at gstbuffer.c line 519
  • #9 gst_mini_object_copy
    at gstminiobject.c line 157
  • #10 gst_mini_object_make_writable
    at gstminiobject.c line 324
  • #11 gst_video_rate_flush_prev
    at gstvideorate.c line 591
  • #12 gst_video_rate_flush_prev
    at gstvideorate.c line 581
  • #13 gst_video_rate_transform_ip
    at gstvideorate.c line 1062
  • #14 gst_base_transform_handle_buffer
    at gstbasetransform.c line 2089
  • #15 gst_base_transform_chain
    at gstbasetransform.c line 2201
  • #16 gst_pad_chain_data_unchecked
    at gstpad.c line 3711
  • #17 gst_pad_push_data
    at gstpad.c line 3941
  • #18 gst_base_transform_chain
    at gstbasetransform.c line 2237
  • #19 gst_pad_chain_data_unchecked
    at gstpad.c line 3711
  • #20 gst_pad_push_data
    at gstpad.c line 3941
  • #21 gst_proxy_pad_chain_default
    at gstghostpad.c line 128
  • #22 gst_pad_chain_data_unchecked
    at gstpad.c line 3711
  • #23 gst_pad_push_data
    at gstpad.c line 3941
  • #24 gst_proxy_pad_chain_default
    at gstghostpad.c line 128
  • #25 gst_pad_chain_data_unchecked
    at gstpad.c line 3711
  • #26 gst_pad_push_data
    at gstpad.c line 3941
  • #27 gst_video_decoder_clip_and_push_buf
    at gstvideodecoder.c line 2585
  • #28 gst_video_decoder_finish_frame
    at gstvideodecoder.c line 2500
  • #29 gst_omx_video_dec_loop
    at gstomxvideodec.c line 2074
  • #30 gst_task_func
    at gsttask.c line 316
  • #31 default_func
    at gsttaskpool.c line 70
  • #32 ??
    from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
  • #33 ??
    from /lib/arm-linux-gnueabihf/libglib-2.0.so.0

Comment 7 Sebastian Dröge (slomo) 2013-11-01 13:58:22 UTC
Which version of gst-omx are you using? Can you get a full debug log with GST_DEBUG=6 and attach it here?
Comment 8 m][sko 2013-11-01 22:05:35 UTC
GST_DEBUG=6 \
 gst-launch-1.0 -v uridecodebin uri="http://192.168.1.88:3000/T-8395-518-770" name=demux \
 ! video/x-raw, format="I420", framerate=25/1 \
 ! videorate skip-to-first=true ! video/x-raw, framerate=25/1 \
 ! fakesink sync=true


http://www.mdragon.org/problem3.log
Comment 9 m][sko 2013-11-01 22:06:37 UTC
gst-omx is git master version
Comment 10 m][sko 2013-11-14 07:34:07 UTC
any progress ?
Comment 11 Sebastian Dröge (slomo) 2013-11-25 15:21:59 UTC
No progress AFAIK, and I don't have access to a RPi currently. Needs someone with a RPi to debug this
Comment 12 m][sko 2013-11-26 17:48:43 UTC
http://uk.farnell.com/jsp/search/productdetail.jsp?id=2191863&Ntt=2191863&

Cheap toy for old boys and girls :)
Comment 13 m][sko 2014-06-22 22:31:45 UTC
ORC_CODE=backup \
GST_DEBUG="*:3,GST_MEMORY:0,omxvideodec:3,omxh264dec:0,omxbufferpool:5,videorate:5" \
gst-launch-1.0  uridecodebin uri="http://live.mdragon.org/test_omx/test.ts" use-buffering=true name=demux  \
 ! tee name="decdata" \
 ! videorate ! 'video/x-raw, framerate=25/2' \
 ! fakesink \
 2>&1

is still here


0:00:02.353653872  4296  0x10c7290 ERROR          omxbufferpool gstomxbufferpool.c:80:gst_omx_memory_map: map 0xb0060020 offset:0

(gst-launch-1.0:4296): GStreamer-CRITICAL **: gst_allocator_alloc: assertion `((params->align + 1) & params->align) == 0' failed

(gst-launch-1.0:4296): GStreamer-CRITICAL **: gst_memory_map: assertion `mem != NULL' failed

(gst-launch-1.0:4296): GStreamer-CRITICAL **: gst_allocator_free: assertion `memory != NULL' failed
0:00:02.361950495  4296  0x10c7290 ERROR          omxbufferpool gstomxbufferpool.c:87:gst_omx_memory_unmap: unmap
Caught SIGSEGV

any idea?
Comment 14 Sebastian Dröge (slomo) 2014-06-24 10:29:55 UTC
Backtrace of the first warning (which causes all the follow up problems):

(gst-launch-1.0:3474): GStreamer-CRITICAL **: gst_allocator_alloc: assertion `((params->align + 1) & params->align) == 0' failed

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 0xb15ff470 (LWP 3499)]
0xb6d31e58 in raise () from /lib/arm-linux-gnueabihf/libpthread.so.0
(gdb) 
(gdb) thread apply all bt

Thread 11 (Thread 0xb15ff470 (LWP 3499))

  • #0 raise
    from /lib/arm-linux-gnueabihf/libpthread.so.0
  • #1 g_logv
    from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
  • #2 g_log
    from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
  • #3 g_return_if_fail_warning
    from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
  • #4 gst_allocator_alloc
    at gstallocator.c line 300
  • #5 _fallback_mem_copy
    at gstallocator.c line 108
  • #6 gst_memory_copy
    at gstmemory.c line 361
  • #7 gst_buffer_copy_into
    at gstbuffer.c line 457
  • #8 _gst_buffer_copy
    at gstbuffer.c line 517
  • #9 gst_mini_object_copy
    at gstminiobject.c line 155
  • #10 gst_mini_object_make_writable
    at gstminiobject.c line 322
  • #11 gst_video_rate_flush_prev
    at gstvideorate.c line 579
  • #12 gst_video_rate_flush_prev
    at gstvideorate.c line 569
  • #13 gst_video_rate_transform_ip
    at gstvideorate.c line 1050
  • #14 gst_base_transform_handle_buffer
    at gstbasetransform.c line 2089
  • #15 gst_base_transform_chain
    at gstbasetransform.c line 2201
  • #16 gst_pad_chain_data_unchecked
    at gstpad.c line 3820
  • #17 gst_pad_push_data
    at gstpad.c line 4053
  • #18 gst_tee_handle_data
    at gsttee.c line 634
  • #19 gst_tee_chain
    at gsttee.c line 735
  • #20 gst_pad_chain_data_unchecked
    at gstpad.c line 3820
  • #21 gst_pad_push_data
    at gstpad.c line 4053
  • #22 gst_video_decoder_clip_and_push_buf
    at gstvideodecoder.c line 2751
  • #23 gst_video_decoder_finish_frame
    at gstvideodecoder.c line 2663
  • #24 gst_omx_video_dec_loop
    at gstomxvideodec.c line 1354
  • #25 gst_task_func
    at gsttask.c line 317
  • #26 default_func
    at gsttaskpool.c line 68
  • #27 ??
    from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
  • #28 ??
    from /lib/arm-linux-gnueabihf/libglib-2.0.so.0

Comment 15 Sebastian Dröge (slomo) 2014-06-24 10:43:20 UTC
commit 03c54e7c0fbba61a5b2bf2610b62902321a087da
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Tue Jun 24 12:42:22 2014 +0200

    omxbufferpool: Properly convert OMX alignment to GStreamer alignment
    
    GStreamer uses a bitmask for the alignment while OMX uses the
    alignment itself. Let's convert.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=710564