[ 
http://dev.sourcefabric.org/browse/LS-636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Samuel Mimram updated LS-636:
-----------------------------

    Attachment: vid.valgrind.zip

I've attached two valgrind outputs. With and without Gc.full_major at the end. 
With full_major almost all memory is freed, so there is no memory leak. 
Without, here are the three first memory consumers:

==5441== 13,224,960 bytes in 14 blocks are possibly lost in loss record 1,176 
of 1,178
==5441==    at 0x4C28BED: malloc (vg_replace_malloc.c:263)
==5441==    by 0x7DAECC: caml_ba_alloc (in 
/home/smimram/prog/savonet/liquidsoap/src/liquidsoap)
==5441==    by 0x7BB268: ocaml_theora_decode_YUVout (theora_stubs.c:274)
==5441==    by 0x7F8A0F: ??? (in 
/home/smimram/prog/savonet/liquidsoap/src/liquidsoap)
==5441==    by 0x16A572C7: ???
==5441==    by 0x1680000027F: ???
==5441==    by 0x28F: ???
==5441==    by 0x16A93647: ???
==5441==    by 0x77064F: camlHashtbl__iter_1129 (in 
/home/smimram/prog/savonet/liquidsoap/src/liquidsoap)
==5441==    by 0x16186827: ???
==5441==    by 0x1A7BE83F: ???
==5441==    by 0x66F6C4: camlOgg_demuxer_theora_decoder__decode_1047 (in 
/home/smimram/prog/savonet/liquidsoap/src/liquidsoap)
==5441== 
==5441== 15,360,000 bytes in 50 blocks are possibly lost in loss record 1,177 
of 1,178
==5441==    at 0x4C270FE: memalign (vg_replace_malloc.c:694)
==5441==    by 0x7C8A1B: caml_rgb_aligned_plane (image_c.c:113)
==5441==    by 0x7F8A0F: ??? (in 
/home/smimram/prog/savonet/liquidsoap/src/liquidsoap)
==5441==    by 0x54F1FE: camlOgg_decoder__fun_1533 (in 
/home/smimram/prog/savonet/liquidsoap/src/liquidsoap)
==5441==    by 0x280: ???
==5441==    by 0x12660A8F: ???
==5441==    by 0x1617A007: ???
==5441== 
==5441== 53,452,800 bytes in 174 blocks are possibly lost in loss record 1,178 
of 1,178
==5441==    at 0x4C270FE: memalign (vg_replace_malloc.c:694)
==5441==    by 0x7C8A1B: caml_rgb_aligned_plane (image_c.c:113)
==5441==    by 0x7F8A0F: ??? (in 
/home/smimram/prog/savonet/liquidsoap/src/liquidsoap)
==5441==    by 0x54F1FE: camlOgg_decoder__fun_1533 (in 
/home/smimram/prog/savonet/liquidsoap/src/liquidsoap)
==5441==    by 0x280: ???
==5441==    by 0x12661F47: ???
==5441==    by 0x1617A007: ???

The big last one is generated by decoding of files: images are decoded to an 
image created with

let rgb = Img.create width height in

which calls caml_rgb_aligned_plane.

> Memory leak with theora decoding
> --------------------------------
>
>                 Key: LS-636
>                 URL: http://dev.sourcefabric.org/browse/LS-636
>             Project: Liquidsoap
>          Issue Type: Bug
>            Reporter: Samuel Mimram
>            Priority: Major
>         Attachments: vid.valgrind.zip
>
>
> As reported on the ML ( 
> http://www.mail-archive.com/[email protected]/msg06966.html 
> ), the following script makes the memory used by Liq grow linearly (memory 
> leak highly suspected...).
> set("frame.video.channels",2)
> set("frame.audio.samplerate",48000)
> set("frame.video.width",320)
> set("frame.video.height",240)
> set("frame.video.samplerate",25)
> s = single("big_buck_bunny_720p_stereo.ogg")
> s = mksafe(s)
> output.sdl(drop_audio(s))
> The video used above can be found here: 
> http://www.bigbuckbunny.org/index.php/download/
> I'll try to investigate that soon...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://dev.sourcefabric.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Savonet-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-devl

Répondre à