Bug 2120974

Summary: FTBFS: openblas 0.3.21 does not build on ppc64le
Product: [Fedora] Fedora Reporter: Honza Horak <hhorak>
Component: openblasAssignee: Ali Erdinc Koroglu <aekoroglu>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: aekoroglu, fweimer, nforro, susi.lehtola
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openblas-0.3.21-3.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-26 05:30:00 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: 2112099, 2116398    

Description Honza Horak 2022-08-24 08:28:08 UTC
Description of problem:
The last update to 0.3.21 results in openblas not building build-able on ppc64le. The same output is seen in all Fedora versions, so it's likely not caused by any dependency.

I'm not able to see something useful in the build.log, other than:

rm -f ?BLAT3.SUMM
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./test_sbgemm > SBBLAT3.SUMM
rm -f ?BLAT2.SUMM
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./sblat2 < ./sblat2.dat
make[1]: *** [Makefile:167: level3] Error 139
make[1]: *** Waiting for unfinished jobs....
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./dblat2 < ./dblat2.dat
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./cblat2 < ./cblat2.dat
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./zblat2 < ./zblat2.dat
make[1]: Leaving directory '/builddir/build/BUILD/openblas-0.3.21/serial64/test'
make: *** [Makefile:149: tests] Error 2
make: Leaving directory '/builddir/build/BUILD/openblas-0.3.21/serial64'
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.xO3ycH (%build)
    Bad exit status from /var/tmp/rpm-tmp.xO3ycH (%build)
Child return code was: 1

For example this scratch build:
https://kojipkgs.fedoraproject.org//work/tasks/6996/91196996/build.log

Comment 1 Susi Lehtola 2022-08-24 08:38:31 UTC
Ali, please fix your build

 +* Mon Aug 08 2022 Ali Erdinc Koroglu <aekoroglu> - 0.3.21-1
 +- Update to 0.3.21 (RHBZ #2116398)

Comment 2 Honza Horak 2022-08-24 13:03:45 UTC
I've tried to localize the build failure and it seems to be this segfault:

$ cd /home/builder/rpmbuild/BUILD/openblas-0.3.21/serial64/test
$ OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 gdb ./test_sbgemm
(gdb) run
Starting program: /home/builder/rpmbuild/BUILD/openblas-0.3.21/serial64/test/test_sbgemm 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
sgemm_beta_POWER9 () at ../kernel/power/gemm_beta.S:115
115		STFD	f0,   0 * SIZE(CO1)
(gdb) bt
#0  sgemm_beta_POWER9 () at ../kernel/power/gemm_beta.S:115
(gdb) l
110		mtspr	CTR, r0
111		ble	LL(15)
112		.align 4
113	
114	LL(12):
115		STFD	f0,   0 * SIZE(CO1)
116		STFD	f0,   1 * SIZE(CO1)
117		STFD	f0,   2 * SIZE(CO1)
118		STFD	f0,   3 * SIZE(CO1)
119		STFD	f0,   4 * SIZE(CO1)

I have to confess I don't have a clue what to do with this :(

Comment 3 Ali Erdinc Koroglu 2022-08-24 14:12:48 UTC
Honza already mentioned this bug in OpenBLAS [1] thanks for that and I applied offered change [2] and run a new build for ppc64le.

1 - https://github.com/xianyi/OpenBLAS/issues/3738
2 - https://github.com/xianyi/OpenBLAS/pull/3718

Comment 4 Honza Horak 2022-08-25 14:49:51 UTC
@ali.erdinc.koroglu 

PR ready: https://src.fedoraproject.org/rpms/openblas/pull-request/3

Comment 5 Ali Erdinc Koroglu 2022-08-25 17:21:24 UTC
@hhorak I applied that patch yesterday but ismin tests are failed on mock, can you successfully compile the package ?

Comment 6 Fedora Update System 2022-08-26 05:17:38 UTC
FEDORA-2022-be1b006c05 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-be1b006c05

Comment 7 Ali Erdinc Koroglu 2022-08-26 05:30:00 UTC
Thank you @hhorak, if I've problem with ppc64 again I know who to talk to :)

Comment 8 Fedora Update System 2022-08-26 10:33:49 UTC
FEDORA-2022-be1b006c05 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-be1b006c05`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-be1b006c05

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2022-08-27 17:07:17 UTC
FEDORA-2022-19c5af6083 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-19c5af6083`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-19c5af6083

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2022-09-12 17:40:26 UTC
FEDORA-2022-19c5af6083 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.