Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1873552

Summary: [RHEL 7 DTS 10] sigign.test fails on rhel-7.9
Product: Red Hat Developer Toolset Reporter: Edjunior Barbosa Machado <emachado>
Component: straceAssignee: Eugene Syromiatnikov <esyr>
Status: CLOSED CANTFIX QA Contact: Martin Cermak <mcermak>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: DTS 10.0 RHEL 7CC: dj, emachado, esyr, fche, law, mjw, mnewsome, ohudlick
Target Milestone: alphaKeywords: Bugfix, Patch
Target Release: 9.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1780068 Environment:
Last Closed: 2021-01-15 16:33:12 UTC Type: ---
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: 1780068, 1793984, 1874594    
Bug Blocks:    

Description Edjunior Barbosa Machado 2020-08-28 15:27:21 UTC
The testcase sigign.test also fails using devtoolset-10-strace-5.7-2.el7 on RHEL-7.9-20200824.2, not only on s390x but also on the other supported arches, although the failures seem slightly different:

From test-suite.log on rhel-7.9 s390x:

(...)
+ for ign in 0 1
+ set_cmd='../set_sigign 1 4'
+ check_cmd='../check_sigign 1 4'
+ run_prog ../set_sigign 1 4 ../check_sigign 1 4
+ '[' 6 -eq 0 ']'
+ args='../set_sigign 1 4 ../check_sigign 1 4'
+ ../set_sigign 1 4 ../check_sigign 1 4
+ STRACE='../set_sigign 1 4 /opt/rh/devtoolset-10/root/usr/bin/strace'
+ for i in ''\'''\''' --interruptible=always --interruptible=2 -Inever -I4
+ run_strace -enone ../check_sigign 1 4
+ args='-enone ../check_sigign 1 4'
+ ../set_sigign 1 4 /opt/rh/devtoolset-10/root/usr/bin/strace -o log -enone ../check_sigign 1 4
+ dump_log_and_fail_with '../set_sigign 1 4 /opt/rh/devtoolset-10/root/usr/bin/strace -enone ../check_sigign 1 4 failed with code 1'
+ cat
+++ exited with 1 +++
+ fail_ '../set_sigign 1 4 /opt/rh/devtoolset-10/root/usr/bin/strace -enone ../check_sigign 1 4 failed with code 1'
+ warn_ 'sigign.test: failed test: ../set_sigign 1 4 /opt/rh/devtoolset-10/root/usr/bin/strace -enone ../check_sigign 1 4 failed with code 1'
+ printf '%s\n' 'sigign.test: failed test: ../set_sigign 1 4 /opt/rh/devtoolset-10/root/usr/bin/strace -enone ../check_sigign 1 4 failed with code 1'
sigign.test: failed test: ../set_sigign 1 4 /opt/rh/devtoolset-10/root/usr/bin/strace -enone ../check_sigign 1 4 failed with code 1
+ exit 1
FAIL sigign.test (exit status: 1)

and on other rhel-7.9 supported arches (ppc64, ppc64le and x86_64):

(...)
+ for sig in '$(../list_sigaction_signum)'
+ for ign in 0 1
+ set_cmd='../set_sigign 0 13'
+ check_cmd='../check_sigign 0 13'
+ run_prog ../set_sigign 0 13 ../check_sigign 0 13
+ '[' 6 -eq 0 ']'
+ args='../set_sigign 0 13 ../check_sigign 0 13'
+ ../set_sigign 0 13 ../check_sigign 0 13
+ STRACE='../set_sigign 0 13 /opt/rh/devtoolset-10/root/usr/bin/strace'
+ for i in ''\'''\''' --interruptible=always --interruptible=2 -Inever -I4
+ run_strace -enone ../check_sigign 0 13
+ args='-enone ../check_sigign 0 13'
+ ../set_sigign 0 13 /opt/rh/devtoolset-10/root/usr/bin/strace -o log -enone ../check_sigign 0 13
+ dump_log_and_fail_with '../set_sigign 0 13 /opt/rh/devtoolset-10/root/usr/bin/strace -enone ../check_sigign 0 13 failed with code 1'
+ cat
+++ exited with 1 +++
+ fail_ '../set_sigign 0 13 /opt/rh/devtoolset-10/root/usr/bin/strace -enone ../check_sigign 0 13 failed with code 1'
+ warn_ 'sigign.test: failed test: ../set_sigign 0 13 /opt/rh/devtoolset-10/root/usr/bin/strace -enone ../check_sigign 0 13 failed with code 1'
+ printf '%s\n' 'sigign.test: failed test: ../set_sigign 0 13 /opt/rh/devtoolset-10/root/usr/bin/strace -enone ../check_sigign 0 13 failed with code 1'
sigign.test: failed test: ../set_sigign 0 13 /opt/rh/devtoolset-10/root/usr/bin/strace -enone ../check_sigign 0 13 failed with code 1
+ exit 1
FAIL sigign.test (exit status: 1)



+++ This bug was initially created as a clone of Bug #1780068 +++

Description of problem:

sigign.test from strace internal testsuite fails on rhel-8.2 s390x. From tests/test-suite.log:

(...)
FAIL: sigign
============

+++ exited with 1 +++
sigign.test: failed test: ../set_sigign 1 4 /usr/bin/strace -enone ../check_sigign 1 4 failed with code 1
(...)

This failure wasn't seen in other rhel-8 supported arches.

Version-Release number of selected component (if applicable):
strace-4.24-6.el8

How reproducible:
100%

Steps to Reproduce:

As normal user:
1. rpm -ivh strace-4.24-6.el8.src.rpm
2. rpmbuild -bc ~/rpmbuild/SPECS/strace.spec
3. cd ~/rpmbuild/BUILD/strace-4.24/
4. chmod u+x tests/*.test tests-m32/*.test tests-mx32/*.test
5. make -k check STRACE=/usr/bin/strace TIMEOUT_DURATION=1500

Actual results:
(...)
PASS: restart_syscall.test
PASS: sigblock.test
FAIL: sigign.test
PASS: strace-C.test
PASS: strace-E.test
(...)
============================================================================                                                                                                                                         
Testsuite summary for strace 4.24                                                                                                                                                                                    
============================================================================                                                                                                                                         
# TOTAL: 605                                                                                                                                                                                                         
# PASS:  521                                                                                                                                                                                                         
# SKIP:  83                                                                                                                                                                                                          
# XFAIL: 0                                                                                                                                                                                                           
# FAIL:  1                                                                                                                                                                                                           
# XPASS: 0                                                                                                                                                                                                           
# ERROR: 0                                                                                                                                                                                                           
============================================================================                                                                                                                                         
(...)

Expected results:
No unexpected failures

Additional info:
RHEL-8.2.0-20191203.0

--- Additional comment from Edjunior Barbosa Machado on 2019-12-06 10:45:57 UTC ---

This failure is not reproducible on s390x running RHEL-8.1.1-20191205.n.1 (kernel 4.18.0-147.0.3.el8_1.s390x).

--- Additional comment from Eugene Syromiatnikov on 2020-01-22 12:43:36 UTC ---

As outlined in bug 1793984, the root issue is withing openssl package, which is now pulled in due to appearance of debuginfod package (elfutils-debuginfod-client, specifically) in the RHEL 8.2.0 compose.

I think this bug can be marked as SanityOnly and re-checked once the bug 1793984 is resolved.

--- Additional comment from Eugene Syromiatnikov on 2020-02-13 13:21:50 UTC ---

It seems that openssl-1.1.1c-13.el8 is now available, it's probably worth re-run the test once the package reach compose.

--- Additional comment from Edjunior Barbosa Machado on 2020-02-13 16:47:10 UTC ---

(In reply to Eugene Syromiatnikov from comment #3)
> It seems that openssl-1.1.1c-13.el8 is now available, it's probably worth
> re-run the test once the package reach compose.

Just verified that sigign.test no longer fails with strace-4.24-9.el8 and openssl-1.1.1c-13.el8 on RHEL-8.2.0-20200211.n.0:

https://beaker.engineering.redhat.com/recipes/7900427#task106100660

--- Additional comment from Frank Ch. Eigler on 2020-02-13 16:48:29 UTC ---

thanks all for this great cooperation

Comment 4 Eugene Syromiatnikov 2020-09-01 17:44:16 UTC
Okay, so, on s390x the issue is similar, it is caused by missing restore of SIGILL/SIFPE handlers by openssl, in OPENSSL_cpuid_setup function.  I've opened bug 1874594 in that regard.

On others architectures it is different, the masked SIGPIPE comes from nspr:

rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=0}, NULL, 8) = 0
 > /usr/lib64/libpthread-2.17.so(__libc_sigaction+0xa4) [0x19714]
 > /usr/lib64/libpthread-2.17.so(__sigaction+0x1b) [0x197eb]
 > /usr/lib64/libnspr4.so(_PR_UnixInit+0x5b) [0x400cb]
 > /usr/lib64/libnspr4.so(_PR_InitStuff+0x223) [0x297a3]
 > /usr/lib64/libcurl.so.4.3.0(Curl_nss_init+0x3f) [0x59cff]
 > /usr/lib64/libcurl.so.4.3.0(Curl_ssl_init+0x27) [0x4d547]
 > /usr/lib64/libcurl.so.4.3.0(curl_global_init+0x87) [0x3a5b7]
 > /opt/rh/devtoolset-10/root/usr/lib64/libdebuginfod-0.180.so(libdebuginfod_ctor+0x13) [0x2213]
 > /usr/lib64/ld-2.17.so(_dl_init_internal+0x157) [0x196e7]
 > /usr/lib64/ld-2.17.so(dl_open_worker+0x783) [0x1fa03]
 > /usr/lib64/ld-2.17.so(_dl_catch_error+0x9f) [0x1941f]
 > /usr/lib64/ld-2.17.so(_dl_open+0xeb) [0x1ebdb]
 > /usr/lib64/libdl-2.17.so(dlopen_doit+0x93) [0x17b3]
 > /usr/lib64/ld-2.17.so(_dl_catch_error+0x9f) [0x1941f]
 > /usr/lib64/libdl-2.17.so(_dlerror_run+0xb7) [0x2227]
 > /usr/lib64/libdl-2.17.so(dlopen@@GLIBC_2.3+0x3f) [0x18af]
 > /opt/rh/devtoolset-10/root/usr/bin/strace(__libdwfl_debuginfod_init+0x2b) [0x1000690b]
 > /opt/rh/devtoolset-10/root/usr/bin/strace(__libc_csu_init+0x8b) [0x100d169b]
 > /usr/lib64/libc-2.17.so(generic_start_main.isra.0+0xcb) [0x47c6b]
 > /usr/lib64/libc-2.17.so(generic_start_main.isra.0+0xcb) [0x47c6b]
 > /usr/lib64/libc-2.17.so(__libc_start_main+0xb3) [0x47ef3]
 > No DWARF information found

It seems that the signal-action-breaking behaviour is present in upstream as well[1].  I'm not sure why it doesn't happen on RHEL 8, however.

(btw, scl enable devtoolset-10 -- /opt/rh/devtoolset-10/root/usr/bin/strace -k -e trace=%signal ../set_sigign 0 13 /opt/rh/devtoolset-10/root/usr/bin/strace -enone ../check_sigign 0 13 fails on s390x as well, it just happens that the openssl issue masks it).

[1] https://hg.mozilla.org/projects/nspr/file/tip/pr/src/md/unix/unix.c#l2820

Comment 5 Eugene Syromiatnikov 2020-09-01 17:51:19 UTC
Since 1874594 has been closed as WONTFIX, this one does not seem to be able to be helped, unless strace/libdw switch to on-demand loading of the offending libraries.

Comment 6 Eugene Syromiatnikov 2021-01-15 16:33:12 UTC
Closing as CANTFIX per comment 5 (and the fact that while on-demand loading would avoid the test failure, the issue itself won't go when -k option is used).