Closed Bug 874658 Opened 12 years ago Closed 11 years ago

Valgrind on tbpl detects leak - 40,992 or 81,984 bytes are definitely lost (direct) with mozilla_sampler_register_thread or base::Thread::ThreadMain() on the stack

Categories

(Core :: Gecko Profiler, defect)

x86_64
Linux
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: gkw, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: memory-leak, regression, valgrind)

Valgrind detects a leak of 40,992 or 81,984 bytes (direct) with mozilla_sampler_register_thread or base::Thread::ThreadMain() on the stack, see attached snippet which comes from: https://tbpl.mozilla.org/php/getParsedLog.php?id=23199510&tree=Mozilla-Central&full=1 I'm guessing this might be related to bug 853358, setting needinfo for BenWa. ==12719== 40,992 bytes in 1 blocks are definitely lost in loss record 5,583 of 5,586 ==12719== at 0x4C28A49: malloc (vg_replace_malloc.c:270) ==12719== by 0x7607109: moz_xmalloc (mozalloc.cpp:54) ==12719== by 0x8DA36AB: mozilla_sampler_register_thread(char const*) (mozalloc.h:201) ==12719== by 0x92CC4AF: base::Thread::ThreadMain() (GeckoProfilerImpl.h:146) ==12719== by 0x92D1511: ThreadFunc(void*) (platform_thread_posix.cc:39) ==12719== by 0x4E377F0: start_thread (in /lib64/libpthread-2.12.so) ==12719== by 0x5CDD92C: clone (in /lib64/libc-2.12.so) ==12719== ==12719== 81,984 bytes in 2 blocks are definitely lost in loss record 5,586 of 5,586 ==12719== at 0x4C28A49: malloc (vg_replace_malloc.c:270) ==12719== by 0x7607109: moz_xmalloc (mozalloc.cpp:54) ==12719== by 0x8DA36AB: mozilla_sampler_register_thread(char const*) (mozalloc.h:201) ==12719== by 0x88938A7: (anonymous namespace)::WorkerThreadRunnable::Run() (GeckoProfilerImpl.h:146) ==12719== by 0x929639C: nsThread::ProcessNextEvent(bool, bool*) (nsThread.cpp:627) ==12719== by 0x925CE54: NS_ProcessNextEvent(nsIThread*, bool) (nsThreadUtils.cpp:238) ==12719== by 0x9296FAC: nsThread::ThreadFunc(void*) (nsThread.cpp:265) ==12719== by 0x63C12E8: _pt_root (ptthread.c:204) ==12719== by 0x4E377F0: start_thread (in /lib64/libpthread-2.12.so) ==12719== by 0x5CDD92C: clone (in /lib64/libc-2.12.so) ==12719==
Flags: needinfo?(bgirard)
I have a patch in bug 872947 that should fix this.
Depends on: 872947
Flags: needinfo?(bgirard)
This is no longer occurring in Valgrind-on-TBPL runs. Perhaps bug 872947 fixed it.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.