GNOME Bugzilla – Bug 695035
Recent GstMemory changes cause leaks all over the place
Last modified: 2013-03-03 11:07:14 UTC
This: commit 209f081ab87bb288cbbc0ffb71f37c0b60aa3f4c Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Sun Feb 24 09:33:03 2013 +0100 buffer: If sharing a GstMemory fails, fall back to copying it appears to cause massive memory leaks (totem just went up to 2.9gig of resident memory). -gstreamer/tests/check $ make gst/gstbuffer.valgrind Running suite(s): GstBuffer ==32316== 144 bytes in 1 blocks are definitely lost in loss record 1,348 of 1,419 ==32316== at 0x4C2A26B: malloc (vg_replace_malloc.c:270) ==32316== by 0x5A362F0: g_malloc (gmem.c:159) ==32316== by 0x5A4B342: g_slice_alloc (gslice.c:1003) ==32316== by 0x52C7167: _default_mem_share (gstallocator.c:392) ==32316== by 0x52D182C: gst_buffer_copy_into (gstbuffer.c:430) ==32316== by 0x52D2C69: gst_buffer_copy_region (gstbuffer.c:1742) ==32316== by 0x403DEF: test_subbuffer (gstbuffer.c:86) ==32316== by 0x4E3DEA7: srunner_run_all (check_run.c:372) ==32316== by 0x4E3865C: gst_check_run_suite (gstcheck.c:663) ==32316== by 0x401677: main (gstbuffer.c:768) ==32316== ==32316== 299 (144 direct, 155 indirect) bytes in 1 blocks are definitely lost in loss record 1,386 of 1,419 ==32316== at 0x4C2A26B: malloc (vg_replace_malloc.c:270) ==32316== by 0x5A362F0: g_malloc (gmem.c:159) ==32316== by 0x5A4B342: g_slice_alloc (gslice.c:1003) ==32316== by 0x52C7167: _default_mem_share (gstallocator.c:392) ==32316== by 0x52D182C: gst_buffer_copy_into (gstbuffer.c:430) ==32316== by 0x52D2C69: gst_buffer_copy_region (gstbuffer.c:1742) ==32316== by 0x403AF3: test_subbuffer (gstbuffer.c:56) ==32316== by 0x4E3DEA7: srunner_run_all (check_run.c:372) ==32316== by 0x4E3865C: gst_check_run_suite (gstcheck.c:663) ==32316== by 0x401677: main (gstbuffer.c:768) ==32316== ==32317== 288 (144 direct, 144 indirect) bytes in 1 blocks are definitely lost in loss record 1,388 of 1,421 ==32317== at 0x4C2A26B: malloc (vg_replace_malloc.c:270) ==32317== by 0x5A362F0: g_malloc (gmem.c:159) ==32317== by 0x5A4B342: g_slice_alloc (gslice.c:1003) ==32317== by 0x52C7167: _default_mem_share (gstallocator.c:392) ==32317== by 0x52D182C: gst_buffer_copy_into (gstbuffer.c:430) ==32317== by 0x52D2C69: gst_buffer_copy_region (gstbuffer.c:1742) ==32317== by 0x4038BF: test_subbuffer_make_writable (gstbuffer.c:241) ==32317== by 0x4E3DEA7: srunner_run_all (check_run.c:372) ==32317== by 0x4E3865C: gst_check_run_suite (gstcheck.c:663) ==32317== by 0x401677: main (gstbuffer.c:768) ==32317== ==32319== 144 bytes in 1 blocks are definitely lost in loss record 1,352 of 1,423 ==32319== at 0x4C2A26B: malloc (vg_replace_malloc.c:270) ==32319== by 0x5A362F0: g_malloc (gmem.c:159) ==32319== by 0x5A4B342: g_slice_alloc (gslice.c:1003) ==32319== by 0x52C7167: _default_mem_share (gstallocator.c:392) ==32319== by 0x52D182C: gst_buffer_copy_into (gstbuffer.c:430) ==32319== by 0x52D2C69: gst_buffer_copy_region (gstbuffer.c:1742) ==32319== by 0x404B03: test_span (gstbuffer.c:136) ==32319== by 0x4E3DEA7: srunner_run_all (check_run.c:372) ==32319== by 0x4E3865C: gst_check_run_suite (gstcheck.c:663) ==32319== by 0x401677: main (gstbuffer.c:768) ==32319== ==32319== 299 (144 direct, 155 indirect) bytes in 1 blocks are definitely lost in loss record 1,390 of 1,423 ==32319== at 0x4C2A26B: malloc (vg_replace_malloc.c:270) ==32319== by 0x5A362F0: g_malloc (gmem.c:159) ==32319== by 0x5A4B342: g_slice_alloc (gslice.c:1003) ==32319== by 0x52C7167: _default_mem_share (gstallocator.c:392) ==32319== by 0x52D182C: gst_buffer_copy_into (gstbuffer.c:430) ==32319== by 0x52D2C69: gst_buffer_copy_region (gstbuffer.c:1742) ==32319== by 0x404AC1: test_span (gstbuffer.c:133) ==32319== by 0x4E3DEA7: srunner_run_all (check_run.c:372) ==32319== by 0x4E3865C: gst_check_run_suite (gstcheck.c:663) ==32319== by 0x401677: main (gstbuffer.c:768) ==32319== 100%: Checks: 11, Failures: 0, Errors: 0 make: *** [gst/gstbuffer.valgrind] Error 1 Adapter and meta test leak too.
commit 64affd3e61de7c92e417a45c2dc5dc1db825eceb Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Sun Mar 3 12:06:36 2013 +0100 buffer: Fix memory copying logic in copy_into() https://bugzilla.gnome.org/show_bug.cgi?id=695035