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.
Bug 1399878 - [LLNL 7.4 Bug] babl library goes into a recursive loop causing gimp and other apps using babl to crash when exiting
Summary: [LLNL 7.4 Bug] babl library goes into a recursive loop causing gimp and other...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: babl
Version: 7.3
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: 7.5
Assignee: Josef Ridky
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks: 1432486 1522983
TreeView+ depends on / blocked
 
Reported: 2016-11-30 00:51 UTC by Ben Woodard
Modified: 2018-04-10 08:44 UTC (History)
6 users (show)

Fixed In Version: babl-0.1.10-10.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 08:44:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
reproducer (10.00 KB, application/x-tar)
2016-11-30 00:51 UTC, Ben Woodard
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0670 0 None None None 2018-04-10 08:44:52 UTC

Description Ben Woodard 2016-11-30 00:51:30 UTC
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.

Comment 2 Nils Philippsen 2016-12-08 13:17:10 UTC
The changes look sane to me and apply cleanly.

Comment 10 errata-xmlrpc 2018-04-10 08:44:28 UTC
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


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