Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Created attachment 1226092[details]
reproducer
Description of problem:
The babl library (babl-0.1.10-9.el7.x86_64) has a bug where it calls babl_fatal() when malloc() or free() have changed memory addresses. babl_fatal() ends up infinitely recursively calling a set of five functions. Eventually, this exhausts all of the memory that the process is allowed to allocate and gimp gets a SIGSEGV or is killed by the OOM killer.
How reproducible:
This is reproducible in various ways. The simplest way is to load the nvidia drivers and then run gimp. However, this problem also affects local apps.
This problem has been fixed upstream. Could we apply the following three upstream patches to our babl package to fix the bug:
commit d9146bbdd48a9624380884afd55e1c5933844b73
Author: yvind Kols <pippin>
Date: Wed Jul 2 06:20:13 2014 +0200
babl: make malloc implementation stability sanity check non-fatal
commit 1a1177bf7b43eb971ab4ff49b1e4f7913aa73e7e
Author: Mukund Sivaraman <muks>
Date: Wed Sep 3 10:09:55 2014 +0530
babl: Fix message printed when memory function pointers don't match
commit 804808f4e3d1fa1c8824932637a110f985b19187
Author: Mukund Sivaraman <muks>
Date: Mon Apr 20 01:00:58 2015 +0530
Don't repeat the malloc/free function pointer change messages
When I run the reproducer against a patched babl. I get this output from running "make":
gcc -fPIC -shared -o libbabl_test_lib.so babl_test_lib.c -l babl-0.1
gcc -o babl_test_main babl_test_main.c -l GL -l babl-0.1 -Wl,-rpath=. -L . -l babl_test_lib
ulimit -c 0; \
ulimit -v 100000; \
./babl_test_main
before_main: calling babl_free (malloc = 0x2aaaab4cbf70, free = 0x2aaaab4cc370)
before_main: called babl_free (malloc = 0x2aaaab4cbf70, free = 0x2aaaab4cc370)
main: calling babl_free
HMM....
Something strange is happening,
malloc and free function pointer changing between invocations in babl.
main: called babl_free
after_main: malloc = 0x2aaaab80f490, free = 0x2aaaab80f160
Note how the addresses of both malloc() and free() change. It appears that somehow the GL library is causing relocations of these two functions.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2018:0670
Created attachment 1226092 [details] reproducer Description of problem: The babl library (babl-0.1.10-9.el7.x86_64) has a bug where it calls babl_fatal() when malloc() or free() have changed memory addresses. babl_fatal() ends up infinitely recursively calling a set of five functions. Eventually, this exhausts all of the memory that the process is allowed to allocate and gimp gets a SIGSEGV or is killed by the OOM killer. How reproducible: This is reproducible in various ways. The simplest way is to load the nvidia drivers and then run gimp. However, this problem also affects local apps. This problem has been fixed upstream. Could we apply the following three upstream patches to our babl package to fix the bug: commit d9146bbdd48a9624380884afd55e1c5933844b73 Author: yvind Kols <pippin> Date: Wed Jul 2 06:20:13 2014 +0200 babl: make malloc implementation stability sanity check non-fatal commit 1a1177bf7b43eb971ab4ff49b1e4f7913aa73e7e Author: Mukund Sivaraman <muks> Date: Wed Sep 3 10:09:55 2014 +0530 babl: Fix message printed when memory function pointers don't match commit 804808f4e3d1fa1c8824932637a110f985b19187 Author: Mukund Sivaraman <muks> Date: Mon Apr 20 01:00:58 2015 +0530 Don't repeat the malloc/free function pointer change messages When I run the reproducer against a patched babl. I get this output from running "make": gcc -fPIC -shared -o libbabl_test_lib.so babl_test_lib.c -l babl-0.1 gcc -o babl_test_main babl_test_main.c -l GL -l babl-0.1 -Wl,-rpath=. -L . -l babl_test_lib ulimit -c 0; \ ulimit -v 100000; \ ./babl_test_main before_main: calling babl_free (malloc = 0x2aaaab4cbf70, free = 0x2aaaab4cc370) before_main: called babl_free (malloc = 0x2aaaab4cbf70, free = 0x2aaaab4cc370) main: calling babl_free HMM.... Something strange is happening, malloc and free function pointer changing between invocations in babl. main: called babl_free after_main: malloc = 0x2aaaab80f490, free = 0x2aaaab80f160 Note how the addresses of both malloc() and free() change. It appears that somehow the GL library is causing relocations of these two functions.