Bug 2065349
| Summary: | acpica-tools' spec file %check run of ASL tests on s390x segfaults | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Dean Nelson <dnelson> |
| Component: | acpica-tools | Assignee: | Dean Nelson <dnelson> |
| Status: | CLOSED ERRATA | QA Contact: | Jiri Dluhos <jdluhos> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 9.0 | CC: | jdluhos |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | 9.2 | Flags: | pm-rhel:
mirror+
|
| Hardware: | s390x | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | acpica-tools-20210604-4.el9 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-05-09 08:15:57 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: | |||
NB: this currently occurs in the upstream 20211217 release, and Fedora, as well: run 'iasl -T all' and the segfault occurs. Investigating, (In reply to Al Stone from comment #1) > NB: this currently occurs in the upstream 20211217 release, and Fedora, as > well: run 'iasl -T all' and the segfault occurs. Thanks for the info. Very helpful. I was curious and as a learning exercise I tried running iasl directly, and noticed that 3 of the tables result in a segfault. All of which end up with rather large .asl files (unlike the other tables)... [root@s390x-kvm testing-dir]# ls -l prmt.asl rgrt.asl svkl.asl -rw-r--r--. 1 root root 3829760 Mar 22 13:23 prmt.asl -rw-r--r--. 1 root root 1564672 Mar 22 13:24 rgrt.asl -rw-r--r--. 1 root root 6201344 Mar 22 13:27 svkl.asl [root@s390x-kvm testing-dir]# The contents of each, look like something is getting into a loop and not letting go until the segfault terminates things. So rather than 'all' to reproduce this problem, one can run any of the following... iasl -T prmt iasl -T rgrt iasl -T svkl and get a segfault. (In reply to Dean Nelson from comment #2) > So rather than 'all' to reproduce this problem, one can run any of the > following... > > iasl -T prmt > iasl -T rgrt > iasl -T svkl > > and get a segfault. So back at the end of March 2022, I created three patches, one for each of these segfaults, and sent them to Al Stone... 0047-Support-PRMT-in-a-big-endian-world.patch 0048-Support-RGRT-in-a-big-endian-world.patch 0049-Support-SVKL-in-a-big-endian-world.patch He added them to Fedora Rawhide via fc3eef63e813 ("Update to 20220331 upstream sources"). I plan on backporting a portion of fc3eef63e813 (just these three patches, not the update to 20220331) for RHEL-9.2. And I'll be setting the DTM value shortly.(I first want to talk with Jiri Dluhos about this and two other acpica-tools BZs, that I'd like to do for 9.2.) (In reply to Dean Nelson from comment #2) > > So rather than 'all' to reproduce this problem, one can run any of the > following... > > iasl -T prmt > iasl -T rgrt > iasl -T svkl > > and get a segfault. And after eliminating the segfaults, there was the following showing up when running tests/aslts.sh... make: *** [Makefile:25: prmt.aml] Error 255 (With their segfaults eliminated, the other two tables PASS'd the test.) To reproduce the 'Error 255' simply run... iasl -T prmt iasl prmt.asl And the fix for this is also in the posted MR... https://gitlab.com/redhat/centos-stream/rpms/acpica-tools/-/merge_requests/4 Verified:Tested (see below), big thanks for excellent bug description and perfect how-to for reproducing! It's a joy working with such bugreports! :) --------------------- With the original acpica-tools, the crash is easy to reproduce: # rpm -q acpica-tools acpica-tools-20210604-3.el9.s390x # iasl -T prmt Segmentation fault (core dumped) --------------------- With the patch, everything works as expected: # rpm -q acpica-tools acpica-tools-20210604-4.el9.s390x # iasl -T prmt Created ACPI table template for [PRMT], written to "prmt.asl" # iasl -T rgrt Created ACPI table template for [RGRT], written to "rgrt.asl" # iasl -T svkl Created ACPI table template for [SVKL], written to "svkl.asl" # iasl prmt.asl Intel ACPI Component Architecture ASL+ Optimizing Compiler/Disassembler version 20210604 Copyright (c) 2000 - 2021 Intel Corporation Table Input: prmt.asl - 6711 bytes 110 fields 135 source lines Binary Output: prmt.aml - 696 bytes Compilation successful. 0 Errors, 0 Warnings, 0 Remarks # echo $? 0 Confirming that with acpica-tools-20210604-5, all commands mentioned in comment#2 and #7 work as expected: # iasl -T prmt Created ACPI table template for [PRMT], written to "prmt.asl" # iasl -T rgrt Created ACPI table template for [RGRT], written to "rgrt.asl" # iasl -T svkl Created ACPI table template for [SVKL], written to "svkl.asl" # iasl prmt.asl Intel ACPI Component Architecture ASL+ Optimizing Compiler/Disassembler version 20210604 Copyright (c) 2000 - 2021 Intel Corporation Table Input: prmt.asl - 6711 bytes 110 fields 135 source lines Binary Output: prmt.aml - 696 bytes Compilation successful. 0 Errors, 0 Warnings, 0 Remarks (With the older acpica-tools, a segfault occurred immediately after the first command.) 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 (acpica-tools bug fix and enhancement update), 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-2023:2477 |
Description of problem: During the building of acpica-tools, the spec file's %check runs the ASL tests. When run on s390x, a segfault occurs. The following is from the build.log for the build of acpica-tools-20210604-3.el9 on s390x... + cd tests + ./aslts.sh : make[1]: Entering directory '/builddir/build/BUILD/acpica-unix2-20210604/generate/unix/iasl' : - Link obj/iasl - Copy obj/iasl to ../bin/iasl make[1]: Leaving directory '/builddir/build/BUILD/acpica-unix2-20210604/generate/unix/iasl' make[1]: Entering directory '/builddir/build/BUILD/acpica-unix2-20210604/generate/unix/acpibin' : - Link obj/acpibin - Copy obj/acpibin to ../bin/acpibin make[1]: Leaving directory '/builddir/build/BUILD/acpica-unix2-20210604/generate/unix/acpibin' make[1]: Entering directory '/builddir/build/BUILD/acpica-unix2-20210604/generate/unix/acpiexec' : - Link obj/acpiexec - Copy obj/acpiexec to ../bin/acpiexec make[1]: Leaving directory '/builddir/build/BUILD/acpica-unix2-20210604/generate/unix/acpiexec' Installing ACPICA tools ~/build/BUILD/acpica-unix2-20210604/tests/templates ~/build/BUILD/acpica-unix2-20210604/tests ./aslts.sh: line 129: 1183821 Segmentation fault (core dumped) $ASL -T all 2> /dev/null So tests/aslts.sh first calls build_acpi_tools(), which essentially does the following (without encountering an issue)... make clean make iasl ASLTS=TRUE -j$jobs make acpibin ASLTS=TRUE -j$jobs make acpiexec ASLTS=TRUE -j$jobs And then aslts.sh calls run_aslts(), which calls run_compiler_template_test(), where the segfault occurs. # Run a simple compiler test. # This test does the following: # 1 generate all sample tables in the compiler # 2 compile all tables (.asl -> .aml) # 3 disassembles all tables (.aml -> .dsl) # 4 recompiles all all tables (.dsl -> recomp.aml) # 5 runs binary comparison between .aml and recomp.aml run_compiler_template_test() { pushd templates rm -f *.asl *.aml *.dsl $ASL -T all 2> /dev/null for filename in *.asl do make -s NAME=$(basename "$filename" .asl) done rm -f *.asl *.aml *.dsl popd } (The '{' is line 129.) Following the segfault line, the build.log has the following additional lines, which reflect the output from the make for-loop... Data table apic PASS Data table asf! PASS Data table bdat PASS Data table bert PASS Data table bgrt PASS Data table boot PASS make: *** [Makefile:25: cedt.aml] Error 255 Data table cpep PASS Data table csrt PASS Data table dbg2 PASS Data table dbgp PASS Data table dmar PASS Data table drtm PASS Data table ecdt PASS Data table einj PASS Data table erst PASS Data table facp PASS Data table fpdt PASS Data table gtdt PASS Data table hest PASS Data table hmat PASS Data table hpet PASS make: *** [Makefile:16: iort_recomp.aml] Error 255 Data table ivrs PASS Data table lpit PASS Data table mcfg PASS Data table mchi PASS Data table mpst PASS Data table msct PASS make: *** [Makefile:16: msdm_recomp.aml] Error 255 make: *** [Makefile:16: nfit_recomp.aml] Error 255 Data table pcct PASS Data table pdtt PASS make: *** [Makefile:25: phat.aml] Error 255 make: *** [Makefile:25: pmtt.aml] Error 255 Data table pptt PASS make: *** [Makefile:25: prmt.aml] Error 255 Still trying to determine exactly what in 'iasl -T all' is causing the segfault. Version-Release number of selected component (if applicable): acpica-tools-20210604-3.el9 How reproducible: 100% on a s390x build. Steps to Reproduce: 1. Do a Brew build of acpica-tools on a s390x system. And look in the build.log. Or: 1. dnf install acpica-tools on a s390x system. 2. run 'iasl -T all'. Actual results: Running test aslts.sh (or 'iasl -T all') segfaults. Expected results: No segfault.