Bug 1301247 - memory leak in killall
Summary: memory leak in killall
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: psmisc
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jan Rybar
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 1473612
TreeView+ depends on / blocked
 
Reported: 2016-01-23 01:02 UTC by Badalyan Vyacheslav
Modified: 2020-12-15 07:39 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-15 07:39:47 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Badalyan Vyacheslav 2016-01-23 01:02:40 UTC
[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-23 01:30:48 UTC
used devtoolset-4 (gcc-5.2)

Comment 3 Badalyan Vyacheslav 2016-01-27 19:35:01 UTC
[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 12:21:49 UTC
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.

Comment 8 RHEL Program Management 2020-12-15 07:39:47 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


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