Liu,

Normally I using

Mdb -p pid -o nostop


++++

# ps -ef | grep Address
  buscon  1370   777   0 07:30:29 ?           0:01 /usr/java/bin/java
-Dsolid_appinfo=Address -Dapp=Address -server -Xrs -Djava.pr
    root  1473 27493   0 07:32:06 pts/5       0:00 grep Address
# mdb -p 1370 -o nostop
mdb: failed to initialize /lib/libthread_db.so.1: libthread_db call
failed unexpectedly
mdb: warning: debugger will only be able to examine raw LWPs
Loading modules: [ ld.so.1 libumem.so.1 libc.so.1 libuutil.so.1 ]
> ::findleaks -dv
findleaks:                maximum buffers => 4669
findleaks:                 actual buffers => 4293
findleaks:
findleaks:             potential pointers => 41010624
findleaks:                     dismissals => 39064450      (95.2%)
findleaks:                         misses => 845445        ( 2.0%)
findleaks:                           dups => 1096597       ( 2.6%)
findleaks:                        follows => 4132          ( 0.0%)
findleaks:
findleaks:              elapsed wall time => 14 seconds
findleaks:
BYTES             LEAKED VMEM_SEG CALLER
4096                   2 b3dee000 MMAP
4096                   1 b3df0000 MMAP
------------------------------------------------------------------------
           Total       2 oversized leaks, 8192 bytes

CACHE     LEAKED   BUFCTL CALLER
08089290       1 080a6468 libc.so.1`strdup+0x25
08089290       1 080a6558 libc.so.1`strdup+0x25
0808d510       1 080b0df0 libc.so.1`strdup+0x25
08089510       1 081b2398 libc.so.1`strdup+0x25
0808d010       1 080c9e50 libjvm.so`__1cCosGmalloc6FI_pv_+0x28
0808d010       1 080c9f40 libjvm.so`__1cCosGmalloc6FI_pv_+0x28
0808fc90       1 080c9a18 libjvm.so`__1cCosGmalloc6FI_pv_+0x28
08089c90       1 080b39c0 libjvm.so`__1cCosGmalloc6FI_pv_+0x28
0808fc90       1 080c9b08 libjvm.so`__1cCosGmalloc6FI_pv_+0x28
08089290       2 080a6990 libjvm.so`__1cCosGmalloc6FI_pv_+0x28
08089510       1 080aa568 libjvm.so`__1cCosGmalloc6FI_pv_+0x28
08089a10       1 080be638 libjvm.so`__1cCosGmalloc6FI_pv_+0x28
08092790       1 080ceb88 libjvm.so`__1cCosGmalloc6FI_pv_+0x28
08089290       1 080a6828 libjvm.so`__1cCosGmalloc6FI_pv_+0x28
08089c90       1 080b6248 libjvm.so`__1cCosGmalloc6FI_pv_+0x28
0808d290       1 080c5d50 libjvm.so`__1cCosGmalloc6FI_pv_+0x28
0808d010       1 080c81a0 libjvm.so`__1cCosGmalloc6FI_pv_+0x28
0808f510       1 080c3988 libjvm.so`__1cCosGmalloc6FI_pv_+0x28
08089c90       1 080b6158 libjvm.so`__1cCosGmalloc6FI_pv_+0x28
08089290       1 080a6918 libjvm.so`__1cCosGmalloc6FI_pv_+0x28
08089510       4 080aa0b8 libjvm.so`__1cCosGmalloc6FI_pv_+0x28
08089a10       1 080be728 libjvm.so`__1cCosGmalloc6FI_pv_+0x28
08089790       1 080baa60 libjvm.so`__1cCosGmalloc6FI_pv_+0x28
08089a10       1 080be548 libjvm.so`__1cCosGmalloc6FI_pv_+0x28
08089a10       1 083a5490 libzip.so`ZIP_GetEntry+0x84
0808d010       5 080c55d0 libzip.so`ZIP_GetEntry+0x84
08089c90      21 0825fe48 libzip.so`ZIP_GetEntry+0x84
0808d010      37 080c8b78 libzip.so`ZIP_GetEntry+0x84
0808d290       3 08286000 libzip.so`ZIP_GetEntry+0x84
08089a10      10 083a5238 libzip.so`ZIP_GetEntry+0x84
0808d010      26 080c58a0 libzip.so`ZIP_GetEntry+0x84
0808d010       1 080c54e0 libzip.so`ZIP_GetEntry+0x84
0808d010       1 080c53f0 libzip.so`ZIP_GetEntry+0x84
0808d510       1 08474ad0 libzip.so`ZIP_GetEntry+0x84
0808d010       5 080c5648 libzip.so`ZIP_GetEntry+0x84
08089c90      12 0825f998 libzip.so`ZIP_GetEntry+0x84
0808d290       2 08286078 libzip.so`ZIP_GetEntry+0x84
0808d790       1 0809be98 main+0xd1
08092010       1 080b0a30 main+0xd1
0808d790       1 0809be20 main+0x82
0808d510       1 080b0e68 main+0x192
08092a10       1 080be188 main+0x29d
0808f510       1 080c3910 main+0x3b2
----------------------------------------------------------------------
   Total     159 buffers, 11072 bytes

mmap(2) leak: [b3dee000, b3def000), 4096 bytes
mmap(2) leak: [b3df0000, b3df1000), 4096 bytes
umem_alloc_16 leak: 1 buffer, 16 bytes
            ADDR          BUFADDR        TIMESTAMP           THREAD
                            CACHE          LASTLOG         CONTENTS
         80a6468          80a2fc0     3893eac7b115                1
                          8089290          807a320                0
                 libumem.so.1`umem_cache_alloc_debug+0x16c
                 libumem.so.1`umem_cache_alloc+0x15c
                 libumem.so.1`umem_alloc+0x3f
                 libumem.so.1`malloc+0x23
                 libc.so.1`strdup+0x25
                 0x8054d25
                 0x805532a
                 main+0xd1
                 _start+0x7a

umem_alloc_16 leak: 1 buffer, 16 bytes
            ADDR          BUFADDR        TIMESTAMP           THREAD
                            CACHE          LASTLOG         CONTENTS
         80a6558          80a2f80     3893eac903e7                1
                          8089290          807a44c                0
                 libumem.so.1`umem_cache_alloc_debug+0x16c
                 libumem.so.1`umem_cache_alloc+0x15c
                 libumem.so.1`umem_alloc+0x3f
                 libumem.so.1`malloc+0x23
                 libc.so.1`strdup+0x25
                 0x8054d73
                 0x805532a
                 main+0xd1
                 _start+0x7a

 

-----Original Message-----
From: Pavesi, Valdemar (NSN - US/Boca Raton) 
Sent: Monday, November 30, 2009 9:43 AM
To: 'ext xiaolin liu'; mdb-discuss at opensolaris.org
Subject: RE: [mdb-discuss] mdb: findleaks: requires UMEM_DEBUG=audit
orUMEM_DEBUG=default

Liu,

Run "pargs -e pid" and check for :  

UMEM_DEBUG=default,verbose
export UMEM_DEBUG
UMEM_LOGGING=transaction
export UMEM_LOGGING


Thanks!
Valdemar



-----Original Message-----
From: mdb-discuss-boun...@opensolaris.org
[mailto:mdb-discuss-bounces at opensolaris.org] On Behalf Of ext xiaolin
liu
Sent: Monday, November 30, 2009 9:34 AM
To: mdb-discuss at opensolaris.org
Subject: [mdb-discuss] mdb: findleaks: requires UMEM_DEBUG=audit
orUMEM_DEBUG=default

When I want to examine the code of some process thru mdb to  check
memory leak possibility . but  the command not successful ,anybody  know
it ?

detail env is here.

wss23_all_1_1_1:> pargs -e core.7329
core 'core.7329' of 7329:       OamCfg
envp[0]:
CLASSPATH=/Spatial/ems/active/patch:/Spatial/ems/active/patch/emsmain.ja
r:/Spatial/ems/active/patch/emsmain2.jar:/Spatial/ems/active/patch/emsma
in3.jar:/Spatial/ems/active/patch/emsui.jar:/Spatial/ems/active/patch/em
scommon.jar:/Spatial/ems/active/patch/emscli.jar:/Spatial/ems/active/pat
ch/jawall.jar:/Spatial/ems/active/patch/cpscmnNM.jar:/opt/Spatial/ems/ac
tive/bin/emsmain.jar:/opt/Spatial/ems/active/bin/emsmain2.jar:/opt/Spati
al/ems/active/bin/emsmain3.jar:/opt/Spatial/ems/active/bin/emsui.jar:/op
t/Spatial/ems/active/bin/emscommon.jar:/opt/Spatial/ems/active/bin/emscl
i.jar:/opt/Spatial/ems/active/bin/jawall.jar:/opt/Spatial/ems/active/bin
/cpscmnNM.jar:/opt/Spatial/ems/active/bin/jctableK.jar:/opt/Spatial/ems/
active/bin/xerces.jar:/opt/Spatial/ems/active/bin/xercesImpl.jar:/opt/Sp
atial/ems/active/bin/xercesSamples.jar:/opt/Spatial/ems/active/bin/xmlPa
rserAPIs.jar:/opt/Spatial/ems/active/bin/idl.jar:/opt/Spatial/ems/active
/bin/jacorb.jar:/opt/Spatial/ems/active/bin/j
 
cchartK.jar:/opt/Spatial/ems/active/bin/jcpagelayoutK.jar:/opt/TimesTen/
spatial/lib/classes14.jar:/opt/TimesTen/spatial/lib/classes13.jar
envp[1]: EDITOR=vi
envp[2]: EXECUTE=/opt/Spatial/msc/active/bin
envp[3]: HOME=/
envp[4]: ITCL_LIBRARY=/opt/Spatial/msc/active/lib/itcl3.0
envp[5]: LANG=en_US.ISO8859-1
envp[6]:
LD_LIBRARY_PATH=/Spatial/msc/active/patch:/Spatial/ems/active/patch:/opt
/Spatial/msc/active/lib:/opt/Spatial/ems/active/lib:/usr/java/lib:/usr/l
ib:/lib:/opt/TimesTen/spatial/lib:/opt/TimesTen/spatial/jdbc/lib
envp[7]: LOGNAME=root
envp[8]: MAIL=/var/mail//root
envp[9]: ODBCINI=/var/TimesTen/sys.odbc.ini
envp[10]:
PATH=/opt/TimesTen/spatial/bin:/Spatial/bin:/Spatial/msc/active/patch:/o
pt/Spatial/msc/active/bin:/Spatial/ems/active/patch:/opt/Spatial/ems/act
ive/bin:/Spatial/tools:/opt/Spatial/msc/active/tools:/opt/Spatial/msc/ac
tive/installation:/usr/openwin/bin:/opt/SUNWconn/jaw/bin/:/usr/ccs/bin:/
usr/xpg4/bin:/usr/proc/bin:/usr/sbin:/usr/bin:/opt/SUNWspro/bin
envp[11]: PS1=wss23_all_1_1_1:>
envp[12]: PWD=/
envp[13]: SHELL=/usr/bin/ksh
envp[14]: SR_AGT_CONF_DIR=/opt/Spatial/msc/active/srconf/agt
envp[15]: SR_MGR_CONF_DIR=/opt/Spatial/msc/active/srconf/mgr
envp[16]: SSH_CLIENT=172.24.227.20 2291 22
envp[17]: SSH_CONNECTION=172.24.227.20 2291 172.24.185.23 22
envp[18]: SSH_TTY=/dev/pts/1
envp[19]: SYSODBCINI=/var/TimesTen/sys.odbc.ini
envp[20]: SYSTTCONNECTINI=/var/TimesTen/sys.ttconnect.ini
envp[21]: TCL_LIBRARY=/opt/Spatial/msc/active/lib/tcl8.0
envp[22]: TERM=xterm
envp[23]: TK_LIBRARY=/opt/Spatial/msc/active/lib/tk8.0
envp[24]: TTCONNECTINI=/var/TimesTen/sys.ttconnect.ini
envp[25]: TTPATH=/opt/TimesTen/spatial
envp[26]: TTVARDIR=/var/TimesTen/spatial
envp[27]: TT_LATCH_SLEEP_FREQ=1
envp[28]: TZ=GMT+0
envp[29]: USER=root
envp[30]: _=/opt/Spatial/msc/active/installation/BsPmMonitor

wss23_all_1_1_1:> echo $UMEM_DEBUG
default
wss23_all_1_1_1:> echo $UMEM_LOGGING
transaction
wss23_all_1_1_1:> echo $LD_PRELOAD
libumem.so.1


wss23_all_1_1_1:> mdb core.7329
mdb: core file data for mapping at e8dea000 not saved: Unknown error
mdb: core file data for mapping at ef3fa000 not saved: Unknown error
mdb: core file data for mapping at f2fc2000 not saved: Unknown error
mdb: core file data for mapping at f2fd6000 not saved: Unknown error
mdb: core file data for mapping at f2fdc000 not saved: Unknown error
mdb: core file data for mapping at fcbfa000 not saved: Unknown error
mdb: core file data for mapping at fd3f6000 not saved: Unknown error
Loading modules: [ libumem.so.1 libc.so.1 ld.so.1 ]
> ummem_status
mdb: failed to dereference symbol: unknown symbol name
> ::umem_status
Status:         ready and active
Concurrency:    2
Logs:           (inactive)
Message buffer:

> ::findleaks
mdb: findleaks: requires UMEM_DEBUG=audit or UMEM_DEBUG=default
> umem_flags/X
libumem.so.1`umem_flags:
libumem.so.1`umem_flags:        0
> ::umem_cache
ADDR     NAME                      FLAG    CFLAG  BUFSIZE  BUFTOTL
07370008 umem_magazine_1           0000 80080000        8     1020
07370208 umem_magazine_3           0000 80080000       16      510
07370408 umem_magazine_7           0000 80080000       32      255
07370608 umem_magazine_15          0000 80080000       64      127
07370808 umem_magazine_31          0000 80080000      128        0
07370a08 umem_magazine_47          0000 80080000      192        0
07370c08 umem_magazine_63          0000 80080000      256        0
07370e08 umem_magazine_95          0000 80080000      384        0
07371008 umem_magazine_143         0000 80080000      576        0
07371208 umem_slab_cache           0000 80080000       28     7395
07371408 umem_bufctl_cache         0000 80080000       12    21930
07371608 umem_bufctl_audit_cache   0000 80080000      100        0
07371808 umem_alloc_8              0000 80000000        8        0
07371a08 umem_alloc_16             0000 80000000       16    37740
07371c08 umem_alloc_24             0000 80000000       24    10200
07371e08 umem_alloc_32             0000 80000000       32    24225
07374008 umem_alloc_40             0000 80000000       40    18564
07374208 umem_alloc_48             0000 80000000       48      680
07374408 umem_alloc_56             0000 80000000       56      290
07374608 umem_alloc_64             0000 80000000       64      508
07374808 umem_alloc_80             0000 80000000       80     1938
07374a08 umem_alloc_96             0000 80000000       96     1275
07374c08 umem_alloc_112            0000 80000000      112     2088
07374e08 umem_alloc_128            0000 80000000      128      693
07375008 umem_alloc_160            0000 80000000      160     1581
07375208 umem_alloc_192            0000 80000000      192      588
07375408 umem_alloc_224            0000 80000000      224      756
07375608 umem_alloc_256            0000 80000000      256      465
07375808 umem_alloc_320            0000 80000000      320     4150
07375a08 umem_alloc_384            0000 80000000      384      420
07375c08 umem_alloc_448            0000 80000000      448     6228
07375e08 umem_alloc_512            0000 80000000      512      135
07376008 umem_alloc_640            0000 80000000      640     9228
07376208 umem_alloc_768            0000 80000000      768      580
07376408 umem_alloc_896            0000 80000000      896      774
07376608 umem_alloc_1152           0200 80000000     1152    12621
07376808 umem_alloc_1344           0200 80000000     1344      768
07376a08 umem_alloc_1600           0200 80000000     1600      500
07376c08 umem_alloc_2048           0200 80000000     2048      420
07376e08 umem_alloc_2688           0200 80000000     2688      534
07377008 umem_alloc_4096           0200 80000000     4096      342
07377208 umem_alloc_8192           0200 80000000     8192     3032
07377408 umem_alloc_12288          0200 80000000    12288     3640
07377608 umem_alloc_16384          0200 80000000    16384       27
>

wss23_all_1_1_1:> truss -ae -t exec -u ::umem_setup_envvars -u
::getenvtruss -ae -t exec -u ::umem_setup_envvars -u ::getenv OamCfg
execve("/space/Spatial/msc/05.00.29.24/patch/OamCfg", 0xFFBFF45C,
0xFFBFF464)  argc = 1
 argv: OamCfg
 envp: _=/usr/bin/truss
  TCL_LIBRARY=/opt/Spatial/msc/active/lib/tcl8.0 LANG=C
  SSH_TTY=/dev/pts/1
 
PATH=/opt/TimesTen/spatial/bin:/Spatial/bin:/Spatial/msc/active/patch:/o
pt/Spatial/msc/active/bin:/Spatial/ems/active/patch:/opt/Spatial/ems/act
ive/bin:/Spatial/tools:/opt/Spatial/msc/active/tools:/opt/Spatial/msc/ac
tive/tools/scripts:/opt/Spatial/msc/active/installation:/usr/openwin/bin
:/opt/SUNWconn/jaw/bin/:/usr/ccs/bin:/usr/xpg4/bin:/usr/proc/bin:/usr/sb
in:/usr/bin:/opt/SUNWspro/bin:.
  TTPATH=/opt/TimesTen/spatial
  EXECUTE=/opt/Spatial/msc/active/bin TT_LATCH_SLEEP_FREQ=1
  TK_LIBRARY=/opt/Spatial/msc/active/lib/tk8.0 EDITOR=vi
 
CLASSPATH=/Spatial/ems/active/patch:/Spatial/ems/active/patch/emsmain.ja
r:/Spatial/ems/active/patch/emsmain2.jar:/Spatial/ems/active/patch/emsma
in3.jar:/Spatial/ems/active/patch/emsui.jar:/Spatial/ems/active/patch/em
scommon.jar:/Spatial/ems/active/patch/emscli.jar:/Spatial/ems/active/pat
ch/jawall.jar:/Spatial/ems/active/patch/cpscmnNM.jar:/Spatial/ems/active
/patch/jh.jar:/opt/Spatial/ems/active/bin/emsmain.jar:/opt/Spatial/ems/a
ctive/bin/emsmain2.jar:/opt/Spatial/ems/active/bin/emsmain3.jar:/opt/Spa
tial/ems/active/bin/emsui.jar:/opt/Spatial/ems/active/bin/emscommon.jar:
/opt/Spatial/ems/active/bin/emscli.jar:/opt/Spatial/ems/active/bin/jawal
l.jar:/opt/Spatial/ems/active/bin/cpscmnNM.jar:/opt/Spatial/ems/active/b
in/jctableK.jar:/opt/Spatial/ems/active/bin/xerces.jar:/opt/Spatial/ems/
active/bin/xercesImpl.jar:/opt/Spatial/ems/active/bin/xercesSamples.jar:
/opt/Spatial/ems/active/bin/xmlParserAPIs.jar:/opt/Spatial/ems/active/bi
n/idl.jar:/opt/Spatial/ems/active/bin/jacorb.jar:/op
 t/Spatial/ems/active/bin/jcchartK.ja
  LOGNAME=root MAIL=/var/mail//root
  TTCONNECTINI=/var/TimesTen/sys.ttconnect.ini
  PS1=wss23_all_1_1_1:>  TTVARDIR=/var/TimesTen/spatial
  USER=root DISPLAY=172.24.227.20:0 SHELL=/usr/bin/ksh
  ODBCINI=/var/TimesTen/sys.odbc.ini
  SYSTTCONNECTINI=/var/TimesTen/sys.ttconnect.ini HOME=/
  SR_MGR_CONF_DIR=/opt/Spatial/msc/active/srconf/mgr
  ITCL_LIBRARY=/opt/Spatial/msc/active/lib/itcl3.0
  SSH_CONNECTION=172.24.227.20 2291 172.24.185.23 22
  SSH_CLIENT=172.24.227.20 2291 22
 
LD_LIBRARY_PATH=/Spatial/msc/active/patch:/Spatial/ems/active/patch:/opt
/Spatial/msc/active/lib:/opt/Spatial/ems/active/lib:/usr/java/lib:/opt/A
ctiveTcl/lib:/Spatial/lib:/lib:/usr/lib:/opt/TimesTen/spatial/lib:/opt/T
imesTen/spatial/jdbc/lib
  TERM=xterm PWD=/Spatial/msc/active/patch TZ=GMT+0
  SYSODBCINI=/var/TimesTen/sys.odbc.ini
  SR_AGT_CONF_DIR=/opt/Spatial/msc/active/srconf/agt
/1 at 1:   -> libumem:umem_setup_envvars(0x0, 0x0, 0xfe168bc0, 0xff092000)
/1 at 1:     -> libc:getenv(0xff36742c, 0x0, 0x0, 0x0)
/1 at 1:     <- libc:getenv() = 0
/1 at 1:     -> libc:getenv(0xff36744c, 0x0, 0x9fc64, 0x0)
/1 at 1:     <- libc:getenv() = 0
/1 at 1:     -> libc:getenv(0xff367470, 0x1, 0x9fc64, 0x0)
/1 at 1:     <- libc:getenv() = 0
/1 at 1:   <- libumem:umem_setup_envvars() = 0xfe271960
MakeOIDFragFromDot: Global application pointer not set.
                              at line 586 in file compat.c
/1 at 1:   -> libc:getenv(0xfe1507ec, 0x80c1, 0xfe5567cc, 0xff3ec0f0)
/1 at 1:   <- libc:getenv() = 0xffbfff58
/1 at 1:   -> libc:getenv(0xfe1507ec, 0x80c1, 0xfe0c1868, 0xff3ec0f0)
/1 at 1:   <- libc:getenv() = 0xffbfff58
-- 
This message posted from opensolaris.org
_______________________________________________
mdb-discuss mailing list
mdb-discuss at opensolaris.org

Reply via email to