Discussion:
[lng-odp] [Bug 1101] New: odp_timer: valgrind memory
b***@bugs.linaro.org
2015-01-22 22:59:51 UTC
Permalink
https://bugs.linaro.org/show_bug.cgi?id=1101

Bug ID: 1101
Summary: odp_timer: valgrind memory
Product: OpenDataPlane
Version: 0.8
Hardware: Other
OS: Linux
Status: UNCONFIRMED
Severity: major
Priority: ---
Component: Validation
Assignee: ***@linaro.org
Reporter: ***@linaro.org
CC: lng-***@lists.linaro.org

==4101== 576 bytes in 1 blocks are possibly lost in loss record 13 of 16
==4101== at 0x4C2CC90: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4101== by 0x4012E44: allocate_dtv (dl-tls.c:296)
==4101== by 0x4012E44: _dl_allocate_tls (dl-tls.c:460)
==4101== by 0x5A01CC0: allocate_stack (allocatestack.c:589)
==4101== by 0x5A01CC0: pthread_create@@GLIBC_2.2.5 (pthread_create.c:495)
==4101== by 0x4E3C0F5: __start_helper_thread (timer_routines.c:182)
==4101== by 0x5A0672F: pthread_once (pthread_once.S:103)
==4101== by 0x4E3B084: timer_create@@GLIBC_2.3.3 (timer_create.c:105)
==4101== by 0x40A5D0: itimer_init (odp_timer.c:649)
==4101== by 0x40A5D0: odp_timer_pool_new (odp_timer.c:252)
==4101== by 0x40A5D0: odp_timer_pool_create (odp_timer.c:684)
==4101== by 0x402154: test_odp_timer_all (odp_timer.c:283)
==4101== by 0x542A12E: run_single_test (TestRun.c:991)
==4101== by 0x5429D66: run_single_suite (TestRun.c:876)
==4101== by 0x5427AF0: CU_run_all_tests (TestRun.c:367)
==4101== by 0x542BF82: basic_run_all_tests (Basic.c:195)
==4101==
==4101== 192,000 bytes in 4 blocks are possibly lost in loss record 16 of 16
==4101== at 0x4C2ABA0: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4101== by 0x40289E: worker_entrypoint (odp_timer.c:117)
==4101== by 0x404FF6: odp_run_start_routine (odp_linux.c:76)
==4101== by 0x5A010A4: start_thread (pthread_create.c:309)
==4101== by 0x572E88C: clone (clone.S:111)
==4101==
--
You are receiving this mail because:
You are on the CC list for the bug.
b***@bugs.linaro.org
2015-01-26 10:23:18 UTC
Permalink
https://bugs.linaro.org/show_bug.cgi?id=1101

Ola Liljedahl <***@linaro.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@linaro.org

--- Comment #1 from Ola Liljedahl <***@linaro.org> ---
The first warning on 576 bytes:
itimer_init (in odp_timer.c) calls Linux timer_create.
itimer_fini (in odp_timer.c) calls Linux timer_delete.
If this does not clean up the resource allocated at creation, I don't think
this is the fault of odp_timer.c.

I can find very similar reports on the Internet about possible memory leaks in
calloc/allocate_dtv which are called from pthread_create. But the conclusion is
"These are memory blocks associated with cached stacks. No memory is lost.".
--
You are receiving this mail because:
You are on the CC list for the bug.
b***@bugs.linaro.org
2015-04-15 18:47:36 UTC
Permalink
https://bugs.linaro.org/show_bug.cgi?id=1101

Mike Holmes <***@linaro.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |CONFIRMED
Ever confirmed|0 |1

--- Comment #2 from Mike Holmes <***@linaro.org> ---
valgrind ./odp_timer

1.0.2 Still have "possibly lost: 576 bytes in 1 blocks"

==14220== HEAP SUMMARY:
==14220== in use at exit: 576 bytes in 1 blocks
==14220== total heap usage: 542 allocs, 541 frees, 498,575 bytes allocated
==14220==
==14220== LEAK SUMMARY:
==14220== definitely lost: 0 bytes in 0 blocks
==14220== indirectly lost: 0 bytes in 0 blocks
==14220== possibly lost: 576 bytes in 1 blocks
==14220== still reachable: 0 bytes in 0 blocks
==14220== suppressed: 0 bytes in 0 blocks
==14220== Rerun with --leak-check=full to see details of leaked memory
==14220==
==14220== For counts of detected and suppressed errors, rerun with: -v
==14220== Use --track-origins=yes to see where uninitialised values come from
==14220== ERROR SUMMARY: 114495 errors from 31 contexts (suppressed: 0 from 0)

Ola, do you recommend that this is closed as a false positive ?
--
You are receiving this mail because:
You are on the CC list for the bug.
b***@bugs.linaro.org
2015-04-15 21:33:51 UTC
Permalink
https://bugs.linaro.org/show_bug.cgi?id=1101

--- Comment #3 from Ola Liljedahl <***@linaro.org> ---
Yes that is the most likely explanation and I don't think anyone is going to
dig into this and approve of or disprove of this hypothesis.
--
You are receiving this mail because:
You are on the CC list for the bug.
b***@bugs.linaro.org
2015-04-16 15:23:05 UTC
Permalink
https://bugs.linaro.org/show_bug.cgi?id=1101

Mike Holmes <***@linaro.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|CONFIRMED |RESOLVED
Resolution|--- |WONTFIX
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...