|
From: Jojy V. <Joj...@sy...> - 2007-03-29 21:54:06
|
Hi=20
I am a Valgrind novice and was trying to track down memory lean in
our application. Now, we have a lot of shared libraries(in fact all our
modules are shared). According to the FAQ, we are required to NOT
unload(dlclose) the loaded modules before exit. Now, we dont close the
loaded module because we dont care since the process is dying anyways.
Given this scenario, should I still expect the memleak information
having lots of unresolved symbols? This is an example of the output from
the "memcheck" module.
=20
=3D=3D2448=3D=3D 1,200 bytes in 60 blocks are still reachable in loss =
record 135
of 146
=3D=3D2448=3D=3D at 0x401EC9C: operator new(unsigned)
(vg_replace_malloc.c:163)
=3D=3D2448=3D=3D by 0x4B0BB49: ???
=3D=3D2448=3D=3D by 0x807A23E:
iml::CComponentManager::CreateInstance(std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> > const&,
iml::IMKnown**) (CComponentManager.cpp:25)
=3D=3D2448=3D=3D by 0x4AFFA99: ???
=3D=3D2448=3D=3D by 0x4AFFC5B: ???
=3D=3D2448=3D=3D by 0x4AFFC5B: ???
=3D=3D2448=3D=3D by 0x4B00B5A: ???
=3D=3D2448=3D=3D by 0x80765E4:
iml::BootstrapServiceManager(std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> > const&,
std::basic_string<wchar_t, std::char_traits<wchar_t>,
std::allocator<wchar_t> > const&, std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)
(StartupShutdown.cpp:276)
=3D=3D2448=3D=3D by 0x80700D2: wmain(int, wchar_t**) =
(VectrixMain.cpp:215)
=3D=3D2448=3D=3D by 0x8070832: main (VectrixMain.cpp:140)=20
=20
=20
As you can see, there are a lot of "???" which we would like to know
the value of. Is there any other thing I should be doing?
=20
Other details:
=20
OS: Fedora 5
Arch: Intel x86
=20
=20
=20
thanks in advance
=20
|
|
From: Nuno L. <nun...@sa...> - 2007-03-29 22:04:29
|
Hi,
I had the very same problem because I was issuing a chroot() call before
calling dlopen. If that is your case, well this is a known bug.
If not, check if you are *not* calling dlclose (or any error after dlclose
won't have the symbols name).
Nuno
----- Original Message -----
From: "Jojy Varghese" <Joj...@sy...>
To: <val...@li...>
Sent: Thursday, March 29, 2007 10:53 PM
Subject: [Valgrind-users] Shared objects
Hi
I am a Valgrind novice and was trying to track down memory lean in
our application. Now, we have a lot of shared libraries(in fact all our
modules are shared). According to the FAQ, we are required to NOT
unload(dlclose) the loaded modules before exit. Now, we dont close the
loaded module because we dont care since the process is dying anyways.
Given this scenario, should I still expect the memleak information
having lots of unresolved symbols? This is an example of the output from
the "memcheck" module.
==2448== 1,200 bytes in 60 blocks are still reachable in loss record 135
of 146
==2448== at 0x401EC9C: operator new(unsigned)
(vg_replace_malloc.c:163)
==2448== by 0x4B0BB49: ???
==2448== by 0x807A23E:
iml::CComponentManager::CreateInstance(std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> > const&,
iml::IMKnown**) (CComponentManager.cpp:25)
==2448== by 0x4AFFA99: ???
==2448== by 0x4AFFC5B: ???
==2448== by 0x4AFFC5B: ???
==2448== by 0x4B00B5A: ???
==2448== by 0x80765E4:
iml::BootstrapServiceManager(std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> > const&,
std::basic_string<wchar_t, std::char_traits<wchar_t>,
std::allocator<wchar_t> > const&, std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)
(StartupShutdown.cpp:276)
==2448== by 0x80700D2: wmain(int, wchar_t**) (VectrixMain.cpp:215)
==2448== by 0x8070832: main (VectrixMain.cpp:140)
As you can see, there are a lot of "???" which we would like to know
the value of. Is there any other thing I should be doing?
Other details:
OS: Fedora 5
Arch: Intel x86
thanks in advance
|
|
From: Jojy V. <Joj...@sy...> - 2007-03-29 22:17:49
|
Thanks for the response. No we are not "chroot" ing before dlopen. And
we don't bother about calling dlclose either. Is there a way to get a
snapshot of the memory leaks before the process dies?
Thanks again!
-----Original Message-----
From: Nuno Lopes [mailto:nun...@sa...]=20
Sent: Thursday, March 29, 2007 3:04 PM
To: Jojy Varghese; val...@li...
Subject: Re: [Valgrind-users] Shared objects
Hi,
I had the very same problem because I was issuing a chroot() call before
calling dlopen. If that is your case, well this is a known bug.
If not, check if you are *not* calling dlclose (or any error after
dlclose won't have the symbols name).
Nuno
----- Original Message -----
From: "Jojy Varghese" <Joj...@sy...>
To: <val...@li...>
Sent: Thursday, March 29, 2007 10:53 PM
Subject: [Valgrind-users] Shared objects
Hi
I am a Valgrind novice and was trying to track down memory lean in
our application. Now, we have a lot of shared libraries(in fact all our
modules are shared). According to the FAQ, we are required to NOT
unload(dlclose) the loaded modules before exit. Now, we dont close the
loaded module because we dont care since the process is dying anyways.
Given this scenario, should I still expect the memleak information
having lots of unresolved symbols? This is an example of the output from
the "memcheck" module.
=3D=3D2448=3D=3D 1,200 bytes in 60 blocks are still reachable in loss =
record 135
of 146
=3D=3D2448=3D=3D at 0x401EC9C: operator new(unsigned)
(vg_replace_malloc.c:163)
=3D=3D2448=3D=3D by 0x4B0BB49: ???
=3D=3D2448=3D=3D by 0x807A23E:
iml::CComponentManager::CreateInstance(std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> > const&,
iml::IMKnown**) (CComponentManager.cpp:25)
=3D=3D2448=3D=3D by 0x4AFFA99: ???
=3D=3D2448=3D=3D by 0x4AFFC5B: ???
=3D=3D2448=3D=3D by 0x4AFFC5B: ???
=3D=3D2448=3D=3D by 0x4B00B5A: ???
=3D=3D2448=3D=3D by 0x80765E4:
iml::BootstrapServiceManager(std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> > const&,
std::basic_string<wchar_t, std::char_traits<wchar_t>,
std::allocator<wchar_t> > const&, std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)
(StartupShutdown.cpp:276)
=3D=3D2448=3D=3D by 0x80700D2: wmain(int, wchar_t**) =
(VectrixMain.cpp:215)
=3D=3D2448=3D=3D by 0x8070832: main (VectrixMain.cpp:140)
As you can see, there are a lot of "???" which we would like to know
the value of. Is there any other thing I should be doing?
Other details:
OS: Fedora 5
Arch: Intel x86
thanks in advance=20
|
|
From: Jojy V. <Joj...@sy...> - 2007-03-30 00:14:10
|
Hi all Is there a way we can dictate when to begin the memory check and when to end it so that I can get the report between two checkpoints? This would really help in narrowing down the leaks. Thanks in advance! |
|
From: Nicholas N. <nj...@cs...> - 2007-03-30 00:41:46
|
On Thu, 29 Mar 2007, Jojy Varghese wrote: > Is there a way we can dictate when to begin the memory check and > when to end it so that I can get the report between two checkpoints? > This would really help in narrowing down the leaks. See VALGRIND_DO_LEAK_CHECK in http://www.valgrind.org/docs/manual/mc-manual.html#mc-manual.clientreqs Nick |
|
From: Jojy V. <Joj...@sy...> - 2007-03-30 01:28:29
|
Thanks Nicholas. Wouldn't this just dump the information collected till that point? How do I set a starting point? Thanks again! =20 -----Original Message----- From: val...@li... [mailto:val...@li...] On Behalf Of Nicholas Nethercote Sent: Thursday, March 29, 2007 5:42 PM To: Jojy Varghese Cc: val...@li... Subject: Re: [Valgrind-users] Memleak Snapshot On Thu, 29 Mar 2007, Jojy Varghese wrote: > Is there a way we can dictate when to begin the memory check and when=20 > to end it so that I can get the report between two checkpoints? > This would really help in narrowing down the leaks. See VALGRIND_DO_LEAK_CHECK in http://www.valgrind.org/docs/manual/mc-manual.html#mc-manual.clientreqs Nick ------------------------------------------------------------------------ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE V _______________________________________________ Valgrind-users mailing list Val...@li... https://lists.sourceforge.net/lists/listinfo/valgrind-users |
|
From: Nicholas N. <nj...@cs...> - 2007-03-30 01:41:05
|
On Thu, 29 Mar 2007, Jojy Varghese wrote: > Thanks Nicholas. Wouldn't this just dump the information collected till > that point? How do I set a starting point? See VALGRIND_COUNT_LEAKS immediately below it. Nick |
|
From: Jojy V. <Joj...@sy...> - 2007-03-30 17:29:16
|
Thanks Nicholas. =20 -----Original Message----- From: Nicholas Nethercote [mailto:nj...@cs...]=20 Sent: Thursday, March 29, 2007 6:41 PM To: Jojy Varghese Cc: val...@li... Subject: RE: [Valgrind-users] Memleak Snapshot On Thu, 29 Mar 2007, Jojy Varghese wrote: > Thanks Nicholas. Wouldn't this just dump the information collected=20 > till that point? How do I set a starting point? See VALGRIND_COUNT_LEAKS immediately below it. Nick |
|
From: Jojy V. <Joj...@sy...> - 2007-03-30 17:49:03
|
Hi Nicholas , I tried using the two macros (VALGRIND_COUNT_LEAKS and VALGRIND_DO_LEAK_CHECK) but I am not sure how the usage is. Is there any example for using this? Thanks again -----Original Message----- From: Nicholas Nethercote [mailto:nj...@cs...]=20 Sent: Thursday, March 29, 2007 6:41 PM To: Jojy Varghese Cc: val...@li... Subject: RE: [Valgrind-users] Memleak Snapshot On Thu, 29 Mar 2007, Jojy Varghese wrote: > Thanks Nicholas. Wouldn't this just dump the information collected=20 > till that point? How do I set a starting point? See VALGRIND_COUNT_LEAKS immediately below it. Nick |