Use mdb in Solaris to check for memory leakage

Source: Internet
Author: User
Perform Step 1: UMEM_DEBUGdefaultUMEM_LOGGINGtransactionLD_PRELOADlibumem.so.1. /spAgent & amp; www.2cto.com Step 2:-bash-3.00 $ mdb-p16546 // The above process gets IDLoading... perform Step 1: UMEM_DEBUG = default UMEM_LOGGING = transaction LD_PRELOAD = libumem. so.1. /spAgent & www.2cto.com Step 2:-bash-3.00 $ mdb-p 16546 // The above process obtains IDLoading 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 CALLER00484008 11489 00a7f428 libstdc ++. so.6.0.3 '_ Znwj + 0x1c limit Total 11489 buffers, 5147072 bytes www.2cto.com Step 4:> 00a7f428 :: bufctl_audit // Check the call stack addr bufaddr timestamp thread cache lastlog contents a7f428 a85a00 2185ef54480864 47 4840 using this memory address 08 bytes 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 _ primary + 0x510 _ ZN6RXConn10RecvThreadEv + 0x6c4 _ ZN6RXConn4RecvEPv + 0x20 libc. so.1 '_ lwp_start through the above steps, you can basically find that memory leakage occurs 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.