#2628(undetermined:new): when fifo_size is set , memory leaks
#2628: when fifo_size is set , memory leaks -------------------------------------+------------------------------------- Reporter: baituxp | Type: defect Status: new | Priority: normal Component: | Version: 1.2.1 undetermined | Blocked By: Keywords: fifo_size, | Reproduced by developer: 0 memory leak | Blocking: | Analyzed by developer: 1 | -------------------------------------+------------------------------------- Summary of the bug: How to reproduce: {{{ % ./ffmpeg -i 'udp://239.9.9.9:10001?fifo_size=10000000&overrun_nonfatal=1' -b:v 4096k -s "720*576" -vcodec libx264 -r 25 -x264opts vbv-bufsize=163:bitrate=4096 :vbv-maxrate=4096:nal-hrd=cbr -f mpegts udp://10.9.211.4:10023 ffmpeg 1.1.1 linux 5.3 }}} I test this using other ffmpeg versions, it occurs every times. fifo_size is set to a value, such as 10000000, the main memory runs out 30M every minitues. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2628> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#2628: when fifo_size is set , memory leaks -------------------------------------+------------------------------------- Reporter: baituxp | Owner: Type: defect | Status: new Priority: normal | Component: Version: 1.2.1 | undetermined Keywords: fifo_size, | Resolution: memory leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | -------------------------------------+------------------------------------- Comment (by baituxp): by the way , 239.9.9.9:10001 is a mpeg2 ts stream with 8M -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2628#comment:1> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#2628: when fifo_size is set , memory leaks -------------------------------------+------------------------------------- Reporter: baituxp | Owner: Type: defect | Status: new Priority: normal | Component: Version: 1.2.1 | undetermined Keywords: fifo_size, | Resolution: memory leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | -------------------------------------+------------------------------------- Comment (by cehoyos): Is this also reproducible with current git head? Please add valgrind output for memleak reports and please add complete, uncut console output to make this a valid ticket. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2628#comment:2> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#2628: when fifo_size is set , memory leaks ---------------------------------+---------------------------------------- Reporter: baituxp | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: 1.2.1 | Resolution: Keywords: leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+---------------------------------------- Changes (by cehoyos): * keywords: fifo_size, memory leak => leak -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2628#comment:3> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#2628: when fifo_size is set , memory leaks ---------------------------------+---------------------------------------- Reporter: baituxp | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: 1.2.1 | Resolution: Keywords: leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+---------------------------------------- Comment (by baituxp): I test it in ffmpeg 1.2.1, the newest version. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2628#comment:4> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#2628: when fifo_size is set , memory leaks ---------------------------------+---------------------------------------- Reporter: baituxp | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: 1.2.1 | Resolution: Keywords: leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+---------------------------------------- Comment (by cehoyos): Please test current git head (the recommended version if you are a user), and please add valgrind output for memleak reports. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2628#comment:5> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#2628: when fifo_size is set , memory leaks ---------------------------------+---------------------------------------- Reporter: baituxp | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: 1.2.1 | Resolution: Keywords: leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+---------------------------------------- Comment (by baituxp): I attached a screen output picture. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2628#comment:6> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#2628: when fifo_size is set , memory leaks ---------------------------------+---------------------------------------- Reporter: baituxp | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: 1.2.1 | Resolution: Keywords: leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+---------------------------------------- Comment (by cehoyos): Unfortunately, free cannot be used to detect memleaks, I suspect you can try Dr. Memory on Windows. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2628#comment:7> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#2628: when fifo_size is set , memory leaks ---------------------------------+---------------------------------------- Reporter: baituxp | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: 1.2.1 | Resolution: Keywords: leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+---------------------------------------- Comment (by baituxp): hello, maybe free command does not track the owner of the lost memory , but , I am sure, because the memory changes to 0 in the end, and the machine does not respond keyboard or mouse event. the experiments can be repeated. my ffmpeg runs in linux, not in windows. no Dr. memory at hand...... -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2628#comment:8> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#2628: when fifo_size is set , memory leaks ---------------------------------+---------------------------------------- Reporter: baituxp | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: 1.2.1 | Resolution: Keywords: leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+---------------------------------------- Comment (by cehoyos): Please use valgrind on Linux to confirm memory leaks. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2628#comment:9> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#2628: when fifo_size is set , memory leaks ---------------------------------+---------------------------------------- Reporter: baituxp | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: 1.2.1 | Resolution: Keywords: leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+---------------------------------------- Comment (by baituxp): I use valgrind , the output is in the attachment set. unfortunately, when I run ffmpeg in valgrind context, ffmpeg does not perform well, and it terminates after running for several minitues. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2628#comment:10> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#2628: when fifo_size is set , memory leaks ---------------------------------+---------------------------------------- Reporter: baituxp | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: 1.2.1 | Resolution: Keywords: leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+---------------------------------------- Comment (by cehoyos): Sorry if I was unclear yesterday: Please do not attach screenshots, this never helpful! (There are exceptions but this ticket is not one of them.) Instead, please run valgrind for less than a minute, press "q" to quit and post everything that valgrind outputs (that is the complete, uncut console output of valgrind which contains the complete, uncut console output of ffmpeg) here. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2628#comment:11> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#2628: when fifo_size is set , memory leaks ---------------------------------+---------------------------------------- Reporter: baituxp | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: 1.2.1 | Resolution: Keywords: leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+---------------------------------------- Comment (by baituxp): hi, where is cehoyos? -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2628#comment:13> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#2628: when fifo_size is set , memory leaks ---------------------------------+---------------------------------------- Reporter: baituxp | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: 1.2.1 | Resolution: Keywords: leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+---------------------------------------- Comment (by cehoyos): Is your original problem (without valgrind) also reproducible if you do not use network output (ie if you either output to a file or to {{{-f null -}}})? Is your original problem (without valgrind) also reproducible if you don't use an external library (ie with {{{-vcodec mpeg4}}} or {{{-vcodec mpeg2video}}} instead of {{{-vcodec libx264}}})? Using external libraries makes reproducing problems much more difficult. Am I correct that your original problem is only reproducible with network input but not if you use file input (but x264 for encoding and udp output)? -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2628#comment:14> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#2628: when fifo_size is set , memory leaks ---------------------------------+---------------------------------------- Reporter: baituxp | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: 1.2.1 | Resolution: Keywords: leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+---------------------------------------- Comment (by baituxp): I have tested 4 cases: 1, encoding : x264, output : network, memory leak: 60M/min, 2, encoding : x264, output : null -, memory leak: 60M/min, 3, encoding : mpegvideo, output : network, memory leak: 60M/min, 4, encoding : mpegvideo, output : null - , memory leak: 27M/min, so, I think the memory leak exists in the input part of the ffmpeg. 5. whats more, I guess the memory leak is caused by the exception handling of the input part . because we find that if the input video stream is "good"( "good" means no error messages output on the ffmpeg screen when ffmpeg is used to transcode a realtime ts stream), the memory does not leak, however, if the input video stream is "bad" ( "bad" means many error messages is printed on the screen ... ), the memory leaks very fast. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2628#comment:15> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
if the input video stream is "bad" ( "bad" means many error messages is
#2628: when fifo_size is set , memory leaks ---------------------------------+---------------------------------------- Reporter: baituxp | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: 1.2.1 | Resolution: Keywords: leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+---------------------------------------- Comment (by cehoyos): Replying to [comment:15 baituxp]: printed on the screen ... ), the memory leaks very fast. Then please test the following command line for a few seconds and post the complete, uncut console output: {{{$ valgrind ./ffmpeg_g -i 'udp://239.9.9.9:10001?fifo_size=10000000&overrun_nonfatal=1' -f null -}}} -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2628#comment:16> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#2628: when fifo_size is set , memory leaks ---------------------------------+---------------------------------------- Reporter: baituxp | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: 1.2.1 | Resolution: Keywords: leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+---------------------------------------- Comment (by michael): Replying to [comment:12 baituxp]:
==4076== Memcheck, a memory error detector. ==4076== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al. ==4076== Using LibVEX rev 1658, a library for dynamic binary
==4076== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. ==4076== Using valgrind-3.2.1, a dynamic binary instrumentation
translation. framework.
==4076== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. ==4076== For more details, rerun with: -v
this valgrind version is 7 years old, thats not usefull at all -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2628#comment:17> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#2628: when fifo_size is set alot of memory is allocated ---------------------------------+---------------------------------------- Reporter: baituxp | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: 1.2.1 | Resolution: Keywords: leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+---------------------------------------- Comment (by michael): Correct title, theres no evidence for a memleak at this point -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2628#comment:18> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#2628: when fifo_size is set alot of memory is allocated ---------------------------------+---------------------------------------- Reporter: baituxp | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: 1.2.1 | Resolution: Keywords: leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+---------------------------------------- Comment (by michael): As it seems only you can reproduce the bug (others dont have the udp stream). Please run the testcase under a modern valgrind with --track- origins=yes --leak-check=full. If no leaks are found run it under valgrinds massif, it can show what causes excessive allocations when they arnt technically leaks -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2628#comment:19> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#2628: when fifo_size is set alot of memory is allocated -------------------------------------+------------------------------------- Reporter: baituxp | Owner: Type: defect | Status: closed Priority: normal | Component: Version: 1.2.1 | undetermined Keywords: leak | Resolution: Blocking: | needs_more_info Analyzed by developer: 0 | Blocked By: | Reproduced by developer: 0 -------------------------------------+------------------------------------- Changes (by cehoyos): * analyzed: 1 => 0 * status: new => closed * resolution: => needs_more_info Comment: Please reopen this ticket if you can provide the missing information. -- Ticket URL: <https://trac.ffmpeg.org/ticket/2628#comment:20> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg