Bug 1702539 - glibc: Fix hang in pldd
Summary: glibc: Fix hang in pldd
Keywords:
Status: CLOSED ERRATA
Alias: None
Deadline: 2019-05-22
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: glibc
Version: 8.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 8.1
Assignee: Patsy Griffin
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On: 1361689
Blocks: 1684553
TreeView+ depends on / blocked
 
Reported: 2019-04-24 05:20 UTC by Florian Weimer
Modified: 2023-07-18 14:30 UTC (History)
7 users (show)

Fixed In Version: glibc-2.28-56.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-05 21:29:05 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:3513 0 None None None 2019-11-05 21:29:23 UTC
Sourceware 18035 0 P2 RESOLVED pldd does no longer work, enters infinite loop 2020-08-24 13:18:10 UTC

Description Florian Weimer 2019-04-24 05:20:15 UTC
In order to have a working pldd, we need to backport this upstream commit:

commit 1a4c27355e146b6d8cc6487b998462c7fdd1048f
Author: Adhemerval Zanella <adhemerval.zanella>
Date:   Thu Apr 11 18:12:00 2019 -0300

    elf: Fix pldd (BZ#18035)
    
    Since 9182aa67994 (Fix vDSO l_name for GDB's, BZ#387) the initial link_map
    for executable itself and loader will have both l_name and l_libname->name
    holding the same value due:
    
     elf/dl-object.c
    
     95   new->l_name = *realname ? realname : (char *) newname->name + libname_len - 1;
    
    Since newname->name points to new->l_libname->name.
    
    This leads to pldd to an infinite call at:
    
     elf/pldd-xx.c

The test depends on <support/subprocess.h> from this commit:

commit 0e169691290a6d2187a4ff41495fc5678cbfdcdc
Author: Adhemerval Zanella <adhemerval.zanella>
Date:   Fri Apr 12 17:39:53 2019 -0300

    support: Add support_capture_subprogram
    
    Its API is similar to support_capture_subprocess, but rather creates a
    new process based on the input path and arguments.  Under the hoods it
    uses posix_spawn to create the new process.
    
    It also allows the use of other support_capture_* functions to check
    for expected results and free the resources.

Comment 4 Sergey Kolosov 2019-09-12 11:32:18 UTC
Verified, pldd doesn't hang in glibc-2.28-56.el8

Comment 6 errata-xmlrpc 2019-11-05 21:29:05 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/RHSA-2019:3513


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