- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Memory Leak
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-16-2007 06:16 PM
тАО09-16-2007 06:16 PM
Memory Leak
I have a multithreaded C++ application which is leaking memory.
The leak is not visible always. we see leak only when we increase the threads.
when the application is running with one thread then we do not see the leak.
We run RTC but it do not report any leak.
We have no clue of this phenomena.
OS version is ...
hpitan2 spdwrk3 spdwrk3 > uname -a
HP-UX hpitan2 B.11.23 U ia64 3411090122 unlimited-user license
GDB version is 5.6.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-16-2007 08:54 PM - edited тАО09-24-2011 03:55 AM
тАО09-16-2007 08:54 PM - edited тАО09-24-2011 03:55 AM
Re: Memory Leak
Try downloading wdb 5.7. It fixes a problem with realloc and threading.
Do you see a steady leak? If not steady, it isn't a leak, it may be caching the memory for the next thread, etc.
If your leaks are due to mmap private data regions, I don't think gdb can detect it. This includes dld and libpthread data areas.
Try downloading the latest libpthread patch.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2007 03:05 AM
тАО09-17-2007 03:05 AM
Re: Memory Leak
it is proportional to the amount of memory we are allocating on heap and number of threads.
When we have one thread we do not see leak. as soon as we increase the threads we see leaks and amount of bytes leaked is proportional to allocation on heap.
We also notice that after few application actions memory stop increasing and it becomes stable and it depends on number of threads. lesser the number of threads sooner it becomes stable.
We do not understand what is this caching memory mechanism ?
also we do not know leaks are due to mmap private data regions or we do not know how to find it is due to it.
earlier after HP recommendation we have applied patch PHCO_35744 and PHCO_35997 which solved some of our memory leak issue but above phenomena still bothering us.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2007 05:09 PM
тАО09-17-2007 05:09 PM
Re: Memory Leak
Note that it detects only the leaks that occur due to absence of any reference/pointer to the memory region (mmap`d or heap) from the data space.
Mithun
HP-WDB team
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2007 05:22 PM - edited тАО09-24-2011 03:57 AM
тАО09-17-2007 05:22 PM - edited тАО09-24-2011 03:57 AM
Re: Memory Leak
>Leak which we are seeing is not steady.
>it is proportional to the amount of memory we are allocating on heap and number of threads.
A leak is when you are allocating and deallocating (roughly the same of course) and your memory size increases. You can fragment your heap and make it unusable but I'm not sure this would be a leak.
>We also notice that after few application actions memory stop increasing and it becomes stable and it depends on number of threads. Lesser the number of threads sooner it becomes stable.
>We do not understand what is this caching memory mechanism?
As I said, this memory could be put in the pthread cache for later use. libpthread caches a thread stack if it has the default stack size. There may be more things it caches. Are you using _M_ARENA_OPTS?
>also we do not know leaks are due to mmap private data regions or we do not know how to find it is due to it.
Unfortunately that's true. Perhaps kmeminfo may help:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1138208
>earlier after HP recommendation we have applied patch PHCO_35744 and PHCO_35997 which solved some of our memory leak issue but above phenomena still bothering us.
These may have solved what I was mentioning.
They have replaced by: PHCO_36673 PHCO_36323
(No obvious new leak fixes.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2007 05:39 PM
тАО09-17-2007 05:39 PM
Re: Memory Leak
I doubt this will be helpful but I've got an OS tool to help identify leakers over time. Maybe some other program is giving you trouble.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1161688
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com