Project

General

Profile

Bug #5552

libsun_sas leaks devids

Added by Josef Sipek almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2015-01-21
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Using the attached test program (linked with libSMHBAAPI and libumem):

-bash-4.2$ export UMEM_DEBUG=default,verbose
-bash-4.2$ mdb ./test 
> ::sysbp _exit
> :r
Adapter nums :2
HBA name SUNW-mpt_sas-0: status: 0
HBA name SUNW-mpt_sas-1: status: 0
mdb: stop on entry to _exit
mdb: target stopped at:
0xfee32508:     nop    
mdb: You've got symbols!
Loading modules: [ ld.so.1 libumem.so.1 libc.so.1 libnvpair.so.1 libsysevent.so.1 ]
> ::findleaks -dvf
findleaks:                maximum buffers => 234
findleaks:                 actual buffers => 156
findleaks: 
findleaks:             potential pointers => 108307
findleaks:                     dismissals => 77102         (71.1%)
findleaks:                         misses => 28681         (26.4%)
findleaks:                           dups => 2394          ( 2.2%)
findleaks:                        follows => 130           ( 0.1%)
findleaks: 
findleaks:              peak memory usage => 61 kB
findleaks:               elapsed CPU time => 0.0 seconds
findleaks:              elapsed wall time => 0.0 seconds
findleaks: 
CACHE     LEAKED   BUFCTL CALLER
0807c010      26 0817f828 libdevid.so.1`devid_str_decode_id+0x1bf
------------------------------------------------------------------------
   Total      26 buffers, 832 bytes

umem_alloc_32 leak: 26 buffers, 32 bytes each, 832 bytes total
            ADDR          BUFADDR        TIMESTAMP           THREAD
                            CACHE          LASTLOG         CONTENTS
         817f828          817bfc8     85963bddd2d2                1
                          807c010                0                0
                 libumem.so.1`umem_cache_alloc_debug+0x1fe
                 libumem.so.1`umem_cache_alloc+0x99
                 libumem.so.1`umem_alloc+0x50
                 libumem.so.1`umem_malloc+0x36
                 libdevid.so.1`devid_str_decode_id+0x1bf
                 libdevid.so.1`devid_str_decode+0x16
                 libsun_sas.so.1`get_attached_paths_info+0xc4e
                 libsun_sas.so.1`devtree_attached_devices+0xbf
                 libsun_sas.so.1`add_hba_port_info+0x603
                 libsun_sas.so.1`devtree_get_one_hba+0x548
                 libsun_sas.so.1`lookup_smhba_sas_hba+0x96
                 libdevinfo.so.1`walk_one_node+0x4f
                 libdevinfo.so.1`di_walk_node+0xbe
                 libsun_sas.so.1`devtree_get_all_hbas+0x79
                 libsun_sas.so.1`Sun_sasLoadLibrary+0x163

Files

test.c (535 Bytes) test.c Josef Sipek, 2015-01-21 02:59 PM

History

#1

Updated by Electric Monk almost 5 years ago

  • % Done changed from 80 to 100
  • Status changed from New to Closed

git commit b045990893825c31e176b319ae8cc4ef32115d17

commit  b045990893825c31e176b319ae8cc4ef32115d17
Author: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Date:   2015-01-24T03:24:44.000Z

    5552 libsun_sas leaks devids
    Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
    Reviewed by: Jean McCormack <jean.mccormack@nexenta.com>
    Reviewed by: Marcel Telka <marcel.telka@nexenta.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF