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 747285 - MEMORY-ERROR is printed and then application abort.
MEMORY-ERROR is printed and then application abort.
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: dont know
1.2.3
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-04-03 05:51 UTC by qwerty
Modified: 2016-02-28 19:43 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description qwerty 2015-04-03 05:51:18 UTC
Env:
linux-kernel: 3.10
cpu: arm cortex-A15 core
gstreamer version: 1.2.3
gst-omx version: 1.0


pipeline structure:
filesrc ! typefind ! queue ! mpegvparse ! omxmpeg2dec ! (convert and scale) ! waylandsink

Operation:
1. Played a short mpeg-2 video, the length is about 6s. 
2. Playback completed.
3. Play it a again without terminating the process.

After I repeated step 2 and 3 for about 5~10 time, the program was aborted and print out this error message:
==========================================================================
***MEMORY-ERROR***: test_arm[468]: GSlice: assertion failed: sinfo->n_allocated > 0
==========================================================================

Here is the gdb backtrace info:
==========================================================================
(gdb) bt
  • #0 __GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 56
  • #1 __GI_abort
    at abort.c line 89
  • #2 mem_error
    at /usr/src/debug/glib-2.0/1_2.38.2-r0/glib-2.38.2/glib/gslice.c line 1455
  • #3 slab_allocator_free_chunk
    at /usr/src/debug/glib-2.0/1_2.38.2-r0/glib-2.38.2/glib/gslice.c line 1337
  • #4 magazine_cache_trim
    at /usr/src/debug/glib-2.0/1_2.38.2-r0/glib-2.38.2/glib/gslice.c line 685
  • #5 magazine_cache_push_magazine
    at /usr/src/debug/glib-2.0/1_2.38.2-r0/glib-2.38.2/glib/gslice.c line 716
  • #6 thread_memory_magazine2_unload
    at /usr/src/debug/glib-2.0/1_2.38.2-r0/glib-2.38.2/glib/gslice.c line 815
  • #7 g_slice_free1
    at /usr/src/debug/glib-2.0/1_2.38.2-r0/glib-2.38.2/glib/gslice.c line 1106
  • #8 g_slist_delete_link
    at /usr/src/debug/glib-2.0/1_2.38.2-r0/glib-2.38.2/glib/gslist.c line 557
  • #9 gst_adapter_flush_unchecked
    at gstadapter.c line 587
  • #10 gst_adapter_take_buffer
    at gstadapter.c line 878
  • #11 gst_base_parse_finish_frame
    at gstbaseparse.c line 2418
  • #12 gst_mpegv_parse_handle_frame
    at gstmpegvideoparse.c line 701
  • #13 gst_base_parse_handle_buffer
    at gstbaseparse.c line 1959
  • #14 gst_base_parse_chain
    at gstbaseparse.c line 2880
  • #15 gst_pad_chain_data_unchecked
    at gstpad.c line 3760
  • #16 gst_pad_push_data
    at gstpad.c line 3990
  • #17 gst_queue_push_one
    at gstqueue.c line 1115
  • #18 gst_queue_loop
    at gstqueue.c line 1244
  • #19 gst_task_func
    at gsttask.c line 316
  • #20 g_thread_pool_thread_proxy
    at /usr/src/debug/glib-2.0/1_2.38.2-r0/glib-2.38.2/glib/gthreadpool.c line 309
  • #21 g_thread_proxy
    at /usr/src/debug/glib-2.0/1_2.38.2-r0/glib-2.38.2/glib/gthread.c line 798
  • #22 start_thread
    at pthread_create.c line 314
  • #23 ??
    at ../ports/sysdeps/unix/sysv/linux/arm/clone.S line 92
  • #24 ??
    at ../ports/sysdeps/unix/sysv/linux/arm/clone.S line 92

Then set the environment variable G_SLICE=always-malloc.
In this situation I could play the same video for about 50 times. No problem happened this time.

I'm not quite sure is this a gstreamer bug or a glib bug.
This is my first bug. If the info is not enough, please notice me.

Thanks,
Comment 1 qwerty 2015-04-03 07:05:10 UTC
Additionally, my glib version is 2.38
Comment 2 Tim-Philipp Müller 2015-04-03 08:48:57 UTC
This might be a parser bug.

Could you make the file available somewhere?

Have you tried with 1.4 or git master?
Comment 3 qwerty 2015-04-03 09:24:55 UTC
@Tim-Philipp Müller

-->Could you make the file available somewhere?
Does "the file" represent the "mpeg-2 media file" or the parser's source code?

-->Have you tried with 1.4 or git master?
I have never tried with 1.4.
The gstreamer in my enviroment is packaged in a yocto project. And the waylandsink plugin was patched some members in my team to adapt our system. So gstreamer-1.4 can't run on our system now. 

But I have ever tried to play a h264 media file. In that case, h264parse was used instead of mpegvideoparse. This issue happened too.
Comment 4 Tim-Philipp Müller 2015-04-03 09:34:41 UTC
The media file, we have the parser source code :)

Does the issue also happen with other sinks, e.g. fakesink?
Comment 5 qwerty 2015-04-06 05:57:33 UTC
I've uploaded the media file to a cloud drive and will keep it avaliable for two weeks. It can be downloaded from the following site:
     http://pan.baidu.com/s/1sjLoCTv

I'll go back to my office tomorrow. And then I'll test it with fakesink.
Comment 6 qwerty 2015-04-07 10:17:10 UTC
I've test my program using fakesink. This issue doesn't happen.

But the "use_dmabuf" property of omx plugins must be set to false in order to make them work well with fakesink.
Comment 7 qwerty 2015-04-07 11:03:40 UTC
@Tim-Philipp Müller

Have you got the media file?

If you could not replay this issue, I think it may be our patched plugins' problem. I'll take a further investigation on this issue. And details will be reported here when I have some conclusions.

Thanks for your attention.
Comment 8 Tim-Philipp Müller 2016-02-28 19:43:53 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment.
Thanks!


It looks like a refcounting issue "somewhere". The file seems to play fine for me with recent GStreamer. I would suspect your custom/modified code, or the integration layer for your embedded system. In any case, we don't really have enough information to go on.