Bug 1764226

Summary: glibc: Various test suite enhancements
Product: Red Hat Enterprise Linux 8 Reporter: Florian Weimer <fweimer>
Component: glibcAssignee: Arjun Shankar <ashankar>
Status: CLOSED ERRATA QA Contact: qe-baseos-tools-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: ashankar, codonell, dj, fweimer, mnewsome, pfrankli, skolosov
Target Milestone: rcKeywords: Patch, Triaged
Target Release: 8.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glibc-2.28-80.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 16:50:19 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:
Bug Depends On:    
Bug Blocks: 1746918    

Description Florian Weimer 2019-10-22 13:45:51 UTC
We should backport the following commits:

commit 6c29942cbf059aca47fd4bbd852ea42c9d46b71f
Author: Stefan Liebler <stli.com>
Date:   Mon Feb 18 16:12:01 2019 +0100

    misc/tst-clone3: Fix waiting for exited thread.
    
    From time to time the test misc/tst-clone3 fails with a timeout.
    Then futex_wait is blocking.  Usually ctid should be set to zero
    due to CLONE_CHILD_CLEARTID and the futex should be waken up.
    But the fail occures if the thread has already exited before
    ctid is set to the return value of clone().  Then futex_wait() will
    block as there will be nobody who wakes the futex up again.
    
    This patch initializes ctid to a known value before calling clone
    and the kernel is the only one who updates the value to zero after clone.
    If futex_wait is called then it is either waked up due to the exited thread
    or the futex syscall fails as *ctid_ptr is already zero instead of the
    specified value 1.
    
    ChangeLog:
    
            * sysdeps/unix/sysv/linux/tst-clone3.c (do_test):
            Initialize ctid with a known value and remove update of ctid
            after clone.
            (wait_tid): Adjust arguments and call futex_wait with ctid_val
            as assumed current value of ctid_ptr.

commit 481c30cb9573a280649fbf27251e6a0f4af1b2b1
Author: Alexandra Hájková <ahajkova>
Date:   Thu May 9 13:51:40 2019 +0200

    elf: Add tst-ldconfig-bad-aux-cache test [BZ #18093]
    
    This test corrupts /var/cache/ldconfig/aux-cache and executes ldconfig
    to check it will not segfault using the corrupted aux_cache. The test
    uses the test-in-container framework. Verified no regressions on
    x86_64.

commit a6c1ce778e5c05a2e6925883b410157ef47654fd
Author: Alexandra Hájková <ahajkova>
Date:   Mon Aug 5 13:18:57 2019 +0200

    elf: tst-ldconfig-bad-aux-cache: use support_capture_subprocess

Comment 3 Sergey Kolosov 2020-02-16 09:46:00 UTC
Verified with glibc testsuite

Comment 5 errata-xmlrpc 2020-04-28 16:50:19 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-2020:1828