Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GStreamer Memory Leak #511

Closed
teejxd opened this issue Nov 18, 2017 · 97 comments
Closed

GStreamer Memory Leak #511

teejxd opened this issue Nov 18, 2017 · 97 comments
Assignees

Comments

@teejxd
Copy link

teejxd commented Nov 18, 2017

Related issues: #434 #318

I believe these GStreamer memory leaks are still occurring in the lastest build from the repo (installed using opam). Running four video streams starts at around 20% of my actual memory usage and slowly moves to 100% over the course of 4-5 hours.

My config:

set("log.file.path", "/home/hidden/logs/hidden.log")
set("frame.video.width", 720)
set("frame.video.height", 480)
set("gstreamer.add_borders", false)
set("server.telnet",true)
set("server.telnet.port",1241)

s = playlist("/home/stream/playlists/hidden.m3u")

  output.gstreamer.audio_video(
  video_pipeline=
    "videoconvert ! x264enc bitrate=3500  speed-preset=ultrafast ! video/x-h264,profile=baseline ! queue ! mux.",
  audio_pipeline=
    "audioconvert ! voaacenc bitrate=64000 ! queue ! mux.",
  pipeline=
    "flvmux name=mux ! rtmpsink location=\"rtmp://x.x.x.x:1935/live/hidden live=1\"",fallible=true,
  s)

Output of liquidsoap --version

Liquidsoap 1.3.3+scm
Copyright (c) 2003-2017 Savonet team
Liquidsoap is open-source software, released under GNU General Public License.
See <http://liquidsoap.fm> for more information.

Output of opam list

Installed packages for system:
base-bigarray           base  Bigarray library distributed with the OCaml compil
base-bytes              base  Bytes library distributed with the OCaml compiler
base-ocamlbuild         base  OCamlbuild binary and libraries distributed with t
base-threads            base  Threads library distributed with the OCaml compile
base-unix               base  Unix library distributed with the OCaml compiler
camlp4           4.02+system  Camlp4 is a system for writing extensible parsers
camomile               0.8.5  A comprehensive Unicode library
conf-libpcre               1  Virtual package relying on a libpcre system instal
conf-m4                    1  Virtual package relying on m4
conf-pkg-config          1.0  Virtual package relying on pkg-config installation
cppo                   1.6.0  Equivalent of the C preprocessor for OCaml program
dtools                 0.3.4  Library providing various helper functions to make
duppy                  0.6.1  Library providing monadic threads
gstreamer              0.2.3  Bindings for the GStreamer library which provides
jbuilder          1.0+beta14  Fast, portable and opinionated build system
liquidsoap               dev (pinned)  Swiss-army knife for multimedia streaming
mm                     0.3.1  The mm library contains high-level to create and m
ocamlbuild                 0  Build system distributed with the OCaml compiler s
ocamlfind              1.7.3  A library manager for OCaml
pcre                   7.2.3  pcre-ocaml - bindings to the Perl Compatibility Re

Server specs:

Motherboard: Supermicro X9SRE/X9SRE-3F/X9SRi/X9SRi-3F
CPU: 8 x Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
RAM: 2 x 8192 MB
Kernel version: Ubuntu 16.04.3 LTS" 4.4.0-77-generic

Please let me know if there's any additional info I can provide to solve this issue. I would post the --debug log here but I don't want to reveal any sensitive information. I would be happy to send it to you directly if you think it would help.

@toots
Copy link
Member

toots commented Nov 18, 2017

Thanks. Have you tried to run the program using valgrind? It should be able to report leaked memory and it's source. Let me know if you need help setting this up.

@teejxd
Copy link
Author

teejxd commented Nov 18, 2017

I have not used valgrind before. If you'll let me know what I need to do I would be happy to try.

@toots
Copy link
Member

toots commented Nov 18, 2017

You can start with this:

% valgrind --leak-check=full --show-leak-kinds=definite \
   /path/to/liquidsoap <arguments> 2>/tmp/liquidsoap-valgrind.log

Let liquidsoap run for a while then hit ctrl+c to shutdown liquidsoap. /tmp/liquidsoap-valgrind.log should then contain informations about leaked memory.

@teejxd
Copy link
Author

teejxd commented Nov 18, 2017

Done. I've pasted the output below and here as well: https://pastebin.com/raw/FU4DV3k8

==3802== Memcheck, a memory error detector
==3802== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==3802== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==3802== Command: /home/stream/.opam/system/bin/liquidsoap /home/stream/channels/randomcomedy.liq
==3802== 
==3802== Thread 2:
==3802== Invalid write of size 8
==3802==    at 0x69BAB7: value_of_bus (gstreamer_stubs.c:519)
==3802==    by 0x69BAB7: ocaml_gstreamer_bus_of_element (gstreamer_stubs.c:530)
==3802==    by 0x4D83C5: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:347)
==3802==    by 0x5ACC09: camlRequest__fun_1727 (request.ml:348)
==3802==    by 0x65BF30: camlList__iter_1061 (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x5AD381: camlRequest__check_decodable_1295 (request.ml:345)
==3802==    by 0x5AF037: camlRequest__create_1373 (request.ml:496)
==3802==    by 0x565C83: camlPlaylist__get_uri_1284 (playlist.ml:357)
==3802==    by 0x56C45E: camlRequest_source__fun_1631 (request_source.ml:351)
==3802==    by 0x56C89B: camlRequest_source__fun_1618 (request_source.ml:339)
==3802==    by 0x6378A3: camlDuppy__task_1139 (duppy.ml:351)
==3802==    by 0x63599B: camlDuppy__fun_1968 (duppy.ml:131)
==3802==    by 0x639B74: camlDuppy__exec_1107 (duppy.ml:253)
==3802==  Address 0x7bf6d98 is 0 bytes after a block of size 8 alloc'd
==3802==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3802==    by 0x69BAAF: value_of_bus (gstreamer_stubs.c:517)
==3802==    by 0x69BAAF: ocaml_gstreamer_bus_of_element (gstreamer_stubs.c:530)
==3802==    by 0x4D83C5: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:347)
==3802==    by 0x5ACC09: camlRequest__fun_1727 (request.ml:348)
==3802==    by 0x65BF30: camlList__iter_1061 (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x5AD381: camlRequest__check_decodable_1295 (request.ml:345)
==3802==    by 0x5AF037: camlRequest__create_1373 (request.ml:496)
==3802==    by 0x565C83: camlPlaylist__get_uri_1284 (playlist.ml:357)
==3802==    by 0x56C45E: camlRequest_source__fun_1631 (request_source.ml:351)
==3802==    by 0x56C89B: camlRequest_source__fun_1618 (request_source.ml:339)
==3802==    by 0x6378A3: camlDuppy__task_1139 (duppy.ml:351)
==3802==    by 0x63599B: camlDuppy__fun_1968 (duppy.ml:131)
==3802== 
==3802== Invalid write of size 8
==3802==    at 0x69BAE5: ocaml_gstreamer_bus_of_element (gstreamer_stubs.c:533)
==3802==    by 0x4D83C5: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:347)
==3802==    by 0x5ACC09: camlRequest__fun_1727 (request.ml:348)
==3802==    by 0x65BF30: camlList__iter_1061 (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x5AD381: camlRequest__check_decodable_1295 (request.ml:345)
==3802==    by 0x5AF037: camlRequest__create_1373 (request.ml:496)
==3802==    by 0x565C83: camlPlaylist__get_uri_1284 (playlist.ml:357)
==3802==    by 0x56C45E: camlRequest_source__fun_1631 (request_source.ml:351)
==3802==    by 0x56C89B: camlRequest_source__fun_1618 (request_source.ml:339)
==3802==    by 0x6378A3: camlDuppy__task_1139 (duppy.ml:351)
==3802==    by 0x63599B: camlDuppy__fun_1968 (duppy.ml:131)
==3802==    by 0x639B74: camlDuppy__exec_1107 (duppy.ml:253)
==3802==  Address 0x7bf6d98 is 0 bytes after a block of size 8 alloc'd
==3802==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3802==    by 0x69BAAF: value_of_bus (gstreamer_stubs.c:517)
==3802==    by 0x69BAAF: ocaml_gstreamer_bus_of_element (gstreamer_stubs.c:530)
==3802==    by 0x4D83C5: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:347)
==3802==    by 0x5ACC09: camlRequest__fun_1727 (request.ml:348)
==3802==    by 0x65BF30: camlList__iter_1061 (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x5AD381: camlRequest__check_decodable_1295 (request.ml:345)
==3802==    by 0x5AF037: camlRequest__create_1373 (request.ml:496)
==3802==    by 0x565C83: camlPlaylist__get_uri_1284 (playlist.ml:357)
==3802==    by 0x56C45E: camlRequest_source__fun_1631 (request_source.ml:351)
==3802==    by 0x56C89B: camlRequest_source__fun_1618 (request_source.ml:339)
==3802==    by 0x6378A3: camlDuppy__task_1139 (duppy.ml:351)
==3802==    by 0x63599B: camlDuppy__fun_1968 (duppy.ml:131)
==3802== 
==3802== Thread 30 src:src:
==3802== Invalid read of size 8
==3802==    at 0x6B671B: caml_iterate_global_roots (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6B6BA0: caml_scan_global_young_roots (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6B6401: caml_oldify_local_roots (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6B9031: caml_empty_minor_heap (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6B91E1: caml_minor_collection (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6B93FC: caml_check_urgent_gc (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6C6F75: caml_alloc_custom (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6AED4C: caml_thread_new_descriptor (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6AF58D: caml_c_thread_register (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x69A81F: appsrc_need_data_cb (gstreamer_stubs.c:911)
==3802==    by 0x5176667: g_cclosure_marshal_VOID__FLAGSv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==3802==    by 0x51741D3: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==3802==  Address 0x7bf6d98 is 0 bytes after a block of size 8 alloc'd
==3802==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3802==    by 0x69BAAF: value_of_bus (gstreamer_stubs.c:517)
==3802==    by 0x69BAAF: ocaml_gstreamer_bus_of_element (gstreamer_stubs.c:530)
==3802==    by 0x4D83C5: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:347)
==3802==    by 0x5ACC09: camlRequest__fun_1727 (request.ml:348)
==3802==    by 0x65BF30: camlList__iter_1061 (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x5AD381: camlRequest__check_decodable_1295 (request.ml:345)
==3802==    by 0x5AF037: camlRequest__create_1373 (request.ml:496)
==3802==    by 0x565C83: camlPlaylist__get_uri_1284 (playlist.ml:357)
==3802==    by 0x56C45E: camlRequest_source__fun_1631 (request_source.ml:351)
==3802==    by 0x56C89B: camlRequest_source__fun_1618 (request_source.ml:339)
==3802==    by 0x6378A3: camlDuppy__task_1139 (duppy.ml:351)
==3802==    by 0x63599B: camlDuppy__fun_1968 (duppy.ml:131)
==3802== 
==3802== Invalid write of size 8
==3802==    at 0x6B8EE7: caml_oldify_one (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6B671F: caml_iterate_global_roots (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6B6BA0: caml_scan_global_young_roots (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6B6401: caml_oldify_local_roots (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6B9031: caml_empty_minor_heap (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6B91E1: caml_minor_collection (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6B93FC: caml_check_urgent_gc (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6C6F75: caml_alloc_custom (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6AED4C: caml_thread_new_descriptor (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6AF58D: caml_c_thread_register (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x69A81F: appsrc_need_data_cb (gstreamer_stubs.c:911)
==3802==    by 0x5176667: g_cclosure_marshal_VOID__FLAGSv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==3802==  Address 0x7bf6d98 is 0 bytes after a block of size 8 alloc'd
==3802==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3802==    by 0x69BAAF: value_of_bus (gstreamer_stubs.c:517)
==3802==    by 0x69BAAF: ocaml_gstreamer_bus_of_element (gstreamer_stubs.c:530)
==3802==    by 0x4D83C5: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:347)
==3802==    by 0x5ACC09: camlRequest__fun_1727 (request.ml:348)
==3802==    by 0x65BF30: camlList__iter_1061 (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x5AD381: camlRequest__check_decodable_1295 (request.ml:345)
==3802==    by 0x5AF037: camlRequest__create_1373 (request.ml:496)
==3802==    by 0x565C83: camlPlaylist__get_uri_1284 (playlist.ml:357)
==3802==    by 0x56C45E: camlRequest_source__fun_1631 (request_source.ml:351)
==3802==    by 0x56C89B: camlRequest_source__fun_1618 (request_source.ml:339)
==3802==    by 0x6378A3: camlDuppy__task_1139 (duppy.ml:351)
==3802==    by 0x63599B: camlDuppy__fun_1968 (duppy.ml:131)
==3802== 
==3802== Invalid read of size 8
==3802==    at 0x6B671B: caml_iterate_global_roots (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6B6B76: caml_scan_global_roots (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6B66A4: caml_do_roots (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6B66D4: caml_darken_all_roots (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6B8136: start_cycle (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6B873C: caml_major_collection_slice (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6B91EB: caml_minor_collection (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6B93FC: caml_check_urgent_gc (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6C6F75: caml_alloc_custom (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6AED4C: caml_thread_new_descriptor (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6AF58D: caml_c_thread_register (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x69A81F: appsrc_need_data_cb (gstreamer_stubs.c:911)
==3802==  Address 0x7bf6d98 is 0 bytes after a block of size 8 alloc'd
==3802==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3802==    by 0x69BAAF: value_of_bus (gstreamer_stubs.c:517)
==3802==    by 0x69BAAF: ocaml_gstreamer_bus_of_element (gstreamer_stubs.c:530)
==3802==    by 0x4D83C5: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:347)
==3802==    by 0x5ACC09: camlRequest__fun_1727 (request.ml:348)
==3802==    by 0x65BF30: camlList__iter_1061 (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x5AD381: camlRequest__check_decodable_1295 (request.ml:345)
==3802==    by 0x5AF037: camlRequest__create_1373 (request.ml:496)
==3802==    by 0x565C83: camlPlaylist__get_uri_1284 (playlist.ml:357)
==3802==    by 0x56C45E: camlRequest_source__fun_1631 (request_source.ml:351)
==3802==    by 0x56C89B: camlRequest_source__fun_1618 (request_source.ml:339)
==3802==    by 0x6378A3: camlDuppy__task_1139 (duppy.ml:351)
==3802==    by 0x63599B: camlDuppy__fun_1968 (duppy.ml:131)
==3802== 
==3802== Thread 10 video_src:src:
==3802== Use of uninitialised value of size 8
==3802==    at 0xBADE492: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0xBAE1654: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0xBAE0DB9: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0xBAE1D2D: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0xBAE0DB9: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0xBAE105A: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0xB8BD508: ??? (in /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoconvert.so)
==3802==    by 0xBAEF21D: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0x6C84BA4: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0.803.0)
==3802==    by 0x6C84445: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0.803.0)
==3802==    by 0x4EA859E: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.803.0)
==3802==    by 0x4EB0542: gst_pad_push (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.803.0)
==3802== 
==3802== Use of uninitialised value of size 8
==3802==    at 0xBADE496: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0xBAE1654: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0xBAE0DB9: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0xBAE1D2D: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0xBAE0DB9: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0xBAE105A: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0xB8BD508: ??? (in /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoconvert.so)
==3802==    by 0xBAEF21D: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0x6C84BA4: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0.803.0)
==3802==    by 0x6C84445: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0.803.0)
==3802==    by 0x4EA859E: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.803.0)
==3802==    by 0x4EB0542: gst_pad_push (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.803.0)
==3802== 
==3802== Use of uninitialised value of size 8
==3802==    at 0xBADE4A5: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0xBAE1654: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0xBAE0DB9: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0xBAE1D2D: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0xBAE0DB9: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0xBAE105A: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0xB8BD508: ??? (in /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoconvert.so)
==3802==    by 0xBAEF21D: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3802==    by 0x6C84BA4: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0.803.0)
==3802==    by 0x6C84445: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0.803.0)
==3802==    by 0x4EA859E: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.803.0)
==3802==    by 0x4EB0542: gst_pad_push (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.803.0)
==3802== 
==3802== 
==3802== More than 10000000 total errors detected.  I'm not reporting any more.
==3802== Final error counts will be inaccurate.  Go fix your program!
==3802== Rerun with --error-limit=no to disable this cutoff.  Note
==3802== that errors may occur in your program without prior warning from
==3802== Valgrind, because errors are no longer being displayed.
==3802== 
==3802== 
==3802== HEAP SUMMARY:
==3802==     in use at exit: 146,992,608 bytes in 42,730 blocks
==3802==   total heap usage: 242,807 allocs, 200,077 frees, 1,443,316,179 bytes allocated
==3802== 
==3802== Thread 1:
==3802== 16 bytes in 1 blocks are definitely lost in loss record 1,733 of 6,885
==3802==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3802==    by 0x63899D7: __vasprintf_chk (vasprintf_chk.c:80)
==3802==    by 0x5444C98: g_vasprintf (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==3802==    by 0x541F66C: g_strdup_vprintf (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==3802==    by 0x541F728: g_strdup_printf (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==3802==    by 0x4E66F1B: gst_version_string (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.803.0)
==3802==    by 0x69ACC4: ocaml_gstreamer_version_string (gstreamer_stubs.c:81)
==3802==    by 0x4D7425: camlGstreamer_decoder__create_decoder_1335 (gstreamer_decoder.ml:47)
==3802==    by 0x5B0D01: camlDecoder__file_decoder_1228 (decoder.ml:348)
==3802==    by 0x5B0870: camlDecoder__fun_1389 (decoder.ml:250)
==3802==    by 0x5AF31C: camlRequest__get_decoder_1400 (request.ml:528)
==3802==    by 0x56B964: camlRequest_source__fun_1487 (request_source.ml:92)
==3802== 
==3802== 20 bytes in 1 blocks are definitely lost in loss record 1,820 of 6,885
==3802==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3802==    by 0x69AB47: ocaml_gstreamer_init (gstreamer_stubs.c:35)
==3802==    by 0x5B1CF5: camlGstreamer_utils__fun_1357 (gstreamer.ml:13)
==3802==    by 0x63E11F: camlDtools__exec_1298 (dtools.ml:501)
==3802==    by 0x65BF30: camlList__iter_1061 (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x63E160: camlDtools__exec_1298 (dtools.ml:504)
==3802==    by 0x4C002C: camlMain__Make_1320 (main.ml:526)
==3802==    by 0x4BD1A6: camlRunner__entry (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x4B6658: caml_program (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6C84ED: ??? (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x6C86AC: __libc_csu_init (in /home/stream/.opam/system/bin/liquidsoap)
==3802==    by 0x629182F: (below main) (libc-start.c:291)
==3802== 
==3802== 16,384 bytes in 1 blocks are definitely lost in loss record 6,770 of 6,885
==3802==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3802==    by 0x5406718: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==3802==    by 0x54108BB: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==3802==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
==3802==    by 0x40107CA: call_init (dl-init.c:30)
==3802==    by 0x40107CA: _dl_init (dl-init.c:120)
==3802==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
==3802==    by 0x1: ???
==3802==    by 0xFFF000192: ???
==3802==    by 0xFFF0001BB: ???
==3802== 
==3802== LEAK SUMMARY:
==3802==    definitely lost: 16,420 bytes in 3 blocks
==3802==    indirectly lost: 0 bytes in 0 blocks
==3802==      possibly lost: 14,981,400 bytes in 601 blocks
==3802==    still reachable: 131,769,636 bytes in 41,433 blocks
==3802==                       of which reachable via heuristic:
==3802==                         length64           : 8,000 bytes in 191 blocks
==3802==                         newarray           : 1,680 bytes in 25 blocks
==3802==         suppressed: 0 bytes in 0 blocks
==3802== Reachable blocks (those to which a pointer was found) are not shown.
==3802== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==3802== 
==3802== For counts of detected and suppressed errors, rerun with: -v
==3802== Use --track-origins=yes to see where uninitialised values come from
==3802== ERROR SUMMARY: 10000457 errors from 465 contexts (suppressed: 0 from 0)

@toots
Copy link
Member

toots commented Nov 18, 2017

Thanks! You might need to run it a little longer, though, I only see initialization-related leaks here. You can also take the --show-leak-kinds=definite option out to have a full report that includes potential leaks as well.

@teejxd
Copy link
Author

teejxd commented Nov 18, 2017

Will do. I saw this bit here:

==3802== More than 10000000 total errors detected.  I'm not reporting any more.
==3802== Final error counts will be inaccurate.  Go fix your program!
==3802== Rerun with --error-limit=no to disable this cutoff.  Note
==3802== that errors may occur in your program without prior warning from
==3802== Valgrind, because errors are no longer being displayed.

I will run it again with --error-limit=no for a few hours and post the results.

Thank you.

@teejxd
Copy link
Author

teejxd commented Nov 19, 2017

Doesn't seem to want to cycle thru my playlist when using valgrind (or let me watch the stream at all). It runs fine (minus the memory leak over time) when not using valgrind. Regardless, here's what I have from valgrind:

valgrind --leak-check=full --error-limit=no /home/stream/.opam/system/bin/liquidsoap /home/stream/channels/randomcomedy.liq 2>/home/stream/liquidsoap-valgrind.log

==3999== Memcheck, a memory error detector
==3999== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==3999== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==3999== Command: /home/stream/.opam/system/bin/liquidsoap /home/stream/channels/randomcomedy.liq
==3999== 
==3999== Thread 4:
==3999== Invalid write of size 8
==3999==    at 0x69BAB7: value_of_bus (gstreamer_stubs.c:519)
==3999==    by 0x69BAB7: ocaml_gstreamer_bus_of_element (gstreamer_stubs.c:530)
==3999==    by 0x4D83C5: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:347)
==3999==    by 0x5ACC09: camlRequest__fun_1727 (request.ml:348)
==3999==    by 0x65BF30: camlList__iter_1061 (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x5AD381: camlRequest__check_decodable_1295 (request.ml:345)
==3999==    by 0x5AF037: camlRequest__create_1373 (request.ml:496)
==3999==    by 0x565C83: camlPlaylist__get_uri_1284 (playlist.ml:357)
==3999==    by 0x56C45E: camlRequest_source__fun_1631 (request_source.ml:351)
==3999==    by 0x56C89B: camlRequest_source__fun_1618 (request_source.ml:339)
==3999==    by 0x6378A3: camlDuppy__task_1139 (duppy.ml:351)
==3999==    by 0x63599B: camlDuppy__fun_1968 (duppy.ml:131)
==3999==    by 0x639B74: camlDuppy__exec_1107 (duppy.ml:253)
==3999==  Address 0x7bfaaf8 is 0 bytes after a block of size 8 alloc'd
==3999==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3999==    by 0x69BAAF: value_of_bus (gstreamer_stubs.c:517)
==3999==    by 0x69BAAF: ocaml_gstreamer_bus_of_element (gstreamer_stubs.c:530)
==3999==    by 0x4D83C5: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:347)
==3999==    by 0x5ACC09: camlRequest__fun_1727 (request.ml:348)
==3999==    by 0x65BF30: camlList__iter_1061 (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x5AD381: camlRequest__check_decodable_1295 (request.ml:345)
==3999==    by 0x5AF037: camlRequest__create_1373 (request.ml:496)
==3999==    by 0x565C83: camlPlaylist__get_uri_1284 (playlist.ml:357)
==3999==    by 0x56C45E: camlRequest_source__fun_1631 (request_source.ml:351)
==3999==    by 0x56C89B: camlRequest_source__fun_1618 (request_source.ml:339)
==3999==    by 0x6378A3: camlDuppy__task_1139 (duppy.ml:351)
==3999==    by 0x63599B: camlDuppy__fun_1968 (duppy.ml:131)
==3999== 
==3999== Invalid write of size 8
==3999==    at 0x69BAE5: ocaml_gstreamer_bus_of_element (gstreamer_stubs.c:533)
==3999==    by 0x4D83C5: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:347)
==3999==    by 0x5ACC09: camlRequest__fun_1727 (request.ml:348)
==3999==    by 0x65BF30: camlList__iter_1061 (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x5AD381: camlRequest__check_decodable_1295 (request.ml:345)
==3999==    by 0x5AF037: camlRequest__create_1373 (request.ml:496)
==3999==    by 0x565C83: camlPlaylist__get_uri_1284 (playlist.ml:357)
==3999==    by 0x56C45E: camlRequest_source__fun_1631 (request_source.ml:351)
==3999==    by 0x56C89B: camlRequest_source__fun_1618 (request_source.ml:339)
==3999==    by 0x6378A3: camlDuppy__task_1139 (duppy.ml:351)
==3999==    by 0x63599B: camlDuppy__fun_1968 (duppy.ml:131)
==3999==    by 0x639B74: camlDuppy__exec_1107 (duppy.ml:253)
==3999==  Address 0x7bfaaf8 is 0 bytes after a block of size 8 alloc'd
==3999==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3999==    by 0x69BAAF: value_of_bus (gstreamer_stubs.c:517)
==3999==    by 0x69BAAF: ocaml_gstreamer_bus_of_element (gstreamer_stubs.c:530)
==3999==    by 0x4D83C5: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:347)
==3999==    by 0x5ACC09: camlRequest__fun_1727 (request.ml:348)
==3999==    by 0x65BF30: camlList__iter_1061 (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x5AD381: camlRequest__check_decodable_1295 (request.ml:345)
==3999==    by 0x5AF037: camlRequest__create_1373 (request.ml:496)
==3999==    by 0x565C83: camlPlaylist__get_uri_1284 (playlist.ml:357)
==3999==    by 0x56C45E: camlRequest_source__fun_1631 (request_source.ml:351)
==3999==    by 0x56C89B: camlRequest_source__fun_1618 (request_source.ml:339)
==3999==    by 0x6378A3: camlDuppy__task_1139 (duppy.ml:351)
==3999==    by 0x63599B: camlDuppy__fun_1968 (duppy.ml:131)
==3999== 
==3999== Thread 30 src:src:
==3999== Invalid read of size 8
==3999==    at 0x6B671B: caml_iterate_global_roots (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6B6BA0: caml_scan_global_young_roots (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6B6401: caml_oldify_local_roots (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6B9031: caml_empty_minor_heap (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6B91E1: caml_minor_collection (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6B93FC: caml_check_urgent_gc (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6C6F75: caml_alloc_custom (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6AED4C: caml_thread_new_descriptor (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6AF58D: caml_c_thread_register (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x69A81F: appsrc_need_data_cb (gstreamer_stubs.c:911)
==3999==    by 0x5176667: g_cclosure_marshal_VOID__FLAGSv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==3999==    by 0x51741D3: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==3999==  Address 0x7bfaaf8 is 0 bytes after a block of size 8 alloc'd
==3999==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3999==    by 0x69BAAF: value_of_bus (gstreamer_stubs.c:517)
==3999==    by 0x69BAAF: ocaml_gstreamer_bus_of_element (gstreamer_stubs.c:530)
==3999==    by 0x4D83C5: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:347)
==3999==    by 0x5ACC09: camlRequest__fun_1727 (request.ml:348)
==3999==    by 0x65BF30: camlList__iter_1061 (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x5AD381: camlRequest__check_decodable_1295 (request.ml:345)
==3999==    by 0x5AF037: camlRequest__create_1373 (request.ml:496)
==3999==    by 0x565C83: camlPlaylist__get_uri_1284 (playlist.ml:357)
==3999==    by 0x56C45E: camlRequest_source__fun_1631 (request_source.ml:351)
==3999==    by 0x56C89B: camlRequest_source__fun_1618 (request_source.ml:339)
==3999==    by 0x6378A3: camlDuppy__task_1139 (duppy.ml:351)
==3999==    by 0x63599B: camlDuppy__fun_1968 (duppy.ml:131)
==3999== 
==3999== Invalid write of size 8
==3999==    at 0x6B8EE7: caml_oldify_one (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6B671F: caml_iterate_global_roots (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6B6BA0: caml_scan_global_young_roots (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6B6401: caml_oldify_local_roots (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6B9031: caml_empty_minor_heap (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6B91E1: caml_minor_collection (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6B93FC: caml_check_urgent_gc (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6C6F75: caml_alloc_custom (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6AED4C: caml_thread_new_descriptor (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6AF58D: caml_c_thread_register (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x69A81F: appsrc_need_data_cb (gstreamer_stubs.c:911)
==3999==    by 0x5176667: g_cclosure_marshal_VOID__FLAGSv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==3999==  Address 0x7bfaaf8 is 0 bytes after a block of size 8 alloc'd
==3999==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3999==    by 0x69BAAF: value_of_bus (gstreamer_stubs.c:517)
==3999==    by 0x69BAAF: ocaml_gstreamer_bus_of_element (gstreamer_stubs.c:530)
==3999==    by 0x4D83C5: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:347)
==3999==    by 0x5ACC09: camlRequest__fun_1727 (request.ml:348)
==3999==    by 0x65BF30: camlList__iter_1061 (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x5AD381: camlRequest__check_decodable_1295 (request.ml:345)
==3999==    by 0x5AF037: camlRequest__create_1373 (request.ml:496)
==3999==    by 0x565C83: camlPlaylist__get_uri_1284 (playlist.ml:357)
==3999==    by 0x56C45E: camlRequest_source__fun_1631 (request_source.ml:351)
==3999==    by 0x56C89B: camlRequest_source__fun_1618 (request_source.ml:339)
==3999==    by 0x6378A3: camlDuppy__task_1139 (duppy.ml:351)
==3999==    by 0x63599B: camlDuppy__fun_1968 (duppy.ml:131)
==3999== 
==3999== Invalid read of size 8
==3999==    at 0x6B671B: caml_iterate_global_roots (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6B6B76: caml_scan_global_roots (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6B66A4: caml_do_roots (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6B66D4: caml_darken_all_roots (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6B8136: start_cycle (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6B873C: caml_major_collection_slice (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6B91EB: caml_minor_collection (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6B93FC: caml_check_urgent_gc (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6C6F75: caml_alloc_custom (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6AED4C: caml_thread_new_descriptor (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x6AF58D: caml_c_thread_register (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x69A81F: appsrc_need_data_cb (gstreamer_stubs.c:911)
==3999==  Address 0x7bfaaf8 is 0 bytes after a block of size 8 alloc'd
==3999==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3999==    by 0x69BAAF: value_of_bus (gstreamer_stubs.c:517)
==3999==    by 0x69BAAF: ocaml_gstreamer_bus_of_element (gstreamer_stubs.c:530)
==3999==    by 0x4D83C5: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:347)
==3999==    by 0x5ACC09: camlRequest__fun_1727 (request.ml:348)
==3999==    by 0x65BF30: camlList__iter_1061 (in /home/stream/.opam/system/bin/liquidsoap)
==3999==    by 0x5AD381: camlRequest__check_decodable_1295 (request.ml:345)
==3999==    by 0x5AF037: camlRequest__create_1373 (request.ml:496)
==3999==    by 0x565C83: camlPlaylist__get_uri_1284 (playlist.ml:357)
==3999==    by 0x56C45E: camlRequest_source__fun_1631 (request_source.ml:351)
==3999==    by 0x56C89B: camlRequest_source__fun_1618 (request_source.ml:339)
==3999==    by 0x6378A3: camlDuppy__task_1139 (duppy.ml:351)
==3999==    by 0x63599B: camlDuppy__fun_1968 (duppy.ml:131)
==3999== 
==3999== Thread 11 video_src:src:
==3999== Use of uninitialised value of size 8
==3999==    at 0xBADE492: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0xBAE1654: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0xBAE0DB9: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0xBAE1D2D: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0xBAE0DB9: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0xBAE105A: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0xB8BD508: ??? (in /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoconvert.so)
==3999==    by 0xBAEF21D: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0x6C84BA4: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0.803.0)
==3999==    by 0x6C84445: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0.803.0)
==3999==    by 0x4EA859E: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.803.0)
==3999==    by 0x4EB0542: gst_pad_push (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.803.0)
==3999== 
==3999== Use of uninitialised value of size 8
==3999==    at 0xBADE496: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0xBAE1654: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0xBAE0DB9: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0xBAE1D2D: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0xBAE0DB9: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0xBAE105A: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0xB8BD508: ??? (in /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoconvert.so)
==3999==    by 0xBAEF21D: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0x6C84BA4: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0.803.0)
==3999==    by 0x6C84445: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0.803.0)
==3999==    by 0x4EA859E: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.803.0)
==3999==    by 0x4EB0542: gst_pad_push (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.803.0)
==3999== 
==3999== Use of uninitialised value of size 8
==3999==    at 0xBADE4A5: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0xBAE1654: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0xBAE0DB9: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0xBAE1D2D: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0xBAE0DB9: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0xBAE105A: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0xB8BD508: ??? (in /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoconvert.so)
==3999==    by 0xBAEF21D: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.803.0)
==3999==    by 0x6C84BA4: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0.803.0)
==3999==    by 0x6C84445: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0.803.0)
==3999==    by 0x4EA859E: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.803.0)
==3999==    by 0x4EB0542: gst_pad_push (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.803.0)

I've also pasted it here again: https://pastebin.com/raw/Qvzkfkms

Here's the last few lines my liquidsoap log shows:

2017/11/18 18:08:17 [decoder.gstreamer:5] File /home/stream/media/file01.mkv has video.
2017/11/18 18:08:17 [decoder:3] Method "GSTREAMER" accepted "/home/stream/media/file01.mkv".
2017/11/18 18:08:18 [randomcomedy(dot)m3u:4] Remaining: 0.0s, queued: 0.0s, adding: 30.0s (RID 1)
2017/11/18 18:08:18 [randomcomedy(dot)m3u:4] Remaining: 0.0s, queued: 30.0s, taking: 30.0s
2017/11/18 18:08:18 [decoder.gstreamer:4] Using GStreamer 1.8.3.
2017/11/18 18:08:18 [decoder.gstreamer:5] Decode A/V: true/true.
2017/11/18 18:08:18 [decoder.gstreamer:5] Gstreamer pipeline: appsrc name=src ! tee name=t t. ! queue ! decodebin ! audioconvert ! audioresample ! appsink max-buffers=5 drop=false sync=false name="audio_sink" caps="audio/x-raw,format=S16LE,layout=interleaved,channels=2,rate=44100" t. ! queue ! decodebin ! videoconvert ! videoscale add-borders=false ! videorate ! appsink name="video_sink" drop=false sync=false max-buffers=5 caps="video/x-raw,format=RGBA,width=720,height=480,framerate=25/1,pixel-aspect-ratio=1/1".
2017/11/18 18:08:18 [randomcomedy(dot)m3u:3] Prepared "/home/stream/media/file01.mkv" (RID 1).
2017/11/18 18:08:18 [clock.wallclock_gstreamer:4] Delegating clock to active sources.

The video being played is only 20 minutes long and I let liquidsoap run for an hour or so without any activity in the log. My apologies for the confusion.

@toots
Copy link
Member

toots commented Nov 20, 2017

Hi,

valgrind may indeed interfere with the running instance. I will try to reproduce myself locally.

@mrdevis
Copy link

mrdevis commented Dec 8, 2017

Hi,
Quite new to LS. So I maybe doing something wrong. I use a fallback video like this:

liveOut = playlist.once(reload_mode="watch", "/VIDEOS/play_now.pls")
liveOut = fallback(track_sensitive=true, [liveOut, single("/VIDEOS/break.mp4")] )

looking at htop on debian stretch, I see that things stay stable when the playlist is being played, but as soon as the fallback is being played (a short video of about 4 seconds), with each repetition the memory is being upped by 200 megs (plusminus the size of the video). This goes on until all memory is used and then LiquidSoap is killing itself. Takes about 10 minutes.

Please let me know if I can help with this, I have a show coming up in three weeks...

Best, Jeroen

ps. opam installed version 1.3.3

@toots
Copy link
Member

toots commented Dec 9, 2017

Hi,

Nope, it looks like there's something wrong with the gstreamer binding. I will try to revisit this soon.

@mrdevis
Copy link

mrdevis commented Dec 9, 2017

Thanks for getting back.
Upping Gstream & Plugs to 1.12.4, does not make a diffference alas. I'll check what happens when I use longer fallback videos...
best, Jeroen

@mrdevis
Copy link

mrdevis commented Dec 9, 2017

Is there any connection with this phenomenon in the log?? There is a lot of

Nonexistent file ...

warnings/errors. The log part below is from running a single file in fallback only, at the point where the fallback video is reloaded. Strangely enough, with a ten minute video, there is no memory leak in htop, stays fix around 500 megs after a couple of repetitions.

2017/12/09 14:01:12 [request:4] Nonexistent file or ill-formed URI ""!
2017/12/09 14:01:12 [request:4] Nonexistent file or ill-formed URI ""!
2017/12/09 14:01:14 [decoder.gstreamer:5] End of stream.
2017/12/09 14:01:14 [request:4] Nonexistent file or ill-formed URI ""!
2017/12/09 14:01:14 [request:4] Nonexistent file or ill-formed URI ""!
2017/12/09 14:01:14 [request:4] Nonexistent file or ill-formed URI ""!
2017/12/09 14:01:14 [request:4] Nonexistent file or ill-formed URI ""!
2017/12/09 14:01:16 [request:4] Nonexistent file or ill-formed URI ""!
2017/12/09 14:01:16 [request:4] Nonexistent file or ill-formed URI ""!
2017/12/09 14:01:16 [request:4] Nonexistent file or ill-formed URI ""!
2017/12/09 14:01:16 [request:4] Nonexistent file or ill-formed URI ""!
2017/12/09 14:01:17 [decoder:4] Decoding "/VIDEOS/breakloop.mp4" ended: Gstreamer.End_of_stream.
2017/12/09 14:01:17 [single_6807:3] Finished with "/VIDEOS/breakloop.mp4".
2017/12/09 14:01:17 [request.dynamic_6805:5] Queue is empty!
2017/12/09 14:01:17 [request.dynamic_6805:5] Failed to prepare track: no file.
2017/12/09 14:01:17 [decoder.gstreamer:4] Using GStreamer 1.12.4.
2017/12/09 14:01:17 [decoder.gstreamer:5] Decode A/V: true/true.
2017/12/09 14:01:17 [decoder.gstreamer:5] Gstreamer pipeline: appsrc name=src ! tee name=t t. !``queue ! decodebin ! audioconvert ! audioresample ! appsink max-buffers=10 drop=false sync=false ``name="audio_sink" caps="audio/x-raw,format=S16LE,layout=interleaved,channels=2,rate=48000" t. ``! queue ! decodebin ! videoconvert ! videoscale add-borders=false ! videorate ! appsink name="video_sink" drop=false sync=false max-buffers=10 caps="video/x-raw, format=RGBA,width=640,height=360,framerate=25/1,pixel-aspect-ratio=1/1".
2017/12/09 14:01:17 [single_6807:3] Prepared "/VIDEOS/breakloop.mp4" (RID 1).
2017/12/09 14:01:18 [request:4] Nonexistent file or ill-formed URI ""!
2017/12/09 14:01:18 [request:4] Nonexistent file or ill-formed URI ""!
2017/12/09 14:01:18 [request:4] Nonexistent file or ill-formed URI ""!
2017/12/09 14:01:18 [request:4] Nonexistent file or ill-formed URI ""!
2017/12/09 14:01:20 [request:4] Nonexistent file or ill-formed URI ""!
2017/12/09 14:01:20 [request:4] Nonexistent file or ill-formed URI ""!

@LunaSquee
Copy link

Any developments on this?

@toots
Copy link
Member

toots commented Jul 2, 2018

No. I still don't like this bug. Will have another look at it shortly.

@toots toots self-assigned this Jul 2, 2018
@dromer
Copy link
Contributor

dromer commented Jul 3, 2018

I have the feeling I'm experiencing the same issue.
On startup my LS instance uses about ~1.3GB memory but this steadily climbs until oomkiller comes by to shut it down (raised the memory for the machine from 2GB to 3GB). Will explore some profiling with valgrind in a bit.

@toots
Copy link
Member

toots commented Jul 11, 2018

Thanks. This bug has been eluding us for a while, unfortunately.

@dromer
Copy link
Contributor

dromer commented Jul 17, 2018

So it seems that the LS playback never actually reaches the gstreamer output. At least I don't see any memory usage above ~500mb (where normally at the first output instance it is about ~1.3gb as I said). After about 2 minutes the process stops. Here is the log:

==7089== Memcheck, a memory error detector
==7089== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==7089== Using Valgrind-3.12.0.SVN and LibVEX; rerun with -h for copyright info
==7089== Command: liquidsoap playvideo.liq
==7089== 
==7089== Invalid write of size 8
==7089==    at 0x4F52A4: value_of_bus (gstreamer_stubs.c:519)
==7089==    by 0x4F52A4: ocaml_gstreamer_bus_of_element (gstreamer_stubs.c:530)
==7089==    by 0x32C9F5: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:347)
==7089==    by 0x405389: camlRequest__fun_1727 (request.ml:348)
==7089==    by 0x4B2760: camlList__iter_1061 (list.ml:73)
==7089==    by 0x405B01: camlRequest__check_decodable_1295 (request.ml:345)
==7089==    by 0x4077B7: camlRequest__create_1373 (request.ml:496)
==7089==    by 0x3C17A6: camlReq_simple__fun_1436 (req_simple.ml:75)
==7089==    by 0x3D19D3: camlLang__f_1381 (lang.ml:408)
==7089==    by 0x3D1BE1: camlLang__f_1389 (lang.ml:419)
==7089==    by 0x3EEF59: camlLang_values__apply_1666 (lang_values.ml:971)
==7089==    by 0x3EFBA7: camlLang_values__eval_toplevel_1791 (lang_values.ml:1036)
==7089==    by 0x3D259C: camlLang__fun_2313 (lang.ml:650)
==7089==  Address 0x8e5fd68 is 0 bytes after a block of size 8 alloc'd
==7089==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==7089==    by 0x4F529C: value_of_bus (gstreamer_stubs.c:517)
==7089==    by 0x4F529C: ocaml_gstreamer_bus_of_element (gstreamer_stubs.c:530)
==7089==    by 0x32C9F5: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:347)
==7089==    by 0x405389: camlRequest__fun_1727 (request.ml:348)
==7089==    by 0x4B2760: camlList__iter_1061 (list.ml:73)
==7089==    by 0x405B01: camlRequest__check_decodable_1295 (request.ml:345)
==7089==    by 0x4077B7: camlRequest__create_1373 (request.ml:496)
==7089==    by 0x3C17A6: camlReq_simple__fun_1436 (req_simple.ml:75)
==7089==    by 0x3D19D3: camlLang__f_1381 (lang.ml:408)
==7089==    by 0x3D1BE1: camlLang__f_1389 (lang.ml:419)
==7089==    by 0x3EEF59: camlLang_values__apply_1666 (lang_values.ml:971)
==7089==    by 0x3EFBA7: camlLang_values__eval_toplevel_1791 (lang_values.ml:1036)
==7089== 
==7089== Invalid write of size 8
==7089==    at 0x4F52C1: ocaml_gstreamer_bus_of_element (gstreamer_stubs.c:533)
==7089==    by 0x32C9F5: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:347)
==7089==    by 0x405389: camlRequest__fun_1727 (request.ml:348)
==7089==    by 0x4B2760: camlList__iter_1061 (list.ml:73)
==7089==    by 0x405B01: camlRequest__check_decodable_1295 (request.ml:345)
==7089==    by 0x4077B7: camlRequest__create_1373 (request.ml:496)
==7089==    by 0x3C17A6: camlReq_simple__fun_1436 (req_simple.ml:75)
==7089==    by 0x3D19D3: camlLang__f_1381 (lang.ml:408)
==7089==    by 0x3D1BE1: camlLang__f_1389 (lang.ml:419)
==7089==    by 0x3EEF59: camlLang_values__apply_1666 (lang_values.ml:971)
==7089==    by 0x3EFBA7: camlLang_values__eval_toplevel_1791 (lang_values.ml:1036)
==7089==    by 0x3D259C: camlLang__fun_2313 (lang.ml:650)
==7089==  Address 0x8e5fd68 is 0 bytes after a block of size 8 alloc'd
==7089==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==7089==    by 0x4F529C: value_of_bus (gstreamer_stubs.c:517)
==7089==    by 0x4F529C: ocaml_gstreamer_bus_of_element (gstreamer_stubs.c:530)
==7089==    by 0x32C9F5: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:347)
==7089==    by 0x405389: camlRequest__fun_1727 (request.ml:348)
==7089==    by 0x4B2760: camlList__iter_1061 (list.ml:73)
==7089==    by 0x405B01: camlRequest__check_decodable_1295 (request.ml:345)
==7089==    by 0x4077B7: camlRequest__create_1373 (request.ml:496)
==7089==    by 0x3C17A6: camlReq_simple__fun_1436 (req_simple.ml:75)
==7089==    by 0x3D19D3: camlLang__f_1381 (lang.ml:408)
==7089==    by 0x3D1BE1: camlLang__f_1389 (lang.ml:419)
==7089==    by 0x3EEF59: camlLang_values__apply_1666 (lang_values.ml:971)
==7089==    by 0x3EFBA7: camlLang_values__eval_toplevel_1791 (lang_values.ml:1036)
==7089== 
==7089== Thread 9:
==7089== Invalid read of size 8
==7089==    at 0x50EBBC: caml_iterate_global_roots (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x50F032: caml_scan_global_young_roots (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x50E6D4: caml_oldify_local_roots (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x5114F7: caml_empty_minor_heap (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x5116A0: caml_minor_collection (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x512541: caml_alloc_string (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x514704: caml_create_string (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x4AC6A1: camlPervasives__$5e_1118 (pervasives.ml:179)
==7089==    by 0x4932FA: camlDtools__fun_2228 (dtools.ml:851)
==7089==    by 0x408F0C: camlDecoder__fun_1386 (decoder.ml:238)
==7089==    by 0x4B2760: camlList__iter_1061 (list.ml:73)
==7089==    by 0x409B04: camlDecoder__get_file_decoder_1202 (decoder.ml:226)
==7089==  Address 0x82f0578 is 0 bytes after a block of size 8 alloc'd
==7089==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==7089==    by 0x4F529C: value_of_bus (gstreamer_stubs.c:517)
==7089==    by 0x4F529C: ocaml_gstreamer_bus_of_element (gstreamer_stubs.c:530)
==7089==    by 0x32C9F5: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:347)
==7089==    by 0x405389: camlRequest__fun_1727 (request.ml:348)
==7089==    by 0x4B2760: camlList__iter_1061 (list.ml:73)
==7089==    by 0x405B01: camlRequest__check_decodable_1295 (request.ml:345)
==7089==    by 0x4077B7: camlRequest__create_1373 (request.ml:496)
==7089==    by 0x3C17A6: camlReq_simple__fun_1436 (req_simple.ml:75)
==7089==    by 0x3D19D3: camlLang__f_1381 (lang.ml:408)
==7089==    by 0x3D1BE1: camlLang__f_1389 (lang.ml:419)
==7089==    by 0x3EEF59: camlLang_values__apply_1666 (lang_values.ml:971)
==7089==    by 0x3EFBA7: camlLang_values__eval_toplevel_1791 (lang_values.ml:1036)
==7089== 
==7089== Invalid write of size 8
==7089==    at 0x5113A7: caml_oldify_one (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x50EBC0: caml_iterate_global_roots (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x50F032: caml_scan_global_young_roots (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x50E6D4: caml_oldify_local_roots (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x5114F7: caml_empty_minor_heap (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x5116A0: caml_minor_collection (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x512541: caml_alloc_string (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x514704: caml_create_string (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x4AC6A1: camlPervasives__$5e_1118 (pervasives.ml:179)
==7089==    by 0x4932FA: camlDtools__fun_2228 (dtools.ml:851)
==7089==    by 0x408F0C: camlDecoder__fun_1386 (decoder.ml:238)
==7089==    by 0x4B2760: camlList__iter_1061 (list.ml:73)
==7089==  Address 0x82f0578 is 0 bytes after a block of size 8 alloc'd
==7089==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==7089==    by 0x4F529C: value_of_bus (gstreamer_stubs.c:517)
==7089==    by 0x4F529C: ocaml_gstreamer_bus_of_element (gstreamer_stubs.c:530)
==7089==    by 0x32C9F5: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:347)
==7089==    by 0x405389: camlRequest__fun_1727 (request.ml:348)
==7089==    by 0x4B2760: camlList__iter_1061 (list.ml:73)
==7089==    by 0x405B01: camlRequest__check_decodable_1295 (request.ml:345)
==7089==    by 0x4077B7: camlRequest__create_1373 (request.ml:496)
==7089==    by 0x3C17A6: camlReq_simple__fun_1436 (req_simple.ml:75)
==7089==    by 0x3D19D3: camlLang__f_1381 (lang.ml:408)
==7089==    by 0x3D1BE1: camlLang__f_1389 (lang.ml:419)
==7089==    by 0x3EEF59: camlLang_values__apply_1666 (lang_values.ml:971)
==7089==    by 0x3EFBA7: camlLang_values__eval_toplevel_1791 (lang_values.ml:1036)
==7089== 

Memcheck: mc_malloc_wrappers.c:154 (release_oldest_block): Assertion 'VG_(free_queue_volume) >= 0' failed.

host stacktrace:
==7089==    at 0x38083828: show_sched_status_wrk (m_libcassert.c:343)
==7089==    by 0x38083944: report_and_quit (m_libcassert.c:419)
==7089==    by 0x38083AD1: vgPlain_assert_fail (m_libcassert.c:485)
==7089==    by 0x3804FA0B: release_oldest_block (mc_malloc_wrappers.c:154)
==7089==    by 0x3804FA0B: create_MC_Chunk (mc_malloc_wrappers.c:208)
==7089==    by 0x3804FB2B: vgMemCheck_new_block (mc_malloc_wrappers.c:366)
==7089==    by 0x3804FCA6: vgMemCheck_malloc (mc_malloc_wrappers.c:385)
==7089==    by 0x380D7B53: do_client_request (scheduler.c:1866)
==7089==    by 0x380D7B53: vgPlain_scheduler (scheduler.c:1425)
==7089==    by 0x380E6416: thread_wrapper (syswrap-linux.c:103)
==7089==    by 0x380E6416: run_a_thread_NORETURN (syswrap-linux.c:156)
==7089==    by 0x380E68DA: vgModuleLocal_start_thread_NORETURN (syswrap-linux.c:325)
==7089==    by 0x3810F44D: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)
==7089==    by 0xDEADBEEFDEADBEEE: ???
==7089==    by 0xDEADBEEFDEADBEEE: ???
==7089==    by 0xDEADBEEFDEADBEEE: ???

sched status:
  running_tid=9

Thread 1: status = VgTs_WaitSys (lwpid 7089)
==7089==    at 0x6641C77: do_sigwait (sigwait.c:64)
==7089==    by 0x6641CEC: sigwait (sigwait.c:96)
==7089==    by 0x5082A5: caml_wait_signal (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x4974EB: camlDtools__wait_signal_1306 (dtools.ml:527)
==7089==    by 0x497629: camlDtools__main_1314 (dtools.ml:567)
==7089==    by 0x4977D7: camlDtools__catch_1325 (dtools.ml:574)
==7089==    by 0x314A7C: camlMain__Make_1320 (main.ml:636)
==7089==    by 0x311806: camlRunner__entry (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x30ACB8: caml_program (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x5201BB: ??? (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x59F0165: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.5000.3)
==7089==    by 0xE72541E27FE2437C: ???

Thread 2: status = VgTs_WaitSys (lwpid 8045)
==7089==    at 0x6E3A229: syscall (syscall.S:38)
==7089==    by 0x5CC824E: g_cond_wait (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3)
==7089==    by 0x5759C0C: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1004.0)
==7089==    by 0x5CAADCD: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3)
==7089==    by 0x5CAA3D4: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3)
==7089==    by 0x6638493: start_thread (pthread_create.c:333)

Thread 3: status = VgTs_WaitSys (lwpid 8046)
==7089==    at 0x6E3A229: syscall (syscall.S:38)
==7089==    by 0x5CC824E: g_cond_wait (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3)
==7089==    by 0x5759C0C: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1004.0)
==7089==    by 0x5CAADCD: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3)
==7089==    by 0x5CAA3D4: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3)
==7089==    by 0x6638493: start_thread (pthread_create.c:333)

Thread 4: status = VgTs_WaitSys (lwpid 7148)
==7089==    at 0x6E373C3: ??? (syscall-template.S:84)
==7089==    by 0x50B678: unix_select (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x48DCD8: camlDuppy__f_1092 (duppy.ml:178)
==7089==    by 0x490013: camlDuppy__process_1083 (duppy.ml:201)
==7089==    by 0x49065F: camlDuppy__queue_1113 (duppy.ml:295)
==7089==    by 0x4200C1: camlTutils__queue_1261 (tutils.ml:213)
==7089==    by 0x41FA0D: camlTutils__fun_1485 (tutils.ml:136)
==7089==    by 0x4A4BB8: camlThread__fun_1084 (thread.ml:37)
==7089==    by 0x5201BB: ??? (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x7AC0D1F: ???
==7089==    by 0x663C1D0: __pthread_mutex_unlock_usercnt (pthread_mutex_unlock.c:55)
==7089==    by 0xDB6DF34: ??? (in /usr/lib/x86_64-linux-gnu/libavcodec.so.57.64.101)
==7089==    by 0x6638493: start_thread (pthread_create.c:333)

Thread 5: status = VgTs_WaitSys (lwpid 7149)
==7089==    at 0x6E373C3: ??? (syscall-template.S:84)
==7089==    by 0x50808B: caml_thread_tick (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x6638493: start_thread (pthread_create.c:333)

Thread 6: status = VgTs_WaitSys (lwpid 7150)
==7089==    at 0x663E15F: pthread_cond_wait@@GLIBC_2.3.2 (pthread_cond_wait.S:185)
==7089==    by 0x508A7F: caml_condition_wait (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x4906ED: camlDuppy__queue_1113 (duppy.ml:298)
==7089==    by 0x4200C1: camlTutils__queue_1261 (tutils.ml:213)
==7089==    by 0x41FA0D: camlTutils__fun_1485 (tutils.ml:136)
==7089==    by 0x4A4BB8: camlThread__fun_1084 (thread.ml:37)
==7089==    by 0x5201BB: ??? (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x7F931AF: ???
==7089==    by 0x663C1D0: __pthread_mutex_unlock_usercnt (pthread_mutex_unlock.c:55)
==7089==    by 0xDB6DF34: ??? (in /usr/lib/x86_64-linux-gnu/libavcodec.so.57.64.101)
==7089==    by 0x6638493: start_thread (pthread_create.c:333)

Thread 7: status = VgTs_WaitSys (lwpid 7151)
==7089==    at 0x663E15F: pthread_cond_wait@@GLIBC_2.3.2 (pthread_cond_wait.S:185)
==7089==    by 0x508A7F: caml_condition_wait (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x4906ED: camlDuppy__queue_1113 (duppy.ml:298)
==7089==    by 0x42007E: camlTutils__queue_1261 (tutils.ml:215)
==7089==    by 0x41FA0D: camlTutils__fun_1485 (tutils.ml:136)
==7089==    by 0x4A4BB8: camlThread__fun_1084 (thread.ml:37)
==7089==    by 0x5201BB: ??? (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x7F1184F: ???
==7089==    by 0x663C1D0: __pthread_mutex_unlock_usercnt (pthread_mutex_unlock.c:55)
==7089==    by 0xDB6DF34: ??? (in /usr/lib/x86_64-linux-gnu/libavcodec.so.57.64.101)
==7089==    by 0x6638493: start_thread (pthread_create.c:333)

Thread 8: status = VgTs_WaitSys (lwpid 7152)
==7089==    at 0x663E15F: pthread_cond_wait@@GLIBC_2.3.2 (pthread_cond_wait.S:185)
==7089==    by 0x508A7F: caml_condition_wait (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x4906ED: camlDuppy__queue_1113 (duppy.ml:298)
==7089==    by 0x42007E: camlTutils__queue_1261 (tutils.ml:215)
==7089==    by 0x41FA0D: camlTutils__fun_1485 (tutils.ml:136)
==7089==    by 0x4A4BB8: camlThread__fun_1084 (thread.ml:37)
==7089==    by 0x5201BB: ??? (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x770F65F: ???

Thread 9: status = VgTs_Runnable (lwpid 7153)
==7089==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==7089==    by 0x5C87E08: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3)
==7089==    by 0x5CA0342: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3)
==7089==    by 0x574BC02: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1004.0)
==7089==    by 0x574E4E8: gst_structure_new_id (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1004.0)
==7089==    by 0x571C53C: gst_message_new_state_changed (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1004.0)
==7089==    by 0x570E2D0: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1004.0)
==7089==    by 0x570F298: gst_element_continue_state (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1004.0)
==7089==    by 0x570EA15: gst_element_change_state (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1004.0)
==7089==    by 0x570EE9E: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1004.0)
==7089==    by 0x56ED1AC: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1004.0)
==7089==    by 0x9179377: ??? (in /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstplayback.so)
==7089==    by 0x570E72D: gst_element_change_state (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1004.0)
==7089==    by 0x570EE9E: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1004.0)
==7089==    by 0x56ED1AC: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1004.0)
==7089==    by 0x570E72D: gst_element_change_state (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1004.0)
==7089==    by 0x570EE9E: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1004.0)
==7089==    by 0x4F48E6: ocaml_gstreamer_element_set_state (gstreamer_stubs.c:224)
==7089==    by 0x32C9B3: camlGstreamer_decoder__get_tags_1587 (gstreamer_decoder.ml:364)
==7089==    by 0x405389: camlRequest__fun_1727 (request.ml:348)
==7089==    by 0x4B2760: camlList__iter_1061 (list.ml:73)
==7089==    by 0x405B01: camlRequest__check_decodable_1295 (request.ml:345)
==7089==    by 0x4077B7: camlRequest__create_1373 (request.ml:496)
==7089==    by 0x3BD513: camlPlaylist__get_uri_1284 (playlist.ml:357)
==7089==    by 0x3C3150: camlRequest_source__fun_1487 (request_source.ml:81)
==7089==    by 0x3C302C: camlRequest_source__fun_1526 (request_source.ml:120)
==7089==    by 0x38AAA5: camlSwitch__fun_1950 (switch.ml:438)
==7089==    by 0x4B2813: camlList__fold_left_1073 (list.ml:84)
==7089==    by 0x38B9F8: camlSwitch__fun_1942 (switch.ml:437)
==7089==    by 0x38B375: camlSwitch__fun_1702 (switch.ml:77)
==7089==    by 0x38B0DC: camlSwitch__fun_1758 (switch.ml:122)
==7089==    by 0x4B2FB5: camlList__find_1196 (list.ml:180)
==7089==    by 0x38B855: camlSwitch__fun_1919 (switch.ml:388)
==7089==    by 0x38B375: camlSwitch__fun_1702 (switch.ml:77)
==7089==    by 0x38B0DC: camlSwitch__fun_1758 (switch.ml:122)
==7089==    by 0x38AAA5: camlSwitch__fun_1950 (switch.ml:438)
==7089==    by 0x4B2813: camlList__fold_left_1073 (list.ml:84)
==7089==    by 0x38B9F8: camlSwitch__fun_1942 (switch.ml:437)
==7089==    by 0x38B375: camlSwitch__fun_1702 (switch.ml:77)
==7089==    by 0x38B0DC: camlSwitch__fun_1758 (switch.ml:122)
==7089==    by 0x4B2FB5: camlList__find_1196 (list.ml:180)
==7089==    by 0x38B855: camlSwitch__fun_1919 (switch.ml:388)
==7089==    by 0x38B375: camlSwitch__fun_1702 (switch.ml:77)
==7089==    by 0x38B0DC: camlSwitch__fun_1758 (switch.ml:122)
==7089==    by 0x39BDBE: camlOutput__fun_1525 (output.ml:132)
==7089==    by 0x3FFCB7: camlSource__fun_1907 (source.ml:388)
==7089==    by 0x3FA923: camlClock__fun_1833 (clock.ml:221)
==7089==    by 0x4B25D0: camlList__map_1040 (list.ml:55)
==7089==    by 0x3FB2C6: camlClock__fun_1813 (clock.ml:219)
==7089==    by 0x3FB9B8: camlClock__fun_1914 (clock.ml:386)
==7089==    by 0x3FD1F2: camlClock__fun_2017 (clock.ml:531)
==7089==    by 0x4B2760: camlList__iter_1061 (list.ml:73)
==7089==    by 0x3FDF8B: camlClock__collect_1409 (clock.ml:531)
==7089==    by 0x312DB2: camlMain__main_1300 (main.ml:613)
==7089==    by 0x494B4C: camlDtools__thread_1319 (dtools.ml:556)
==7089==    by 0x4A4BB8: camlThread__fun_1084 (thread.ml:37)
==7089==    by 0x5201BB: ??? (in /home/dreamer/.opam/system/bin/liquidsoap)
==7089==    by 0x770FFAF: ???

Thread 10: status = VgTs_WaitSys (lwpid 7372)
==7089==    at 0x6E3A229: syscall (syscall.S:38)
==7089==    by 0x5CC824E: g_cond_wait (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3)
==7089==    by 0x8F33513: ??? (in /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcoreelements.so)
==7089==    by 0x5759A20: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1004.0)
==7089==    by 0x5CAADCD: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3)
==7089==    by 0x5CAA3D4: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3)
==7089==    by 0x6638493: start_thread (pthread_create.c:333)

Thread 11: status = VgTs_WaitSys (lwpid 8047)
==7089==    at 0x6E3A229: syscall (syscall.S:38)
==7089==    by 0x5CC824E: g_cond_wait (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3)
==7089==    by 0x5759C0C: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1004.0)
==7089==    by 0x5CAADCD: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3)
==7089==    by 0x5CAA3D4: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3)
==7089==    by 0x6638493: start_thread (pthread_create.c:333)


Note: see also the FAQ in the source distribution.
It contains workarounds to several common problems.
In particular, if Valgrind aborted or crashed after
identifying problems in your program, there's a good chance
that fixing those problems will prevent Valgrind aborting or
crashing, especially if it happened in m_mallocfree.c.

If that doesn't help, please report this bug to: www.valgrind.org

In the bug report, send all the above text, the valgrind
version, and what OS and version you are using.  Thanks.

@dromer
Copy link
Contributor

dromer commented Jul 27, 2018

So was this at all useful @toots ?
Just let me know if I can do anything else.

@toots
Copy link
Member

toots commented Aug 5, 2018

Hey,

Could you try with the latest ocaml-gstreamer? I've made some changes that could very well solve this issue..

@dromer
Copy link
Contributor

dromer commented Aug 6, 2018

Ah, you didn't change the version number. Not sure if opam is installing the new ocaml-gstreamer now ..

@dromer
Copy link
Contributor

dromer commented Aug 6, 2018

So I tried an opam reinstall gstreamer (and also uninstall gstreamer followed by install), and how I can test is that on the telnet interface I run output(dot)gstreamer.skip and I still see the memory use increase steadily.

Maybe you have to up the version so opam picks it up?

@dromer
Copy link
Contributor

dromer commented Aug 6, 2018

Ok I manually installed the package with opam pin add gstreamer <path-to-repo> and reinstalled LS and everything.

Now LS uses 400MB memory and the threads are using almost no CPU. Seems your changes killed gstreamer intirely :(

(don't push this to opam please, at least the prev. version sort of works ;) )

@toots
Copy link
Member

toots commented Aug 6, 2018

Ok, try again now?

@dromer
Copy link
Contributor

dromer commented Aug 6, 2018

Ok it runs now, but still eats memory as I skip tracks in the playlist.

@toots
Copy link
Member

toots commented Aug 6, 2018

Can you confirm a longer term trend? When I skip I see memory spiking but then it goes back down.

@dromer
Copy link
Contributor

dromer commented Aug 6, 2018

Yes, left it running for a while and oomkiller came by to shoot it down :(

@toots
Copy link
Member

toots commented Aug 6, 2018

Ok, thanks for trying. Would you mind trying again with the latest changes?

@dromer
Copy link
Contributor

dromer commented Aug 17, 2018

Hmm, I just built and installed gstreamer 1.14.2 and LS crashes:

$ liquidsoap test.liq                                                   
2018/08/18 01:02:43 >>> LOG START                                                                        
2018/08/18 01:02:43 [main:3] Liquidsoap 1.3.3+scm                                                        
2018/08/18 01:02:43 [main:3] Using: bytes=[distributed with OCaml 4.02 or above] pcre=7.3.4 dtools=0.4.0 duppy=0.7.1 duppy.syntax=0.7.1 mm=0.4.0 dynlink=[distributed with Ocaml] gstreamer=0.3.0 camomile=1.0.1
2018/08/18 01:02:43 [main:2]                                                                                                                 
2018/08/18 01:02:43 [main:2] DISCLAIMER: This version of Liquidsoap has been        
2018/08/18 01:02:43 [main:2] compiled from a snapshot of the development code.        
2018/08/18 01:02:43 [main:2] As such, it should not be used in production          
2018/08/18 01:02:43 [main:2] unless you know what you are doing!
2018/08/18 01:02:43 [main:2]                                    
2018/08/18 01:02:43 [main:2] We are, however, very interested in any feedback
2018/08/18 01:02:43 [main:2] about our development code and committed to fix
2018/08/18 01:02:43 [main:2] issues as soon as possible.
2018/08/18 01:02:43 [main:2]                  
2018/08/18 01:02:43 [main:2] If you are interested in collaborating to
2018/08/18 01:02:43 [main:2] the development of Liquidsoap, feel free to
2018/08/18 01:02:43 [main:2] drop us a mail at <savonet-devl@lists.sf.net>
2018/08/18 01:02:43 [main:2] or to join the #savonet IRC channel on Freenode.
2018/08/18 01:02:43 [main:2]
2018/08/18 01:02:43 [main:2] Please send any bug report or feature request
2018/08/18 01:02:43 [main:2] at <https://github.com/savonet/liquidsoap/issues>.
2018/08/18 01:02:43 [main:2]
2018/08/18 01:02:43 [main:2] We hope you enjoy this snapshot build of Liquidsoap!
2018/08/18 01:02:43 [main:2]
2018/08/18 01:02:43 [gstreamer.loader:3] Loaded GStreamer 1.14.2 0
2018/08/18 01:02:43 [dynamic.loader:3] Could not find dynamic module for lame encoder.
2018/08/18 01:02:43 [dynamic.loader:3] Could not find dynamic module for fdkaac encoder.
2018/08/18 01:02:43 [decoder:3] Unable to decode "/media/radiharkolis/video/static.mp4" as {audio=2;video=1;midi=0}!
2018/08/18 01:02:43 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
2018/08/18 01:02:43 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
2018/08/18 01:02:43 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
2018/08/18 01:02:43 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
2018/08/18 01:02:43 [threads:3] Created thread "generic queue #1".
2018/08/18 01:02:43 [threads:3] Created thread "generic queue #2".
2018/08/18 01:02:43 [threads:3] Created thread "non-blocking queue #1".
2018/08/18 01:02:43 [threads:3] Created thread "non-blocking queue #2".
2018/08/18 01:02:43 [single_5851:3] "/media/radiharkolis/video/static.mp4" is static, resolving once for all...
2018/08/18 01:02:43 [clock.wallclock_gstreamer:2] Error when starting output(dot)gstreamer: Req_simple.Invalid_URI!
2018/08/18 01:02:43 [clock.wallclock_gstreamer:3] Raised at file "sources/req_simple.ml", line 37, characters 6-23
2018/08/18 01:02:43 [clock.wallclock_gstreamer:3] Called from file "source.ml", line 388, characters 6-18
2018/08/18 01:02:43 [clock.wallclock_gstreamer:3] Called from file "outputs/output.ml", line 130, characters 4-20
2018/08/18 01:02:43 [clock.wallclock_gstreamer:3] Called from file "source.ml", line 388, characters 6-18
2018/08/18 01:02:43 [clock.wallclock_gstreamer:3] Called from file "clock.ml", line 221, characters 15-26
2018/08/18 01:02:43 [output(dot)gstreamer:1] Got ill-balanced activations (from output(dot)gstreamer)!
2018/08/18 01:02:43 [clock:2] Error when leaving output output(dot)gstreamer: File "source.ml", line 414, characters 10-16: Assertion failed!
2018/08/18 01:02:43 [clock:3] Raised at file "source.ml", line 414, characters 10-22
2018/08/18 01:02:43 [clock:3] Called from file "source.ml", line 421, characters 30-58
2018/08/18 01:02:43 [clock:3] Called from file "clock.ml", line 79, characters 6-13
2018/08/18 01:02:43 [main:3] Shutdown started!
2018/08/18 01:02:43 [main:3] Waiting for threads to terminate...
2018/08/18 01:02:43 [main:3] Threads terminated.
2018/08/18 01:02:43 [threads:3] Shutting down scheduler...
2018/08/18 01:02:43 [threads:3] Scheduler shut down.
2018/08/18 01:02:43 [server:3] Closing socket.
2018/08/18 01:02:43 [threads:3] Thread "generic queue #1" terminated.
2018/08/18 01:02:43 [main:3] Cleaning downloaded files...
2018/08/18 01:02:43 [main:3] Freeing memory...
2018/08/18 01:02:43 >>> LOG END

@toots
Copy link
Member

toots commented Aug 19, 2018

You request probably cannot be resolved. Try using a playlist and report the logs you've got.

I'm happy to report that with the latest code it seems that memory usage is under control now. Release is imminent to any quick testing and report would be gladly received!

@dromer
Copy link
Contributor

dromer commented Aug 19, 2018

Is that with gstreamer 1.10.4 or 1.14.2 ?

btw I was missing a bunch of plugins and dependencies on my manual compile of 1.14.2 but even when all those where resolved I got:

...
2018/08/18 14:17:31 [output(dot)gstreamer:1] Got ill-balanced activations (from output(dot)gstreamer)!
2018/08/18 14:17:31 [clock:2] Error when leaving output output(dot)gstreamer: File "source.ml", line 414, characters 10-16: Assertion failed!
2018/08/18 14:17:31 [clock:3] Raised at file "source.ml", line 414, characters 10-22
2018/08/18 14:17:31 [clock:3] Called from file "source.ml", line 421, characters 30-58
2018/08/18 14:17:31 [clock:3] Called from file "clock.ml", line 79, characters 6-13
2018/08/18 14:17:31 [main:3] Shutdown started!
...

Also when using playlists.

@dromer
Copy link
Contributor

dromer commented Aug 19, 2018

(with latest current sources same result btw, except LS doesn't fully shut down and I have to kill -9 the process)

@toots
Copy link
Member

toots commented Aug 19, 2018

What's your test script?

@dromer
Copy link
Contributor

dromer commented Aug 19, 2018

This, which is like the minimum I want to be able to run (can of course make a more minimal version)

set("server.telnet.bind_addr", "127.0.0.1")
set("server.telnet.port", 1234)
set("server.telnet", true)

set("log.file.path", "/media/log/playvideo.log")

set("frame.video.width", 888)
set("frame.video.height", 480)
set("frame.video.samplerate", 25)

s = single("/media/video/static.mp4")

# the output
output.gstreamer.audio_video(
    video_pipeline=
        "videoconvert ! gdkpixbufoverlay location=/media/logo.png offset-x=768 offset-y=20 ! x264enc bitrate=2000 ! video/x-h264,profile=baseline ! queue ! mux.",
    audio_pipeline=
        "audioconvert ! voaacenc bitrate=44100 ! queue ! mux.",
    pipeline=
        "flvmux name=mux ! rtmpsink location=\"rtmp://10.0.0.105:1935/live/show live=1\"",
    s)

So are you now testing with stock debian stable gstreamer, or on debian unstable with 1.14.2 ?

@dromer
Copy link
Contributor

dromer commented Aug 19, 2018

Ok, I'm not trying (debian stable gstreamer) with your output stage (except with the rtmpsink) and it works!

So the only difference is the videoconvert and audioconvert parts.

The only thing is I cannot stop the thread with ctrl+c it says:

^C2018/08/19 15:53:16 [main:3] Shutdown started!
2018/08/19 15:53:16 [main:3] Waiting for threads to terminate...
2018/08/19 15:53:16 [threads:3] Shuting down thread wallclock_gstreamer
2018/08/19 15:53:16 [single_5861:3] Finished with "/media/test.mp4".
2018/08/19 15:53:16 [clock.wallclock_gstreamer:3] Streaming loop stopped.
2018/08/19 15:53:16 [threads:3] Thread "wallclock_gstreamer" terminated (0 remaining).
2018/08/19 15:53:16 [main:3] Threads terminated.
2018/08/19 15:53:16 [threads:3] Shutting down scheduler...
2018/08/19 15:53:16 [threads:3] Scheduler shut down.
2018/08/19 15:53:16 [threads:3] Thread "generic queue #1" terminated.
2018/08/19 15:53:16 [threads:3] Shutting down queues...

But then the process just keeps hanging. Have to kill -9 to get rid of it.

@toots
Copy link
Member

toots commented Aug 19, 2018

You need to update ocaml-duppy to fix this, these are changes I pushed yesterday :-)

Good news about the script. If I test yours it fails because there's no rtmp server to connect to. Gonna see if I can get a better logging for gstreamer.

Can you let it run for a while and report? Memory usage was definitely stable here.

@dromer
Copy link
Contributor

dromer commented Aug 19, 2018

Yes I have it running with my original playlists and queues. Will let in run for a while to see what happens to the memory :)

What I can tell so far is that when running output(dot)gstreamer.skip that the memory only changes per video (higher or lower), but doesn't actually keep climbing, so so far so good! :D

@dromer
Copy link
Contributor

dromer commented Aug 19, 2018

Can you try your test-script but with my videoconvert and audioconvert settings?

that's:

    video_pipeline=
        "videoconvert ! x264enc bitrate=2000 ! video/x-h264,profile=baseline ! queue ! mux.",
    audio_pipeline=
        "audioconvert ! voaacenc bitrate=44100 ! queue ! mux.",

@dromer
Copy link
Contributor

dromer commented Aug 19, 2018

ok not sure what happened but I'm no longer getting output from LS. process is still running and using memory. no cpu usage whatsoever.

can't do a ctrl+c either (I updated ocaml-duppy so this did work again)

@dromer
Copy link
Contributor

dromer commented Aug 19, 2018

Tried again and same result. After playing about 4 videos (maybe less than an hour total) LS becomes unresponsive.

(no memory leaks though ;) )

@toots
Copy link
Member

toots commented Aug 19, 2018

Any logs? Make sure you set set("log.level",5)

@toots
Copy link
Member

toots commented Aug 19, 2018

Ok, you might want to test again (I know!) with the latest code. I've made more changes to handle message bus differently. It still looks stable on my end (including with your code).

@dromer
Copy link
Contributor

dromer commented Aug 19, 2018

Ok it's running (updated all repos and submodules).

Lets see how long it lasts :D

@savonet-users
Copy link

savonet-users commented Aug 19, 2018 via email

@dromer
Copy link
Contributor

dromer commented Aug 19, 2018

It means that we're working on fixing a particular problem right now.

Hold your horses with your list of requests. There can be other reports on this.

@dromer
Copy link
Contributor

dromer commented Aug 20, 2018

@toots same result btw. after some time LS just sits idle and unresponsive.

Some log:

2018/08/20 01:50:41 [random(dot)pl:3] Finished with "/media/video/random/somevid.mp4".
2018/08/20 01:50:41 [decoder:3] Method "GSTREAMER" accepted "/media/video/random/anothervid.webm".
2018/08/20 01:50:41 [random(dot)pl:3] Prepared "/media/video/random/anothervid.webm" (RID 2).
2018/08/20 01:50:41 [rotate_5891:3] Switch to single_5872 with forgetful transition.
2018/08/20 01:50:41 [single_5872:3] Finished with "/media/video/static.mp4".
2018/08/20 01:50:41 [single_5872:3] Prepared "/media/video/static.mp4" (RID 0).
2018/08/20 01:50:41 [rotate_5891:3] Switch to fallback_5889 with forgetful transition.
2018/08/20 01:54:13 [random(dot)pl:3] Finished with "/media/video/random/anothervid.webm".

And when I ctrl+c it goes:

^C2018/08/20 02:30:05 [main:3] Shutdown started!
2018/08/20 02:30:05 [threads:3] Thread "gstreamer_main_loop" terminated (1 remaining).
2018/08/20 02:30:05 [main:3] Waiting for threads to terminate...
2018/08/20 02:30:05 [threads:3] Shuting down thread wallclock_gstreamer

After which I have to kill -9 the PID

@toots
Copy link
Member

toots commented Aug 20, 2018

Any more info with set("log.level",5)?

@dromer
Copy link
Contributor

dromer commented Aug 20, 2018

Ah yes sorry, will run again with this setting!

@dromer
Copy link
Contributor

dromer commented Aug 20, 2018

Hmm, even though the on-screen logging is much more verbose, there is nothing written to file ..
But also I don't see anything added to the log when this stale situation occurs. (it just says 'finished with ..')

Also the LS process does still respond, I can connect over telnet! it then says that a client connects or disconnects. However running ie. output(dot)gstreamer.skip has no effect whatsoever. So I guess it's particularly the gstreamer thread that got 'stuck' somehow?

@toots
Copy link
Member

toots commented Aug 20, 2018

Yeah that's what I'm thinking. I'd love to see those logs..

@dromer
Copy link
Contributor

dromer commented Aug 20, 2018

Well here's the tail of my LS output (don't feel like anonymizing the files :P)

As I said LS is no longer writing logfiles, but to stdout now (before it was quiet on stdout but wrote the logfiles). Is this a new config thing?

2018/08/20 12:56:45 [rotate_5891:3] Switch to single_5872 with forgetful transition.                                                              
2018/08/20 12:56:45 [fallback_5889:4] Activations changed: static=[], dynamic=[rotate_5891:fallback_5893:output(dot)gstreamer:output(dot)gstreamer].                                                                   
2018/08/20 12:56:45 [single_5872:4] Activations changed: static=[rotate_5891:fallback_5893:output(dot)gstreamer:output(dot)gstreamer], dynamic=[rotate_5891:fallback_5893:output(dot)gstreamer:output(dot)gstreamer].
2018/08/20 12:56:45 [decoder.gstreamer:5] [video_sink] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [audio_sink] State change: NULL -> READY 
2018/08/20 12:56:45 [decoder.gstreamer:5] [videorate73] State change: NULL -> READY    
2018/08/20 12:56:45 [decoder.gstreamer:5] [audioresample73] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [videoscale73] State change: NULL -> READY  
2018/08/20 12:56:45 [decoder.gstreamer:5] [audioconvert74] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [videoconvert74] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [queue42] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [queue43] State change: NULL -> READY 
2018/08/20 12:56:45 [decoder.gstreamer:5] [typefind] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [d] State change: NULL -> READY         
2018/08/20 12:56:45 [decoder.gstreamer:5] [filesrc179] State change: NULL -> READY                    
2018/08/20 12:56:45 [decoder.gstreamer:5] [pipeline180] State change: NULL -> READY (pending: PLAYING)
2018/08/20 12:56:45 [decoder.gstreamer:5] [videorate73] State change: READY -> PAUSED    
2018/08/20 12:56:45 [decoder.gstreamer:5] [audioresample73] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [videoscale73] State change: READY -> PAUSED  
2018/08/20 12:56:45 [decoder.gstreamer:5] [audioconvert74] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [videoconvert74] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [queue42] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [queue43] State change: READY -> PAUSED 
2018/08/20 12:56:45 [decoder.gstreamer:5] [typefind] State change: READY -> PAUSED  
2018/08/20 12:56:45 [decoder.gstreamer:5] [filesrc179] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [qtdemux54] State change: NULL -> READY   
2018/08/20 12:56:45 [decoder.gstreamer:5] [qtdemux54] State change: READY -> PAUSED  
2018/08/20 12:56:45 [decoder.gstreamer:5] [h264parse54] State change: NULL -> READY    
2018/08/20 12:56:45 [decoder.gstreamer:5] [h264parse54] State change: READY -> PAUSED   
2018/08/20 12:56:45 [decoder.gstreamer:5] [avdec_h264-54] State change: NULL -> READY     
2018/08/20 12:56:45 [decoder.gstreamer:5] [avdec_h264-54] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [aacparse54] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [aacparse54] State change: READY -> PAUSED  
2018/08/20 12:56:45 [decoder.gstreamer:5] [avdec_aac54] State change: NULL -> READY     
2018/08/20 12:56:45 [decoder.gstreamer:5] [avdec_aac54] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [d] State change: READY -> PAUSED         
2018/08/20 12:56:45 [decoder.gstreamer:5] [audio_sink] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [video_sink] State change: READY -> PAUSED                    
2018/08/20 12:56:45 [decoder.gstreamer:5] [pipeline180] State change: READY -> PAUSED (pending: PLAYING)
2018/08/20 12:56:45 [decoder.gstreamer:5] [video_sink] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [audio_sink] State change: PAUSED -> PLAYING 
2018/08/20 12:56:45 [decoder.gstreamer:5] [videorate73] State change: PAUSED -> PLAYING    
2018/08/20 12:56:45 [decoder.gstreamer:5] [audioresample73] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [videoscale73] State change: PAUSED -> PLAYING  
2018/08/20 12:56:45 [decoder.gstreamer:5] [audioconvert74] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [videoconvert74] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [queue42] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [queue43] State change: PAUSED -> PLAYING       
2018/08/20 12:56:45 [decoder.gstreamer:5] [avdec_aac54] State change: PAUSED -> PLAYING  
2018/08/20 12:56:45 [decoder.gstreamer:5] [aacparse54] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [avdec_h264-54] State change: PAUSED -> PLAYING   
2018/08/20 12:56:45 [decoder.gstreamer:5] [capsfilter55] State change: PAUSED -> PLAYING 
2018/08/20 12:56:45 [decoder.gstreamer:5] [h264parse54] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [multiqueue178] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [qtdemux54] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [typefind] State change: PAUSED -> PLAYING  
2018/08/20 12:56:45 [decoder.gstreamer:5] [d] State change: PAUSED -> PLAYING          
2018/08/20 12:56:45 [decoder.gstreamer:5] [filesrc179] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [pipeline180] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder:4] Decoding "/media/radiharkolis/video/static.mp4" ended: Gstreamer.End_of_stream.
2018/08/20 12:56:45 [single_5872:3] Finished with "/media/radiharkolis/video/static.mp4".                                                                                    
2018/08/20 12:56:45 [decoder.gstreamer:4] Using GStreamer 1.10.4.                                                                                             
2018/08/20 12:56:45 [decoder.gstreamer:5] Decode A/V: true/true.
2018/08/20 12:56:45 [decoder.gstreamer:5] Gstreamer pipeline: filesrc location="/media/radiharkolis/video/static.mp4" ! decodebin name=d d. ! queue ! audioconvert ! audioresample ! appsink max-buffers=10 drop=false sync=false name="audio_sin
k" caps="audio/x-raw,format=S16LE,layout=interleaved,channels=2,rate=44100" d. ! queue ! videoconvert ! videoscale add-borders=true ! videorate ! appsink name="video_sink" drop=false sync=false max-buffers=10 caps="video/x-raw,format=RGBA,wi
dth=888,height=480,framerate=25/1,pixel-aspect-ratio=1/1".
2018/08/20 12:56:45 [single_5872:3] Prepared "/media/radiharkolis/video/static.mp4" (RID 0).
2018/08/20 12:56:45 [rotate_5891:3] Switch to fallback_5889 with forgetful transition.
2018/08/20 12:56:45 [single_5872:4] Activations changed: static=[], dynamic=[rotate_5891:fallback_5893:output(dot)gstreamer:output(dot)gstreamer].
2018/08/20 12:56:45 [fallback_5889:4] Activations changed: static=[rotate_5891:fallback_5893:output(dot)gstreamer:output(dot)gstreamer], dynamic=[rotate_5891:fallback_5893:output(dot)gstreamer:output(dot)gstreamer].
2018/08/20 12:56:45 [decoder.gstreamer:5] [video_sink] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [audio_sink] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [videorate48] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [audioresample48] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [videoscale48] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [audioconvert48] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [videoconvert48] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [queue6] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [queue7] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [typefind] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [d] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [filesrc138] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [pipeline138] State change: NULL -> READY (pending: PLAYING)
2018/08/20 12:56:45 [decoder.gstreamer:5] [videorate48] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [audioresample48] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [videoscale48] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [audioconvert48] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [videoconvert48] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [queue6] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [queue7] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [typefind] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [filesrc138] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [avidemux30] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [avidemux30] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [mpeg4vparse30] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [mpeg4vparse30] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [mpegaudioparse30] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [mpegaudioparse30] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [mad30] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [mad30] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [avdec_mpeg4-30] State change: NULL -> READY
2018/08/20 12:56:45 [decoder.gstreamer:5] [avdec_mpeg4-30] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [d] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [audio_sink] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [video_sink] State change: READY -> PAUSED
2018/08/20 12:56:45 [decoder.gstreamer:5] [pipeline138] State change: READY -> PAUSED (pending: PLAYING)
2018/08/20 12:56:45 [decoder.gstreamer:5] [video_sink] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [audio_sink] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [videorate48] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [audioresample48] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [videoscale48] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [audioconvert48] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [videoconvert48] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [queue6] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [queue7] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [avdec_mpeg4-30] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [mpeg4vparse30] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [mad30] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [mpegaudioparse30] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [multiqueue179] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [avidemux30] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [typefind] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [d] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [filesrc138] State change: PAUSED -> PLAYING
2018/08/20 12:56:45 [decoder.gstreamer:5] [pipeline138] State change: PAUSED -> PLAYING
2018/08/20 12:56:50 [source:4] Garbage collected empty_5965.
2018/08/20 12:56:50 [source:4] Garbage collected empty_5964.
2018/08/20 12:56:50 [source:4] Garbage collected empty_5963.
2018/08/20 13:06:04 [decoder:4] Decoding "/media/radiharkolis/video/series/Look around you - series 1/look.around.you.module.5.-.sulphur.avi" ended: Gstreamer.End_of_stream.
2018/08/20 13:06:04 [lookaround1(dot)pl:3] Finished with "/media/radiharkolis/video/series/Look around you - series 1/look.around.you.module.5.-.sulphur.avi".
2018/08/20 13:39:10 [server:3] New client: 127.0.0.1.
2018/08/20 13:40:33 [server:4] Timeout reached while communicating to client 127.0.0.1.
2018/08/20 13:40:33 [server:3] Client 127.0.0.1 disconnected.
2018/08/20 13:40:41 [server:3] New client: 127.0.0.1.
2018/08/20 13:42:47 [server:4] Timeout reached while communicating to client 127.0.0.1.
2018/08/20 13:42:47 [server:3] Client 127.0.0.1 disconnected.

As you can see it responds to telnet clients, but none of the output(dot)gstreamer.* commands do anything. And I cannot normally stop LS from running.

This is with default gstreamer from debian stable.

@toots
Copy link
Member

toots commented Aug 20, 2018

Thanks! Would you mind sending me a gdb backtrace? You can attach to the running process:

% gdb
> attach <pid>
> thread apply all bt

Once I get this, I'll close this issue and open a new one with these info.
Thks!

@dromer
Copy link
Contributor

dromer commented Aug 20, 2018

Hmm, I get ptrace: Operation not permitted.

@toots
Copy link
Member

toots commented Aug 20, 2018

You prolly need to run it as root. Also, if you're inside docker you need special options:

docker --cap-add=SYS_PTRACE --security-opt seccomp=unconfined ...

@dromer
Copy link
Contributor

dromer commented Aug 20, 2018

Ok, coming up!

Thread 34 (Thread 0x7f9972ffd700 (LWP 19835)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f99d495a94e in ?? () from /usr/lib/x86_64-linux-gnu/libavcodec.so.57
#2  0x00007f99df4ec494 in start_thread (arg=0x7f9972ffd700) at pthread_create.c:333
#3  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 33 (Thread 0x7f99737fe700 (LWP 19834)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f99d495a94e in ?? () from /usr/lib/x86_64-linux-gnu/libavcodec.so.57
#2  0x00007f99df4ec494 in start_thread (arg=0x7f99737fe700) at pthread_create.c:333
#3  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 32 (Thread 0x7f9973fff700 (LWP 19833)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f99d495a94e in ?? () from /usr/lib/x86_64-linux-gnu/libavcodec.so.57
#2  0x00007f99df4ec494 in start_thread (arg=0x7f9973fff700) at pthread_create.c:333
#3  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 31 (Thread 0x7f9988b87700 (LWP 19832)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f99d495a94e in ?? () from /usr/lib/x86_64-linux-gnu/libavcodec.so.57
#2  0x00007f99df4ec494 in start_thread (arg=0x7f9988b87700) at pthread_create.c:333
#3  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 30 (Thread 0x7f99727fc700 (LWP 19831)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f99d495a94e in ?? () from /usr/lib/x86_64-linux-gnu/libavcodec.so.57
#2  0x00007f99df4ec494 in start_thread (arg=0x7f99727fc700) at pthread_create.c:333
#3  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 29 (Thread 0x7f9971ffb700 (LWP 19830)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f99d495a94e in ?? () from /usr/lib/x86_64-linux-gnu/libavcodec.so.57
#2  0x00007f99df4ec494 in start_thread (arg=0x7f9971ffb700) at pthread_create.c:333
#3  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 28 (Thread 0x7f99717fa700 (LWP 19829)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f99d495a94e in ?? () from /usr/lib/x86_64-linux-gnu/libavcodec.so.57
#2  0x00007f99df4ec494 in start_thread (arg=0x7f99717fa700) at pthread_create.c:333
#3  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 27 (Thread 0x7f9970ff9700 (LWP 19828)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f99d495a94e in ?? () from /usr/lib/x86_64-linux-gnu/libavcodec.so.57
#2  0x00007f99df4ec494 in start_thread (arg=0x7f9970ff9700) at pthread_create.c:333
#3  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 26 (Thread 0x7f99687f8700 (LWP 19473)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f99c54bf62d in ?? () from /usr/lib/x86_64-linux-gnu/libx264.so.148
#2  0x00007f99df4ec494 in start_thread (arg=0x7f99687f8700) at pthread_create.c:333
#3  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 25 (Thread 0x7f9968ff9700 (LWP 19472)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f99c54bfedb in ?? () from /usr/lib/x86_64-linux-gnu/libx264.so.148
#2  0x00007f99df4ec494 in start_thread (arg=0x7f9968ff9700) at pthread_create.c:333
#3  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 24 (Thread 0x7f99697fa700 (LWP 19471)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f99c54bfedb in ?? () from /usr/lib/x86_64-linux-gnu/libx264.so.148
#2  0x00007f99df4ec494 in start_thread (arg=0x7f99697fa700) at pthread_create.c:333
#3  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 23 (Thread 0x7f9969ffb700 (LWP 19470)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f99c54bfedb in ?? () from /usr/lib/x86_64-linux-gnu/libx264.so.148
#2  0x00007f99df4ec494 in start_thread (arg=0x7f9969ffb700) at pthread_create.c:333
#3  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 22 (Thread 0x7f996a7fc700 (LWP 19469)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f99c54bfedb in ?? () from /usr/lib/x86_64-linux-gnu/libx264.so.148
#2  0x00007f99df4ec494 in start_thread (arg=0x7f996a7fc700) at pthread_create.c:333
#3  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 21 (Thread 0x7f996affd700 (LWP 19468)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f99c54bfedb in ?? () from /usr/lib/x86_64-linux-gnu/libx264.so.148
#2  0x00007f99df4ec494 in start_thread (arg=0x7f996affd700) at pthread_create.c:333
#3  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 20 (Thread 0x7f996b7fe700 (LWP 19467)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f99c54bfedb in ?? () from /usr/lib/x86_64-linux-gnu/libx264.so.148
#2  0x00007f99df4ec494 in start_thread (arg=0x7f996b7fe700) at pthread_create.c:333
#3  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 19 (Thread 0x7f996bfff700 (LWP 19466)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f99e03f224f in g_cond_wait () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f99e096fc0d in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#3  0x00007f99e03d4dce in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f99e03d43d5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f99df4ec494 in start_thread (arg=0x7f996bfff700) at pthread_create.c:333
#6  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 18 (Thread 0x7f9989388700 (LWP 19457)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f99e03f224f in g_cond_wait () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f99e096fc0d in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#3  0x00007f99e03d4dce in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f99e03d43d5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f99df4ec494 in start_thread (arg=0x7f9989388700) at pthread_create.c:333
#6  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 17 (Thread 0x7f9989b89700 (LWP 19456)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f99e03f224f in g_cond_wait () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f99dff35372 in ?? () from /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#3  0x00007f99dff36690 in gst_data_queue_pop () from /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#4  0x00007f99ddef98df in ?? () from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcoreelements.so
#5  0x00007f99e096fa21 in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#6  0x00007f99e03d4dce in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007f99e03d43d5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007f99df4ec494 in start_thread (arg=0x7f9989b89700) at pthread_create.c:333
#9  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 16 (Thread 0x7f99ae5fa700 (LWP 19455)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f99e03f224f in g_cond_wait () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f99e096fc0d in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#3  0x00007f99e03d4dce in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f99e03d43d5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f99df4ec494 in start_thread (arg=0x7f99ae5fa700) at pthread_create.c:333
#6  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 15 (Thread 0x7f99addf9700 (LWP 19454)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f99e03f224f in g_cond_wait () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f99e015bd66 in ?? () from /usr/lib/x86_64-linux-gnu/libgstapp-1.0.so.0
#3  0x00007f99dff0ed14 in ?? () from /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#4  0x00007f99e093a837 in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#5  0x00007f99e093acfe in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#6  0x00007f99e093b110 in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#7  0x00007f99e0938cff in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#8  0x00007f99e0945061 in gst_pad_push_event () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#9  0x00007f99dff2a56d in ?? () from /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#10 0x00007f99e093a837 in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#11 0x00007f99e093acfe in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#12 0x00007f99e093b110 in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#13 0x00007f99e0938cff in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#14 0x00007f99e0945061 in gst_pad_push_event () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#15 0x00007f99dff2a56d in ?? () from /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#16 0x00007f99e093a837 in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#17 0x00007f99e093acfe in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#18 0x00007f99e093b110 in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#19 0x00007f99e0938cff in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#20 0x00007f99e0945061 in gst_pad_push_event () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#21 0x00007f99ddefed58 in ?? () from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcoreelements.so
#22 0x00007f99e096fa21 in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#23 0x00007f99e03d4dce in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007f99e03d43d5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007f99df4ec494 in start_thread (arg=0x7f99addf9700) at pthread_create.c:333
#26 0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 14 (Thread 0x7f998bfff700 (LWP 19453)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f99e03f224f in g_cond_wait () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f99dff35372 in ?? () from /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#3  0x00007f99dff36690 in gst_data_queue_pop () from /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#4  0x00007f99ddef98df in ?? () from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcoreelements.so
#5  0x00007f99e096fa21 in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#6  0x00007f99e03d4dce in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007f99e03d43d5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007f99df4ec494 in start_thread (arg=0x7f998bfff700) at pthread_create.c:333
#9  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 13 (Thread 0x7f998affd700 (LWP 19452)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f99e03f187c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f99dff1178c in ?? () from /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#3  0x00007f99e092472e in gst_element_change_state () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#4  0x00007f99e0924e9f in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#5  0x00007f99e09031ad in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#6  0x00007f99e094873a in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#7  0x00007f99e092472e in gst_element_change_state () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#8  0x00007f99e0924e9f in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#9  0x0000561d2dbd8acc in ocaml_gstreamer_element_set_state ()
#10 0x0000561d2d9fe682 in camlGstreamer_decoder__close_2318 () at gstreamer.ml:73
#11 0x0000561d2da9180c in camlRequest_source__fun_603134 () at sources/request_source.ml:67
#12 0x0000561d2dacfbd1 in camlSource__fun_3161 () at source.ml:521
#13 0x0000561d2da57db3 in camlSwitch__fun_702927 () at operators/switch.ml:204
#14 0x0000561d2dacfbd1 in camlSource__fun_3161 () at source.ml:521
#15 0x0000561d2da57db3 in camlSwitch__fun_702927 () at operators/switch.ml:204
#16 0x0000561d2dacfbd1 in camlSource__fun_3161 () at source.ml:521
#17 0x0000561d2da57db3 in camlSwitch__fun_702927 () at operators/switch.ml:204
#18 0x0000561d2dacfbd1 in camlSource__fun_3161 () at source.ml:521
#19 0x0000561d2da57db3 in camlSwitch__fun_702927 () at operators/switch.ml:204
#20 0x0000561d2dacfbd1 in camlSource__fun_3161 () at source.ml:521
#21 0x0000561d2da695d8 in camlOutput__fun_2830 () at outputs/output.ml:174
#22 0x0000561d2daccfac in camlClock__fun_1003317 () at clock.ml:160
#23 0x0000561d2db877b8 in camlStdlib__list__fold_left_1165 () at list.ml:117
#24 0x0000561d2dacb481 in camlClock__fun_1003270 () at clock.ml:158
#25 0x0000561d2dace429 in camlClock__loop_702568 () at clock.ml:374
#26 0x0000561d2dacbbdd in camlClock__fun_1003514 () at clock.ml:377
#27 0x0000561d2daf32a2 in camlTutils__fun_1002762 () at tools/tutils.ml:137
#28 0x0000561d2db79f69 in camlThread__fun_2005 () at thread.ml:39
#29 0x0000561d2dc11130 in caml_start_program ()
#30 0x0000561d2dbedf7c in caml_thread_start ()
#31 0x00007f99df4ec494 in start_thread (arg=0x7f998affd700) at pthread_create.c:333
#32 0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 12 (Thread 0x7f99aeffd700 (LWP 18476)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x0000561d2dbeebc1 in caml_condition_wait ()
#2  0x0000561d2daf434a in camlTutils__fun_1002906 () at tools/tutils.ml:318
#3  0x0000561d2daf2adc in camlTutils__mutexify_1007 () at tools/tutils.ml:80
#4  0x0000561d2db6b7e9 in camlDtools__thread_402530 () at dtools.ml:556
#5  0x0000561d2db79f69 in camlThread__fun_2005 () at thread.ml:39
#6  0x0000561d2dc11130 in caml_start_program ()
#7  0x0000561d2dbedf7c in caml_thread_start ()
#8  0x00007f99df4ec494 in start_thread (arg=0x7f99aeffd700) at pthread_create.c:333
#9  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 11 (Thread 0x7f99af7fe700 (LWP 18475)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x0000561d2dbeebc1 in caml_condition_wait ()
#2  0x0000561d2db621b6 in camlDuppy__queue_inner_603735 () at duppy.ml:330
#3  0x0000561d2daf384f in camlTutils__queue_302341 () at tools/tutils.ml:218
#4  0x0000561d2daf32a2 in camlTutils__fun_1002762 () at tools/tutils.ml:137
#5  0x0000561d2db79f69 in camlThread__fun_2005 () at thread.ml:39
#6  0x0000561d2dc11130 in caml_start_program ()
#7  0x0000561d2dbedf7c in caml_thread_start ()
#8  0x00007f99df4ec494 in start_thread (arg=0x7f99af7fe700) at pthread_create.c:333
#9  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 10 (Thread 0x7f99b616c700 (LWP 18474)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x0000561d2dbeebc1 in caml_condition_wait ()
#2  0x0000561d2db621b6 in camlDuppy__queue_inner_603735 () at duppy.ml:330
#3  0x0000561d2daf384f in camlTutils__queue_302341 () at tools/tutils.ml:218
#4  0x0000561d2daf32a2 in camlTutils__fun_1002762 () at tools/tutils.ml:137
#5  0x0000561d2db79f69 in camlThread__fun_2005 () at thread.ml:39
#6  0x0000561d2dc11130 in caml_start_program ()
#7  0x0000561d2dbedf7c in caml_thread_start ()
#8  0x00007f99df4ec494 in start_thread (arg=0x7f99b616c700) at pthread_create.c:333
#9  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 9 (Thread 0x7f99b84fa700 (LWP 18473)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x0000561d2dbeebc1 in caml_condition_wait ()
#2  0x0000561d2db621b6 in camlDuppy__queue_inner_603735 () at duppy.ml:330
#3  0x0000561d2daf3892 in camlTutils__queue_302341 () at tools/tutils.ml:216
#4  0x0000561d2daf32a2 in camlTutils__fun_1002762 () at tools/tutils.ml:137
#5  0x0000561d2db79f69 in camlThread__fun_2005 () at thread.ml:39
#6  0x0000561d2dc11130 in caml_start_program ()
#7  0x0000561d2dbedf7c in caml_thread_start ()
#8  0x00007f99df4ec494 in start_thread (arg=0x7f99b84fa700) at pthread_create.c:333
#9  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 8 (Thread 0x7f99b7cf9700 (LWP 18472)):
#0  0x00007f99df02167d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x0000561d2dbeac74 in caml_poll (_read=<optimized out>, _write=<optimized out>, _err=<optimized out>, _timeout=<optimized out>) at duppy_stubs.c:95
#2  0x0000561d2db608f0 in camlDuppy__poll_1215 () at duppy.ml:32
#3  0x0000561d2db61a54 in camlDuppy__f_1540 () at duppy.ml:200
#4  0x0000561d2db61594 in camlDuppy__process_1531 () at duppy.ml:220
#5  0x0000561d2db62127 in camlDuppy__queue_inner_603735 () at duppy.ml:314
#6  0x0000561d2daf3892 in camlTutils__queue_302341 () at tools/tutils.ml:216
#7  0x0000561d2daf32a2 in camlTutils__fun_1002762 () at tools/tutils.ml:137
#8  0x0000561d2db79f69 in camlThread__fun_2005 () at thread.ml:39
#9  0x0000561d2dc11130 in caml_start_program ()
#10 0x0000561d2dbedf7c in caml_thread_start ()
#11 0x00007f99df4ec494 in start_thread (arg=0x7f99b7cf9700) at pthread_create.c:333
#12 0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 7 (Thread 0x7f99b54f4700 (LWP 18471)):
#0  0x00007f99df0233c3 in select () at ../sysdeps/unix/syscall-template.S:84
#1  0x0000561d2dbedb81 in caml_thread_tick ()
#2  0x00007f99df4ec494 in start_thread (arg=0x7f99b54f4700) at pthread_create.c:333
#3  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 6 (Thread 0x7f99affff700 (LWP 18470)):
#0  0x00007f99df02167d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f99e03ac9f6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f99e03acd82 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x0000561d2dbd9dc8 in ocaml_gstreamer_loop_run ()
#4  0x0000561d2dadd504 in camlGstreamer_utils__main_101718 () at gstreamer.ml:228
#5  0x0000561d2daf32a2 in camlTutils__fun_1002762 () at tools/tutils.ml:137
#6  0x0000561d2db79f69 in camlThread__fun_2005 () at thread.ml:39
#7  0x0000561d2dc11130 in caml_start_program ()
#8  0x0000561d2dbedf7c in caml_thread_start ()
#9  0x00007f99df4ec494 in start_thread (arg=0x7f99affff700) at pthread_create.c:333
#10 0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 5 (Thread 0x7f99b4cab700 (LWP 18429)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f99e03f224f in g_cond_wait () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f99e01583a5 in ?? () from /usr/lib/x86_64-linux-gnu/libgstapp-1.0.so.0
#3  0x00007f99dff1f66f in ?? () from /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#4  0x00007f99dff2101f in ?? () from /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#5  0x00007f99e096fa21 in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#6  0x00007f99e03d4dce in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007f99e03d43d5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007f99df4ec494 in start_thread (arg=0x7f99b4cab700) at pthread_create.c:333
#9  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 4 (Thread 0x7f99d715b700 (LWP 18420)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f99e03f224f in g_cond_wait () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f99e01583a5 in ?? () from /usr/lib/x86_64-linux-gnu/libgstapp-1.0.so.0
#3  0x00007f99dff1f66f in ?? () from /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#4  0x00007f99dff2101f in ?? () from /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#5  0x00007f99e096fa21 in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#6  0x00007f99e03d4dce in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007f99e03d4dce in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#7  0x00007f99e03d43d5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007f99df4ec494 in start_thread (arg=0x7f99d715b700) at pthread_create.c:333
#9  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 3 (Thread 0x7f99d795c700 (LWP 18419)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f99e03f224f in g_cond_wait () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f99dff33023 in ?? () from /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#3  0x00007f99e093baf7 in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#4  0x00007f99e0943c92 in gst_pad_push () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#5  0x00007f99ddefebae in ?? () from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcoreelements.so
#6  0x00007f99e096fa21 in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#7  0x00007f99e03d4dce in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007f99e03d43d5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x00007f99df4ec494 in start_thread (arg=0x7f99d795c700) at pthread_create.c:333
#10 0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 2 (Thread 0x7f99dca3c700 (LWP 18418)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f99e03f224f in g_cond_wait () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f99ddefe23d in ?? () from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcoreelements.so
#3  0x00007f99e096fa21 in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#4  0x00007f99e03d4dce in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f99e03d43d5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007f99df4ec494 in start_thread (arg=0x7f99dca3c700) at pthread_create.c:333
#7  0x00007f99df02aacf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 1 (Thread 0x7f99e10bc5c0 (LWP 18417)):
#0  do_sigwait (set=<optimized out>, set@entry=0x7ffcb43eaa40, sig=sig@entry=0x7ffcb43eaa3c) at ../sysdeps/unix/sysv/linux/sigwait.c:64
#1  0x00007f99df4f5ced in __sigwait (set=0x7ffcb43eaa40, sig=0x7ffcb43eaa3c) at ../sysdeps/unix/sysv/linux/sigwait.c:96
#2  0x0000561d2dbee337 in caml_wait_signal ()
#3  0x0000561d2db6b4b0 in camlDtools__wait_signal_302274 () at dtools.ml:527
#4  0x0000561d2db6b5f6 in camlDtools__main_402525 () at dtools.ml:567
#5  0x0000561d2db6b8f8 in camlDtools__catch_402537 () at dtools.ml:574
#6  0x0000561d2d9e54d9 in camlMain__Make_302197 () at main.ml:657
#7  0x0000561d2d9e2bc0 in camlRunner__entry () at runner.ml:30
#8  0x0000561d2d9dbda9 in caml_program ()
#9  0x0000561d2dc11130 in caml_start_program ()
#10 0x0000561d2dbf5495 in caml_startup_common (argv=0x7ffcb43ead48, pooling=<optimized out>, pooling@entry=0) at startup.c:157
#11 0x0000561d2dbf54eb in caml_startup_exn (argv=<optimized out>) at startup.c:162
#12 caml_startup (argv=<optimized out>) at startup.c:167
#13 0x0000561d2d9daa1c in main (argc=<optimized out>, argv=<optimized out>) at main.c:44

@toots
Copy link
Member

toots commented Aug 20, 2018

Ok, awesome, thks! Gonna close this one and re-open. You might want to install the libgstreamer1.0-0-dbg package, this would allow gdb to also show the code lines where these are coming from.

@toots toots closed this as completed Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants