Actions
Bug #5871
opensvcs: memory leak in get_fmri_state()
Start date:
2015-04-25
Due date:
% Done:
0%
Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
Description
# mdb /usr/bin/svcs > ::sysbp _exit > ::run -l net-snmp fmri svc:/application/management/net-snmp:default name net-snmp SNMP daemon enabled true state online next_state none state_time April 25, 2015 08:47:50 AM UTC logfile /var/svc/log/application-management-net-snmp:default.log restarter svc:/system/svc/restarter:default contract_id 86 dependency require_all/none svc:/milestone/multi-user (online) dependency require_all/none svc:/system/filesystem/local (online) dependency optional_all/none svc:/milestone/name-services (online) dependency optional_all/none svc:/system/system-log (online) dependency optional_all/none svc:/network/rpc/rstat (absent) dependency require_all/restart svc:/system/cryptosvc (online) dependency require_all/restart svc:/milestone/network (online) dependency require_all/refresh file://localhost/etc/net-snmp/snmp/snmpd.conf (online) mdb: stop on entry to _exit mdb: target stopped at: 0xfee62c68: nop mdb: You've got symbols! Loading modules: [ ld.so.1 libumem.so.1 libc.so.1 libuutil.so.1 ] > ::findleaks -d CACHE LEAKED BUFCTL CALLER 0807d410 1 080b7a58 libc_hwcap1.so.1`strdup+0x2e ------------------------------------------------------------------------ Total 1 buffer, 56 bytes umem_alloc_56 leak: 1 buffer, 56 bytes ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS 80b7a58 80b5f38 7db2d73b456 1 807d410 0 0 libumem.so.1`umem_cache_alloc_debug+0x1fe libumem.so.1`umem_cache_alloc+0x18f libumem.so.1`umem_alloc+0x50 libumem.so.1`umem_malloc+0x36 libc_hwcap1.so.1`strdup+0x2e safe_strdup+0xe get_fmri_state+0x18 print_detailed_dependency+0x257 print_detailed+0x7ec libscf.so.1`scf_walk_fmri+0x11d7 main+0x8ed _start+0x83
This is due lfmri doesn't freed in http://src.illumos.org/source/xref/illumos-gate/usr/src/cmd/svc/svcs/svcs.c#2084
Updated by Yuri Pankov about 7 years ago
Why do we care about such "leaks"? It's not shared library or long running daemon.
Actions