* dsnoop memory leak
[not found] <732607619.94502.1370008560183.JavaMail.root@telum.ru>
@ 2013-05-31 13:58 ` Иван Больсунов
2013-06-04 14:02 ` Jaroslav Kysela
0 siblings, 1 reply; 3+ messages in thread
From: Иван Больсунов @ 2013-05-31 13:58 UTC (permalink / raw)
To: alsa-devel
Since alsa bug tracker does not work for me for weeks, I have to report bug here. Sorry if it a wrong place.
So, to reproduce memory leak (Alsa lib used v.1.0.27), you have to use next asound.conf:
pcm_slave.myslave
{
pcm "hw:0,0"
}
pcm.mysnoop
{
type dsnoop
ipc_key 1024
slave myslave
}
Then you simply do:
snd_pcm_open(&pcm_handle, "mysnoop", SND_PCM_STREAM_CAPTURE, SND_PCM_NONBLOCK);
snd_pcm_close(pcm_handle);
snd_config_update_free_global();
Valgrind will show something like this:
==7889==
==7889== HEAP SUMMARY:
==7889== in use at exit: 15,854 bytes in 871 blocks
==7889== total heap usage: 333,212 allocs, 332,341 frees, 11,695,490 bytes allocated
==7889==
==7889== 15,834 (6,264 direct, 9,570 indirect) bytes in 174 blocks are definitely lost in loss record 6 of 6
==7889== at 0x4027CBF: calloc (vg_replace_malloc.c:566)
==7889== by 0x406B416: _snd_config_make (in /usr/lib/libasound.so.2.0.0)
==7889== by 0x406C69C: snd_config_make (in /usr/lib/libasound.so.2.0.0)
==7889== by 0x406C861: snd_config_make_compound (in /usr/lib/libasound.so.2.0.0)
==7889== by 0x406D00C: _snd_config_copy (in /usr/lib/libasound.so.2.0.0)
==7889== by 0x406F112: snd_config_walk (in /usr/lib/libasound.so.2.0.0)
==7889== by 0x406FE04: snd_config_copy (in /usr/lib/libasound.so.2.0.0)
==7889== by 0x4070370: snd_config_expand (in /usr/lib/libasound.so.2.0.0)
==7889== by 0x407107E: snd_config_search_definition (in /usr/lib/libasound.so.2.0.0)
==7889== by 0x40D2C22: _snd_pcm_direct_get_slave_ipc_offset (in /usr/lib/libasound.so.2.0.0)
==7889== by 0x40D68A2: snd1_pcm_direct_parse_open_conf (in /usr/lib/libasound.so.2.0.0)
==7889== by 0x40D28CA: _snd_pcm_dsnoop_open (in /usr/lib/libasound.so.2.0.0)
==7889== by 0x40909C4: snd_pcm_open_conf (in /usr/lib/libasound.so.2.0.0)
==7889== by 0x4091036: snd_pcm_open_noupdate (in /usr/lib/libasound.so.2.0.0)
==7889== by 0x804873D: main (in /home/blah/al/a.out)
==7889==
==7889== LEAK SUMMARY:
==7889== definitely lost: 6,264 bytes in 174 blocks
==7889== indirectly lost: 9,570 bytes in 696 blocks
==7889== possibly lost: 0 bytes in 0 blocks
==7889== still reachable: 20 bytes in 1 blocks
==7889== suppressed: 0 bytes in 0 blocks
==7889== Reachable blocks (those to which a pointer was found) are not shown.
==7889== To see them, rerun with: --leak-check=full --show-reachable=yes
==7889==
==7889== For counts of detected and suppressed errors, rerun with: -v
==7889== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
^ permalink raw reply [flat|nested] 3+ messages in thread
* dsnoop memory leak
[not found] <370949076.4726.1370352588794.JavaMail.root@telum.ru>
@ 2013-06-04 13:33 ` Ivan Bolsunov
0 siblings, 0 replies; 3+ messages in thread
From: Ivan Bolsunov @ 2013-06-04 13:33 UTC (permalink / raw)
To: alsa-devel
Hi guys, on may 31 I sent message, can you at least confirm what bug exist?
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: dsnoop memory leak
2013-05-31 13:58 ` dsnoop memory leak Иван Больсунов
@ 2013-06-04 14:02 ` Jaroslav Kysela
0 siblings, 0 replies; 3+ messages in thread
From: Jaroslav Kysela @ 2013-06-04 14:02 UTC (permalink / raw)
To: Иван Больсунов
Cc: alsa-devel
Date 31.5.2013 15:58, Иван Больсунов wrote:
> ==7889== by 0x407107E: snd_config_search_definition (in /usr/lib/libasound.so.2.0.0)
> ==7889== by 0x40D2C22: _snd_pcm_direct_get_slave_ipc_offset (in /usr/lib/libasound.so.2.0.0)
I fixed this issue in this commit:
http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=ca487c9511c1500184023dfea803a5e785d725e2
Thank you for your report.
Jaroslav
--
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project; Red Hat, Inc.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-04 14:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <732607619.94502.1370008560183.JavaMail.root@telum.ru>
2013-05-31 13:58 ` dsnoop memory leak Иван Больсунов
2013-06-04 14:02 ` Jaroslav Kysela
[not found] <370949076.4726.1370352588794.JavaMail.root@telum.ru>
2013-06-04 13:33 ` Ivan Bolsunov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.