gmp z13 config fails with illegal instructions

Bug #2029438 reported by Matthias Klose
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Fix Released
High
bugproxy
gmp (Ubuntu)
Fix Released
Medium
Frank Heimes

Bug Description

seen with
https://launchpad.net/ubuntu/+source/gmp/2:6.3.0+dfsg-2ubuntu2/+build/26470068

Note, that MPN_PATH is now unset in 2:6.3.0+dfsg-2ubuntu3

[...]
../../../test-driver: line 112: 76812 Illegal instruction (core dumped) "$@" >> "$log_file" 2>&1
FAIL: t-hamdist
PASS: t-oddeven
../../../test-driver: line 112: 76824 Illegal instruction (core dumped) "$@" >> "$log_file" 2>&1
FAIL: t-popcount
PASS: t-set_f
PASS: t-io_raw
PASS: t-import
PASS: t-export
PASS: t-pprime_p
../../../test-driver: line 112: 76856 Illegal instruction (core dumped) "$@" >> "$log_file" 2>&1
FAIL: t-nextprime
PASS: t-remove
PASS: t-limbs
============================================================================
Testsuite summary for GNU MP 6.3.0
============================================================================
# TOTAL: 64
# PASS: 57
# SKIP: 0
# XFAIL: 0
# FAIL: 7
# XPASS: 0
# ERROR: 0
============================================================================
See tests/mpz/test-suite.log
Please report to <email address hidden> (see https://gmplib.org/manual/Reporting-Bugs.html)

Matthias Klose (doko)
Changed in gmp (Ubuntu):
status: New → Confirmed
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
assignee: nobody → bugproxy (bugproxy)
status: New → Confirmed
tags: added: s390x
tags: added: reverse-proxy-bugzilla
bugproxy (bugproxy)
tags: added: architecture-s39064 bugnameltc-203320 severity-critical targetmilestone-inin---
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2023-08-03 10:39 EDT-------
I've reproduced those FAILs when running on z13 with gmp_6.3.0+dfsg-2ubuntu2.

Unfortunately not only the extended mnemonics for vpopct are not available with z13, but also vpopct M3=1-3 is reserved. Thus you'll get an illegal-instruction if run on z13 as vector enhancement facility 1 (introduced with z14) is not available.

I've already send the obvious fix to the gmp-mailing-list:
'Revert "Move popcount and hamdist back from z14 to z13 after needed edits."'
https://gmplib.org/list-archives/gmp-devel/2023-August/006198.html
and Torbj?rn has already committed it:
https://gmplib.org/repo/gmp/rev/372acfd0c33e

With this patch applied, gmp_6.3.0+dfsg-2ubuntu2 builds without test-suite-fails on z13.

Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Confirmed → In Progress
Changed in gmp (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Frank Heimes (fheimes)
importance: Undecided → Medium
Changed in ubuntu-z-systems:
importance: Undecided → High
Revision history for this message
Frank Heimes (fheimes) wrote :

A test build of the patched package (now gmp_6.3.0+dfsg-2ubuntu4) is being build at PPA:
https://launchpad.net/~fheimes/+archive/ubuntu/lp2029438

The testsuite was successful - especially on s390x:

============================================================================
Testsuite summary for GNU MP 6.3.0
============================================================================
# TOTAL: 8
# PASS: 8
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================

No lintian errors.

Attaching debdiff.

Subscribing 'ubuntu-sponsors'.

Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: In Progress → Fix Committed
Changed in gmp (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2023-08-22 07:22 EDT-------
Hi Frank,
I've installed gmp_6.3.0+dfsg-2ubuntu4. The popcount/hamdist functions are not using vpopcnt z14-instructions anymore, which leaded to the segfault. And the z13 functions are now enabled again.
Thanks

Revision history for this message
Frank Heimes (fheimes) wrote :

Updated package has landed in mantic:
gmp | 2:6.3.0+dfsg-2ubuntu4 | mantic | source
Closing ticket as Fix Released.

Changed in gmp (Ubuntu):
status: Fix Committed → Fix Released
Changed in ubuntu-z-systems:
status: Fix Committed → Fix Released
bugproxy (bugproxy)
tags: added: targetmilestone-inin2310
removed: targetmilestone-inin---
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2023-08-28 04:22 EDT-------
Thanks @Canonical for catching this.
Thank you Stefan for your fix & successful verification.

The updated package has been included in Mantic, therefore we can close this bug.

==> Changing the status to: "CLOSED"

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.