Activity log for bug #2046439

Date Who What changed Old value New value Message
2023-12-14 10:59:17 bugproxy bug added bug
2023-12-14 10:59:18 bugproxy tags architecture-s39064 bugnameltc-204491 severity-high targetmilestone-inin---
2023-12-14 10:59:19 bugproxy ubuntu: assignee Skipper Bug Screeners (skipper-screen-team)
2023-12-14 10:59:24 bugproxy affects ubuntu linux (Ubuntu)
2023-12-14 11:07:13 Frank Heimes affects linux (Ubuntu) qemu (Ubuntu)
2023-12-14 11:07:40 Frank Heimes bug task added ubuntu-z-systems
2023-12-14 11:07:54 Frank Heimes ubuntu-z-systems: assignee Skipper Bug Screeners (skipper-screen-team)
2023-12-14 11:07:57 Frank Heimes qemu (Ubuntu): assignee Skipper Bug Screeners (skipper-screen-team)
2023-12-14 11:08:04 Frank Heimes ubuntu-z-systems: importance Undecided High
2023-12-14 11:08:08 Frank Heimes ubuntu-z-systems: status New Triaged
2023-12-14 11:11:10 Christian Ehrhardt  bug added subscriber Ubuntu Server
2023-12-14 11:11:38 Christian Ehrhardt  tags architecture-s39064 bugnameltc-204491 severity-high targetmilestone-inin--- architecture-s39064 bugnameltc-204491 server-next severity-high targetmilestone-inin---
2023-12-14 11:27:11 Christian Ehrhardt  nominated for series Ubuntu Jammy
2023-12-14 11:27:11 Christian Ehrhardt  bug task added qemu (Ubuntu Jammy)
2023-12-14 11:27:11 Christian Ehrhardt  nominated for series Ubuntu Mantic
2023-12-14 11:27:11 Christian Ehrhardt  bug task added qemu (Ubuntu Mantic)
2023-12-14 11:27:11 Christian Ehrhardt  nominated for series Ubuntu Lunar
2023-12-14 11:27:11 Christian Ehrhardt  bug task added qemu (Ubuntu Lunar)
2023-12-14 11:27:16 Christian Ehrhardt  qemu (Ubuntu Mantic): status New Fix Released
2023-12-14 11:27:19 Christian Ehrhardt  qemu (Ubuntu Lunar): status New Won't Fix
2023-12-14 11:27:21 Christian Ehrhardt  qemu (Ubuntu Jammy): status New Triaged
2023-12-14 11:27:24 Christian Ehrhardt  qemu (Ubuntu): status New Fix Released
2023-12-14 11:30:14 Christian Ehrhardt  qemu (Ubuntu Jammy): importance Undecided Medium
2023-12-14 13:34:09 Sergio Durigan Junior tags architecture-s39064 bugnameltc-204491 server-next severity-high targetmilestone-inin--- architecture-s39064 bugnameltc-204491 server-todo severity-high targetmilestone-inin---
2023-12-14 13:34:58 Sergio Durigan Junior qemu (Ubuntu Jammy): assignee Sergio Durigan Junior (sergiodj)
2024-01-18 23:39:41 Sergio Durigan Junior qemu (Ubuntu Jammy): status Triaged In Progress
2024-01-19 14:02:27 Frank Heimes description ---Problem Description--- Wrong code execution with qemu ---Steps to Reproduce--- please have a look at the following bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112986 ------------------------------------------------------------------------ Contact Information = Andreas Krebbel <krebbel@linux.ibm.com> Machine Type = IBM Z Userspace tool common name: qemu The userspace tool has the following bit modes: 64 bit Userspace deb: - 1:6.2+dfsg-2ubuntu6.15 ------------------------------------------------------------------------ Frequently used s390x code sequences are wrongly executed when running with qemu instruction set emulation. The problem has been fixed in upstream qemu already. A backport for qemu 7 branch has been committed as well. The qemu 6.2.0 version used in Ubuntu 22.04 needs a backport of a trivial fix to work properly: From the GCC BZ: Problem fixed in v8.0.0 (https://gitlab.com/qemu-project/qemu/-/commit/54fce97cfcaf5463ee5f325bc1f1d4adc2772f38). The fix was backported to v7.2.2 (https://gitlab.com/qemu-project/qemu/-/commit/17b032c6598ea756889f25e8d3e4cd9f2036669b), but not to v6. Please consider picking up https://gitlab.com/qemu-project/qemu/-/commit/17b032c6598ea756889f25e8d3e4cd9f2036669b for the Ubuntu 22.04 qemu package 1:6.2+dfsg-2ubuntu6.15 SRU Justification: [ Impact ] * Wrong code execution with qemu. * Frequently used s390x code sequences are wrongly executed when running with qemu instruction set emulation. * This happens only in KVM VMs, not while running natively on s390x. * For example also with gcc 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) on WSL (Windows 11_5.15.90.1-microsoft-standard-WSL2) with any kind of Build Optimization Options: O0, O1, O2, O3 on KVM - like reported. * The problem was probably introduced with: Convert COMPARE, COMPARE LOGICAL https://gitlab.com/qemu-project/qemu/-/commit/a7e836d5 and got fixed with: https://gitlab.com/qemu-project/qemu/-/commit/17b032c6 [ Test Plan ] * An Ubuntu Server 22.04 LTS installed on an s390x LPAR as KVM host and a KVM guest running on top - again 22.04. * Have a build environment installed with gcc 11(.4). * Now compiling this reproducer: #include <stdio.h> signed short v1 = 1; signed int v2 = 2; unsigned long long bug = 0; int main () { if ((v1 < v2)) { bug = v2; } printf("bug = %llu\n", bug); return 0; } with: gcc -o bug0 bug.c -O0 -fsanitize=undefined * Now running it: qemu-s390x-static -L /usr/s390x-linux-gnu/ ./bug0 * Expected output (on KVM host, that natively runs Ubuntu): O0: 2 O1: 2 O2: 2 O3: 2 Actual output (on un-fixed qemu environment): O0: 2 O1: 2 O2: 0 O3: 0 [ Where problems could occur ] * The fix is in COMPARE HALFWORD RELATIVE LONG and two files are touched in tcg: target/s390x/tcg/translate.c target/s390x/tcg/insn-data.h.inc * Problems can for example occur in the newly introduced in2_mri2_16s in case the pointer handling is wrong, or wrong arguments are taken (not only in in2_mri2_16s, but also in tcg_gen_qemu_ld16s). * Issues could also happen is something relies on mri2_32s or mri2_64. * The problem and fix is limited to s390x. [ Other Info ] * The issue was initially reported at gcc upstream: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112986 but tunred out to be a qemue problem. Nevertheless, there is a reproducer mentioned that got picked here as test case. * This issue is fixed in qemu 7, but qemu 6.2.0 in Ubuntu 22.04 is still affected, hence this SRU. __________ ---Problem Description--- Wrong code execution with qemu ---Steps to Reproduce--- please have a look at the following bug:    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112986 ------------------------------------------------------------------------ Contact Information = Andreas Krebbel <krebbel@linux.ibm.com> Machine Type = IBM Z Userspace tool common name: qemu The userspace tool has the following bit modes: 64 bit Userspace deb: - 1:6.2+dfsg-2ubuntu6.15 ------------------------------------------------------------------------ Frequently used s390x code sequences are wrongly executed when running with qemu instruction set emulation. The problem has been fixed in upstream qemu already. A backport for qemu 7 branch has been committed as well. The qemu 6.2.0 version used in Ubuntu 22.04 needs a backport of a trivial fix to work properly: From the GCC BZ: Problem fixed in v8.0.0 (https://gitlab.com/qemu-project/qemu/-/commit/54fce97cfcaf5463ee5f325bc1f1d4adc2772f38). The fix was backported to v7.2.2 (https://gitlab.com/qemu-project/qemu/-/commit/17b032c6598ea756889f25e8d3e4cd9f2036669b), but not to v6. Please consider picking up https://gitlab.com/qemu-project/qemu/-/commit/17b032c6598ea756889f25e8d3e4cd9f2036669b for the Ubuntu 22.04 qemu package 1:6.2+dfsg-2ubuntu6.15
2024-02-21 20:48:41 Launchpad Janitor merge proposal linked https://code.launchpad.net/~sergiodj/ubuntu/+source/qemu/+git/qemu/+merge/460973
2024-02-22 03:43:32 Ubuntu Archive Robot bug added subscriber Sergio Durigan Junior
2024-02-22 08:36:37 Frank Heimes ubuntu-z-systems: status Triaged In Progress
2024-02-22 21:20:19 Andreas Hasenack qemu (Ubuntu Jammy): status In Progress Fix Committed
2024-02-22 21:20:22 Andreas Hasenack bug added subscriber Ubuntu Stable Release Updates Team
2024-02-22 21:20:36 Andreas Hasenack bug added subscriber SRU Verification
2024-02-22 21:20:39 Andreas Hasenack tags architecture-s39064 bugnameltc-204491 server-todo severity-high targetmilestone-inin--- architecture-s39064 bugnameltc-204491 server-todo severity-high targetmilestone-inin--- verification-needed verification-needed-jammy
2024-02-23 06:49:21 Frank Heimes ubuntu-z-systems: status In Progress Fix Committed
2024-02-23 09:29:39 bugproxy tags architecture-s39064 bugnameltc-204491 server-todo severity-high targetmilestone-inin--- verification-needed verification-needed-jammy architecture-s39064 bugnameltc-204491 server-todo severity-high targetmilestone-inin2204 verification-needed verification-needed-jammy
2024-02-23 10:49:23 bugproxy tags architecture-s39064 bugnameltc-204491 server-todo severity-high targetmilestone-inin2204 verification-needed verification-needed-jammy architecture-s39064 bugnameltc-204491 server-todo severity-high targetmilestone-inin2204 verification-done verification-done-jammy
2024-03-20 15:17:42 Andreas Hasenack bug added subscriber Andreas Hasenack
2024-04-04 18:12:07 Launchpad Janitor qemu (Ubuntu Jammy): status Fix Committed Fix Released
2024-04-04 18:12:15 Andreas Hasenack removed subscriber Ubuntu Stable Release Updates Team
2024-04-05 05:55:35 Frank Heimes ubuntu-z-systems: status Fix Committed Fix Released