Ubuntu 20.10 - elfutils unwinding broken for s390 compat
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu on IBM z Systems |
Fix Released
|
Medium
|
Skipper Bug Screeners | ||
elfutils (Ubuntu) |
Fix Released
|
Undecided
|
Frank Heimes | ||
Groovy |
Fix Released
|
Undecided
|
Skipper Bug Screeners | ||
Hirsute |
Fix Released
|
Undecided
|
Frank Heimes |
Bug Description
SRU Bug Template:
=================
[Impact]
* There is an endianess problem in pid_memory_read that impacts s390x.
* Due to this elfutils biarch test fails on s390x doing unwinding for a 32 bit process.
[Fix]
* e4d985a3c1c873f
[Test Case]
* Have an Ubuntu Server 20.10 system or newer installed on LPAR, z/VM or KVM that comes with elfutils 0.181 or 0.182.
* Run the test script: 'run-backtrace-
* It either core dumps without the patch in place - look for "/test-subr.sh: line 84: 376822 Aborted (core dumped)" or succeeds.
[Where problems could occur]
* If the translation is not done right (shift of the upper 4 bytes + down on big endian 64 bit targets) the situation is broken in the same way, and things stay the same.
* But in worst case the changes in 'pid_memory_read' of /libdwfl/
* But the changes are quite traceable and the additional code that fixes the endianess problem is really only active on a big endian architecture.
[Other]
* The fix is upstream accepted with elfutils > 0.182.
__________
---Problem Description---
libdw unwinding fails for 32 bit binaries.
Elfutils biarch test currently fails on s390x doing unwinding for a 32 bit process.
FAIL: run-backtrace-
=======
0x557e7000 0x557eb000 /root/elfutils/
0x7dba4000 0x7dd51000 /usr/lib/
0x7dd53000 0x7dd70000 /usr/lib/
0x7dd7f000 0x7dda6000 /usr/lib/ld-2.32.so
TID 376858:
# 0 0x7dd6668a raise
# 1 0x7fd0ef60 - 1 <null>
/root/elfutils/
backtrace: backtrace.c:114: callback_verify: Assertion `symname != NULL && strcmp (symname, "sigusr2") == 0' failed.
./test-subr.sh: line 84: 376822 Aborted (core dumped) LD_LIBRARY_
backtrace-
FAIL run-backtrace-
Patch has already been posted and upstream committed:
https:/
Please pick up the following commit for the next release:
commit e4d985a3c1c873f
Author: Andreas Krebbel <email address hidden>
Date: Thu Nov 19 20:32:24 2020 +0100
IBM Z: Fix endianess problem in pid_memory_read
The cached reads lack the big endian adjustments done in the fallback
path.
Signed-off-by: Andreas Krebbel <email address hidden>
The patch applies cleanly ontop of elfutils_0.181-1.
====
strace right now is not built with unwinding support for IBM Z although both variants should work - libdw and libunwind.
Other distros use libdw from elfutils while Ubuntu on x86 appears to use libunwind. libdw and libunwind do support IBM Z.
It would be good to build strace with unwinding support for Z.
Related branches
- Sergio Durigan Junior (community): Approve
- Canonical Server Core Reviewers: Pending requested
-
Diff: 99 lines (+66/-1)4 files modifieddebian/changelog (+12/-0)
debian/control (+2/-1)
debian/patches/elfutils-lp1908756-groovy.patch (+51/-0)
debian/patches/series (+1/-0)
tags: | added: architecture-s39064 bugnameltc-190488 severity-medium targetmilestone-inin2104 |
Changed in ubuntu: | |
assignee: | nobody → Skipper Bug Screeners (skipper-screen-team) |
affects: | ubuntu → elfutils (Ubuntu) |
Changed in ubuntu-z-systems: | |
importance: | Undecided → Medium |
assignee: | nobody → Skipper Bug Screeners (skipper-screen-team) |
description: | updated |
Changed in elfutils (Ubuntu Groovy): | |
status: | New → In Progress |
tags: |
added: verification-done verification-done-groovy removed: verification-needed verification-needed-groovy |
Changed in ubuntu-z-systems: | |
status: | In Progress → Fix Committed |
Changed in ubuntu-z-systems: | |
status: | Fix Committed → Fix Released |
MP for hirsute is open