Use MDB in Solaris to check for Memory leakage

Source: Internet
Author: User

Step 1:

Umem_debug = default umem_logging = Transaction ld_preload = libumem. so.1./spagent &


Step 2:

-Bash-3.00 $ MDB-P 16546 // process ID obtained above
Loading modules: [lD. so.1 libumem. so.1 libc. so.1]


Step 3:
-Bash-3.00 $ MDB-P 16546
Loading modules: [lD. so.1 libumem. so.1 libc. so.1]
>: Findleaks // find Memory leakage
Cache leaked bufctl caller
00484008 11489 00a7f428 libstdc ++. so.6.0.3 '_ znwj + 0x1c
----------------------------------------------------------------------
Total 11489 buffers, 5147072 bytes


Step 4:

> 00a7f428: bufctl_audit
// View the call stack that last uses this memory address
ADDR bufaddr timestamp thread
Cache lastlog Contents
A7f428 a85a00 2185ef54480864 47
484008 listen 5dc 0
Libumem. so.1 'umem _ cache_alloc + 0x13c
Libumem. so.1 'umem _ alloc + 0x60
Libumem. so.1 'malloc + 0x28
Libstdc ++. so.6.0.3 '_ znwj + 0x1c
_ Zn6rxconn17handlesmppdeliverepk7aichunki + 0x510
_ Zn6rxconn10recvthreadev + 0x6c4
_ Zn6rxconn4recvepv + 0x20
Libc. so.1 '_ lwp_start


After performing the preceding steps, you can locate the memory leakage in the XX function.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.