Bug 1301247 - memory leak in killall
memory leak in killall
Status: ASSIGNED
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: psmisc (Show other bugs)
7.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Jan Rybar
BaseOS QE - Apps
: EasyFix, Upstream
Depends On:
Blocks: 1473612
  Show dependency treegraph
 
Reported: 2016-01-22 20:02 EST by Badalyan Vyacheslav
Modified: 2017-07-25 06:44 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Badalyan Vyacheslav 2016-01-22 20:02:40 EST
[root@vm-asterisk04t asterisk-13.7.0]# LD_PRELOAD=/lib64/libasan.so.2 killall 11111
11111: no process found

=================================================================
==1708==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 1024 byte(s) in 1 object(s) allocated from:
    #0 0x7fe30ef15a0a in malloc (/lib64/libasan.so.2+0x98a0a)
    #1 0x402104  (/usr/bin/killall+0x402104)
    #2 0x7fff99d3e4fb  (<unknown module>)

Direct leak of 1024 byte(s) in 1 object(s) allocated from:
    #0 0x7fe30ef15a0a in malloc (/lib64/libasan.so.2+0x98a0a)
    #1 0x402183  (/usr/bin/killall+0x402183)

Direct leak of 384 byte(s) in 3 object(s) allocated from:
    #0 0x7fe30ef15a0a in malloc (/lib64/libasan.so.2+0x98a0a)
    #1 0x402c76  (/usr/bin/killall+0x402c76)

Direct leak of 4 byte(s) in 1 object(s) allocated from:
    #0 0x7fe30ef15a0a in malloc (/lib64/libasan.so.2+0x98a0a)
    #1 0x40202b  (/usr/bin/killall+0x40202b)

SUMMARY: AddressSanitizer: 2436 byte(s) leaked in 6 allocation(s).
Comment 2 Badalyan Vyacheslav 2016-01-22 20:30:48 EST
used devtoolset-4 (gcc-5.2)
Comment 3 Badalyan Vyacheslav 2016-01-27 14:35:01 EST
[root@vm-asterisk04t ~]# rpm -qa | grep libasan
devtoolset-4-libasan-devel-5.2.1-2.2.el7.x86_64
libasan2-5.2.1-2.2.el7.x86_64

[root@vm-asterisk04t ~]# rpm -qa | grep psmis
psmisc-22.20-9.el7.x86_64

[root@vm-asterisk04t ~]# uname -a
Linux vm-asterisk04t.tcsbank.ru 3.10.0-327.4.4.el7.x86_64 #1 SMP Tue Jan 5 16:07:00 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Comment 5 Jan Rybar 2017-03-13 08:21:49 EDT
Hello Badalyan,

you're right, one of the four leaks is actually lost memory allocation. Thanks for your eagle eye!

The rest is actually not lost memory, it's just not returned right before the termination of the program. I'm not sure if upstream will accept the fix. IMO it's nothing against nothing.

I will propose the fix of the former to the upstream and let's see.

Thanks.

Note You need to log in before you can comment on or make changes to this bug.