Bug 1241533

Summary: memory leak in bash
Product: [Fedora] Fedora Reporter: Nikos Mavrogiannopoulos <nmavrogi>
Component: bashAssignee: Ondrej Oprala <ooprala>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: admiller, ooprala, ovasik
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: bash-4.3.39-5.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-18 02:07:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nikos Mavrogiannopoulos 2015-07-09 12:26:11 UTC
Description of problem:
Basic operation of bash reports a memory leak. While that is harmless per se, it generated several issues in a testsuite I run which detects memory leaks in the run programs.

$ valgrind --leak-check=full /bin/bash -c 'exit 0'

==16709== 12 bytes in 1 blocks are definitely lost in loss record 83 of 292
==16709==    at 0x4A06C10: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16709==    by 0x18928F: xmalloc (in /usr/bin/bash)
==16709==    by 0x18306A: set_default_locale (in /usr/bin/bash)
==16709==    by 0x1360B0: main (in /usr/bin/bash)


(note that the above is with debuginfo symbols installed, but for some reason they cannot be read).

Comment 1 Nikos Mavrogiannopoulos 2015-07-09 12:28:51 UTC
btw. The example above failed example is identical to what gnulib uses to determine a working valgrind. That is, if bash has a memory leak, gnulib will fail to detect valgrind.

http://git.savannah.gnu.org/cgit/gnulib.git/tree/m4/valgrind-tests.m4

Comment 2 Ondrej Oprala 2015-07-10 07:18:02 UTC
Hi Nikos,
this is already fixed, built and in bodhi, waiting for more karma ;)

*** This bug has been marked as a duplicate of bug 1224855 ***

Comment 3 Nikos Mavrogiannopoulos 2015-07-10 07:53:28 UTC
That build doesn't resolve the issue for me.

$ rpm -q bash
bash-4.3.39-4.fc22.x86_64

$ valgrind --leak-check=full /bin/bash -c 'exit 0'
==3667== 12 bytes in 1 blocks are definitely lost in loss record 85 of 296
==3667==    at 0x4A06C10: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==3667==    by 0x18928F: xmalloc (in /usr/bin/bash)
==3667==    by 0x18306A: set_default_locale (in /usr/bin/bash)
==3667==    by 0x1360B0: main (in /usr/bin/bash)

Comment 4 Ondrej Oprala 2015-07-10 07:56:05 UTC
Aah, sorry, my mistake, I'll check and fix it.

Comment 5 Fedora Update System 2015-07-15 11:06:36 UTC
bash-4.3.39-5.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/bash-4.3.39-5.fc21

Comment 6 Fedora Update System 2015-07-15 11:07:50 UTC
bash-4.3.39-5.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/bash-4.3.39-5.fc22

Comment 7 Fedora Update System 2015-07-18 02:00:26 UTC
Package bash-4.3.39-5.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing bash-4.3.39-5.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-11698/bash-4.3.39-5.fc21
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2015-07-18 02:07:22 UTC
bash-4.3.39-5.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2015-07-29 01:43:19 UTC
bash-4.3.39-5.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.