Bug #6338
cannot use umem tools on mdb itself
Start date:
2015-10-15
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
I have this core file of mdb itself:
$ mdb core.88456 Loading modules: [ libumem.so.1 libc.so.1 libproc.so.1 libumem.so libavl.so.1 libc.so ld.so ld.so.1 ] > ::status debugging core file of mdb (32-bit) from b44c74d6 file: /usr/bin/i86/mdb initial argv: mdb /home/dap/node-testing/extracores-x86/savedcore.jobsupervisor threading model: native threads status: process core file generated with gcore(1)
Note that mdb loads the libumem.so dmod, because MDB itself is linked against libumem. However, you can't actually use any of the umem tools:
> ::findleaks mdb: findleaks: umem is not loaded in the address space > ::umastat mdb: couldn't find umem_null_cache: unknown symbol name mdb: can't walk 'umem_cache': failed to initialize walk
I've gotten as far as seeing that "findleaks" is looking for "umem_ready", which is non-zero (as it should be):
> umem_ready/p libumem.so.1`umem_ready: libumem.so.1`umem_ready: 3
It may be related to the fact that the libumem dmod is named the same as the library itself, and both are loaded:
> $m ! grep libumem fe540000 fe555000 15000 /usr/lib/mdb/proc/libumem.so fe565000 fe566000 1000 /usr/lib/mdb/proc/libumem.so feaa0000 fead1000 31000 /lib/libumem.so.1 feae0000 feae2000 2000 /lib/libumem.so.1 feaf2000 feb05000 13000 /lib/libumem.so.1 feb05000 feb0b000 6000 /lib/libumem.so.1
and the dmod also defines a bunch of global symbols with the same names in both the dmod and the library itself (like "umem_ready"):
> libumem.so`umem_ready$m BASE LIMIT SIZE NAME fe565000 fe566000 1000 /usr/lib/mdb/proc/libumem.so > libumem.so`umem_ready/d libumem.so`umem_ready: libumem.so`umem_ready: 3 > libumem.so.1`umem_ready$m BASE LIMIT SIZE NAME feaf2000 feb05000 13000 /lib/libumem.so.1 > libumem.so.1`umem_ready/d libumem.so.1`umem_ready: libumem.so.1`umem_ready: 3
That's about as far as I've gotten in debugging this.