Bug 1647490 - glibc: stdlib/test-bz22786 test suite failure on s390x [rhel-7.7]
Summary: glibc: stdlib/test-bz22786 test suite failure on s390x [rhel-7.7]
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: glibc
Version: 7.7
Hardware: s390x
OS: Linux
Target Milestone: rc
: ---
Assignee: Florian Weimer
QA Contact: Sergey Kolosov
: 1607947 (view as bug list)
Depends On: 1638523
Blocks: 1643040
TreeView+ depends on / blocked
Reported: 2018-11-07 15:24 UTC by Florian Weimer
Modified: 2019-08-06 12:49 UTC (History)
10 users (show)

Fixed In Version: glibc-2.17-265.el7
Doc Type: No Doc Update
Doc Text:
Clone Of: 1638523
Last Closed: 2019-08-06 12:49:40 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:2118 None None None 2019-08-06 12:49:54 UTC

Description Florian Weimer 2018-11-07 15:24:35 UTC
+++ This bug was initially created as a clone of Bug #1638523 +++

Description of problem:
stdlib/test-bz22786 test fails with timeout error on s390x 

Actual results:
[root@ibm-z-114 build-s390x-redhat-linux]# ./testrun.sh stdlib/test-bz22786
Timed out: killed the child process
[root@ibm-z-114 build-s390x-redhat-linux]# cd stdlib/
[root@ibm-z-114 stdlib]# time ./test-bz22786
Timed out: killed the child process

real	0m20.345s
user	0m0.388s
sys	0m2.513s
[root@ibm-z-114 stdlib]# 

Expected results:

Additional info:
The test fails only on s390x architecture

--- Additional comment from Sergey Kolosov on 2018-10-11 22:02:15 CEST ---

The result with TIMEOUTFACTOR=999

[root@ibm-z-114 stdlib]# time TIMEOUTFACTOR=999 ./test-bz22786

real	1m26.320s
user	0m1.716s
sys	0m5.237s
[root@ibm-z-114 stdlib]#

machine: https://beaker.engineering.redhat.com/view/ibm-z-114.rhts.eng.bos.redhat.com#details

--- Additional comment from Carlos O'Donell on 2018-10-11 22:05:11 CEST ---

(In reply to Sergey Kolosov from comment #1)
> The result with TIMEOUTFACTOR=999
> [root@ibm-z-114 stdlib]# time TIMEOUTFACTOR=999 ./test-bz22786
> real	1m26.320s
> user	0m1.716s
> sys	0m5.237s
> [root@ibm-z-114 stdlib]#
> machine:
> https://beaker.engineering.redhat.com/view/ibm-z-114.rhts.eng.bos.redhat.
> com#details

That is a really slow box. This test is known for being slow because it allocates a lot of memory for a very long path. And that might be really slow.

So it looks like we need to raise the timeout here to ~150s.

--- Additional comment from Florian Weimer on 2018-10-26 20:13:28 CEST ---

I posted a patch which reduces the memory requirement:


The quoted performance numbers are from an s390x Beaker box.

We should review this patch upstream and backport it.

--- Additional comment from Florian Weimer on 2018-11-07 16:23:07 CET ---

In addition to the support/ backports, the following commits are recommended for backport (in reverse chronological order):

commit 60708030536df82616c16aa2f14f533c4362b969
Author: Florian Weimer <fweimer@redhat.com>
Date:   Tue Oct 30 13:56:40 2018 +0100

    stdlib/test-bz22786: Avoid memory leaks in the test itself

commit 07da99aad93c9364acb7efdab47c27ba698f6313
Author: Florian Weimer <fweimer@redhat.com>
Date:   Tue Oct 30 13:55:01 2018 +0100

    stdlib/tst-strtod-overflow: Switch to support_blob_repeat
    This is another test with an avoidable large memory allocation.

commit f5e7e95921847bd83186bfe621fc2b48c4de5477
Author: Florian Weimer <fweimer@redhat.com>
Date:   Tue Oct 30 13:11:47 2018 +0100

    stdlib/test-bz22786: Avoid spurious test failures using alias mappings
    On systems without enough random-access memory, stdlib/test-bz22786
    will go deeply into swap and time out, even with a substantial
    TIMEOUTFACTOR.  This commit adds a facility to construct repeating
    strings with alias mappings, so that the requirement for physical
    memory, and uses it in stdlib/test-bz22786.

Comment 1 Florian Weimer 2018-11-09 12:57:59 UTC
Further required backports:

commit 3bad2358d67d371497079bba4f8eca9c0096f4e2
Author: Stefan Liebler <stli@linux.ibm.com>
Date:   Thu Aug 30 08:44:32 2018 +0200

    Test stdlib/test-bz22786 exits now with unsupported if malloc fails.
    The test tries to allocate more than 2^31 bytes which will always fail on s390
    as it has maximum 2^31bit of memory.
    Before commit 6c3a8a9d868a8deddf0d6dcc785b6d120de90523, this test returned
    unsupported if malloc fails.  This patch re enables this behaviour.
    Furthermore support_delete_temp_files() failed to remove the temp directory
    in this case as it is not empty due to the created symlink.
    Thus the creation of the symlink is moved behind malloc.
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
            * stdlib/test-bz22786.c (do_test): Return EXIT_UNSUPPORTED
            if malloc fails.

commit 6c3a8a9d868a8deddf0d6dcc785b6d120de90523
Author: Paul Pluzhnikov <ppluzhnikov@kazbek.mtv.corp.google.com>
Date:   Fri Aug 24 18:08:51 2018 -0700

    Fix BZ#23400 (creating temporary files in source tree), and undefined behavior in test.

Comment 2 Florian Weimer 2018-11-22 15:31:28 UTC
*** Bug 1607947 has been marked as a duplicate of this bug. ***

Comment 5 Sergey Kolosov 2019-03-21 13:11:46 UTC

the test passes in glibc-2.17-265.el7.s390x, the test fails by timeout in glibc-2.17-262.el7.s390x. On 31bit architecture s390, it has the same behavior in both versions glibc-2.17-262.el7.s390 and glibc-2.17-265.el7.s390, the test fails with EXIT_UNSUPPORTED in both versions. Tested on a host with 2048 MB system memory.

Comment 7 errata-xmlrpc 2019-08-06 12:49:40 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.


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