Activity log for bug #1792501

Date Who What changed Old value New value Message
2018-09-14 04:29:21 bugproxy bug added bug
2018-09-14 04:29:25 bugproxy tags architecture-ppc64le bugnameltc-171274 severity-critical targetmilestone-inin---
2018-09-14 04:29:27 bugproxy attachment added sosreport of debian chroot inside kvm guest https://bugs.launchpad.net/bugs/1792501/+attachment/5188677/+files/sosreport-debian-chroot-20180911084349.tar.xz
2018-09-14 04:29:34 bugproxy attachment added sosreport of kvm guest https://bugs.launchpad.net/bugs/1792501/+attachment/5188678/+files/sosreport-ubuntu-20180911034948.tar.xz
2018-09-14 04:29:36 bugproxy attachment added Fix for KVM host https://bugs.launchpad.net/bugs/1792501/+attachment/5188679/+files/0001-KVM-PPC-Book3S-HV-Fix-guest-r11-corruption-with-POWE.patch
2018-09-14 04:29:37 bugproxy ubuntu: assignee Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
2018-09-14 05:06:27 Frank Heimes bug task added ubuntu-power-systems
2018-09-14 05:06:40 Frank Heimes affects ubuntu linux (Ubuntu)
2018-09-14 05:06:56 Frank Heimes ubuntu-power-systems: importance Undecided Critical
2018-09-14 05:07:14 Frank Heimes ubuntu-power-systems: assignee Canonical Kernel Team (canonical-kernel-team)
2018-09-14 05:12:45 Frank Heimes bug added subscriber  Christian Ehrhardt 
2018-09-14 06:08:36 Christian Ehrhardt  nominated for series Ubuntu Bionic
2018-09-14 06:08:36 Christian Ehrhardt  bug task added linux (Ubuntu Bionic)
2018-09-14 06:08:36 Christian Ehrhardt  nominated for series Ubuntu Cosmic
2018-09-14 06:08:36 Christian Ehrhardt  bug task added linux (Ubuntu Cosmic)
2018-09-14 06:39:28 Andrew Cloke tags architecture-ppc64le bugnameltc-171274 severity-critical targetmilestone-inin--- architecture-ppc64le bugnameltc-171274 p9 severity-critical targetmilestone-inin---
2018-09-17 08:14:18 Joseph Salisbury linux (Ubuntu Cosmic): assignee Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) Joseph Salisbury (jsalisbury)
2018-09-17 08:14:21 Joseph Salisbury linux (Ubuntu Bionic): assignee Joseph Salisbury (jsalisbury)
2018-09-17 08:14:26 Joseph Salisbury linux (Ubuntu Cosmic): status New In Progress
2018-09-17 08:14:31 Joseph Salisbury linux (Ubuntu Bionic): status New In Progress
2018-09-17 08:14:34 Joseph Salisbury linux (Ubuntu Cosmic): importance Undecided Medium
2018-09-17 08:14:36 Joseph Salisbury linux (Ubuntu Bionic): importance Undecided Medium
2018-09-17 08:29:10 Frank Heimes ubuntu-power-systems: status New In Progress
2018-10-11 19:57:23 Joseph Salisbury linux (Ubuntu Cosmic): status In Progress Fix Committed
2018-10-11 20:05:53 Joseph Salisbury description == Comment: #0 - Satheesh Rajendran <satheera@in.ibm.com> - 2018-09-11 04:10:09 == ---Problem Description--- package installation segfaults inside debian chroot env in P9 KVM guest with HTM enabled ---Additional Hardware Info--- FW with tm-suspend-mode enabled #cd /sys/firmware/devicetree/base/ibm,opal/fw-features/ #ls -1 tm-suspend-mode enabled name phandle qemu-kvm 1:2.11+dfsg-1ubuntu7.4 Machine Type = Power9 DD2.2 ---Steps to Reproduce--- 1. Boot a P9 KVM guest Ubuntu 18.04 (with cap-htm=on, bydefault it is on) tried with upstream kernel aswell(same results) create tap device in host # tunctl -t tap1 -u `whoami`;brctl addif virbr0 tap1;ifconfig tap1 up #qemu-system-ppc64 -enable-kvm -M pseries -m 8192 -smp 4 -drive file=/home/sath/ubuntu-18.04-ppc64le.qcow2,format=qcow2,if=none,id=drive-scsi0 -device virtio-scsi-pci,id=drive-scsi0 -device scsi-hd,drive=drive-scsi0 -serial mon:stdio -enable-kvm -vga none -nographic -kernel /home/sath/vmlinux_4.19 -append root=/dev/sda2 rw console=tty0 console=ttyS0,115200 init=/sbin/init initcall_debug -netdev tap,id=mynet1,ifname=tap1,script=no,downscript=no -device virtio-net,netdev=mynet1,mac=52:55:00:d1:55:42 run dhclient inside guest. 2. # mkdir -p stretch # debootstrap stretch /stretch http://httpredir.debian.org/debian # chroot /stretch /# apt-get update && apt-get install -y make gcc ruby python ... [ 32.029474] random: crng init done [ 32.029477] random: 7 urandom warning(s) missed due to ratelimiting [ 500.300835] dpkg-deb[8704]: segfault (11) at c0000000000037fa nip 7fffac2d098c lr 7fffac2d08c4 code 1 in libc-2.24.so[7fffac170000+190000] [ 500.300863] dpkg-deb[8704]: code: 48000028 eb090010 2eb80000 4096006c 419e0074 85270004 394a0001 794a0020 [ 500.300881] dpkg-deb[8704]: code: 71280001 408200a0 1d2a0018 7d2b4a14 <a1090006> 2ea80000 40960010 e9090008 ---uname output--- 4.15.0-34,4.19.0-rc3 ---Debugger--- A debugger is not configured Contact Information = satheera@in.ibm.com Userspace tool common name: KVM Guest: Ubuntu GLIBC 2.27-3ubuntu1) stable release version 2.27, Chroot inside KVM Guest: Debian GLIBC 2.24-11+deb9u3) stable release version 2.24 Userspace rpm: KVM Guest: Ubuntu GLIBC 2.27-3ubuntu1) stable release version 2.27, Chroot inside KVM Guest: Debian GLIBC 2.24-11+deb9u3) stable release version 2.24 The userspace tool has the following bit modes: both Userspace tool obtained from project website: na *Additional Instructions for satheera@in.ibm.com: -Post a private note with access information to the machine that the bug is occuring on. -Attach ltrace and strace of userspace application. So latest update taken from https://github.ibm.com/powercloud/icp-ppc64le/issues/470 was able to recreate segfault using TM test cases /linux/tools/testing/selftests/powerpc/tm # ./tm-vmxcopy test: tm_vmxcopy tags: git_version:v4.19-rc3-0-g11da3a7f84f1-dirty !! child died by signal 11 failure: tm_vmxcopy this particular test on being run gets a signal 11 [267132.434651] tm-vmxcopy[641]: unhandled signal 11 at 0000000000000001 nip 0000000104ba122c lr 0000000104ba11e4 code 30001 [267253.708795] tm-vmxcopy[7861]: unhandled signal 11 at 0000000000000001 nip 000000012a31122c lr 000000012a3111e4 code 30001 [267385.064533] tm-vmxcopy[13314]: unhandled signal 11 at 0000000000000001 nip 00000001235f122c lr 00000001235f11e4 code 30001 == Comment: #12 - Michael Neuling <michael.neuling@au1.ibm.com> - 2018-09-13 00:34:16 == Fixes r11 corruption. == Comment: #14 - Satheesh Rajendran <satheera@in.ibm.com> - 2018-09-13 03:15:46 == Tested with above patch on KVM host and reported issue is fixed. # git log -1 commit 72664e47565f5de0a1fead1d9111c97b9b537713 (HEAD -> fix) Author: Michael Neuling <mikey@neuling.org> Date: Thu Sep 13 15:33:47 2018 +1000 KVM: PPC: Book3S HV: Fix guest r11 corruption with POWER9 TM workarounds When we come into the softpatch handler (0x1500), we use r11 to store the HSRR0 for later use by the denorm handler. We also use the softpatch handler for the TM workarounds for POWER9. Unfortunately, in kvmppc_interrupt_hv we later store r11 out to the vcpu assuming it's still what we got from userspace. This causes r11 to be corrupted in the VCPU and hence when we restore the guest, we get a corrupted r11. We've seen this when running TM tests inside guests on P9. This fixes the problem by only touching r11 in the denorm case. Fixes: 4bb3c7a020 ("KVM: PPC: Book3S HV: Work around transactional memory bugs in POWER9") Cc: <stable@vger.kernel.org> # 4.17+ Test-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com> Reviewed-by: Paul Mackerras <paulus@ozlabs.org> Signed-off-by: Michael Neuling <mikey@neuling.org> Regards, -Satheesh http://patchwork.ozlabs.org/patch/969256/ == SRU Justification == IBM is requesting this commit in Bionic. It fixes a regression introduced by upstream commit 4bb3c7a020. Without this patch, package installation segfaults inside debian chroot env in P9 KVM guest with HTM enabled. The fix has already landed in Cosmic master-next. == Fix == f14040bca892 ("KVM: PPC: Book3S HV: Fix guest r11 corruption with POWER9 TM workarounds") == Regression Potential == Low. This commit fixes an existing regrssion and is specific to powerpc. It has been cc'd to upstream stable, so has had additional upstream review. == Test Case == A test kernel was built with this patch and tested by the original bug reporter. The bug reporter states the test kernel resolved the bug. == Comment: #0 - Satheesh Rajendran <satheera@in.ibm.com> - 2018-09-11 04:10:09 == ---Problem Description--- package installation segfaults inside debian chroot env in P9 KVM guest with HTM enabled ---Additional Hardware Info--- FW with tm-suspend-mode enabled #cd /sys/firmware/devicetree/base/ibm,opal/fw-features/ #ls -1 tm-suspend-mode enabled name phandle qemu-kvm 1:2.11+dfsg-1ubuntu7.4 Machine Type = Power9 DD2.2 ---Steps to Reproduce---  1. Boot a P9 KVM guest Ubuntu 18.04 (with cap-htm=on, bydefault it is on) tried with upstream kernel aswell(same results) create tap device in host # tunctl -t tap1 -u `whoami`;brctl addif virbr0 tap1;ifconfig tap1 up #qemu-system-ppc64 -enable-kvm -M pseries -m 8192 -smp 4 -drive file=/home/sath/ubuntu-18.04-ppc64le.qcow2,format=qcow2,if=none,id=drive-scsi0 -device virtio-scsi-pci,id=drive-scsi0 -device scsi-hd,drive=drive-scsi0 -serial mon:stdio -enable-kvm -vga none -nographic -kernel /home/sath/vmlinux_4.19 -append root=/dev/sda2 rw console=tty0 console=ttyS0,115200 init=/sbin/init initcall_debug -netdev tap,id=mynet1,ifname=tap1,script=no,downscript=no -device virtio-net,netdev=mynet1,mac=52:55:00:d1:55:42 run dhclient inside guest. 2. # mkdir -p stretch # debootstrap stretch /stretch http://httpredir.debian.org/debian # chroot /stretch /# apt-get update && apt-get install -y make gcc ruby python ... [ 32.029474] random: crng init done [ 32.029477] random: 7 urandom warning(s) missed due to ratelimiting [ 500.300835] dpkg-deb[8704]: segfault (11) at c0000000000037fa nip 7fffac2d098c lr 7fffac2d08c4 code 1 in libc-2.24.so[7fffac170000+190000] [ 500.300863] dpkg-deb[8704]: code: 48000028 eb090010 2eb80000 4096006c 419e0074 85270004 394a0001 794a0020 [ 500.300881] dpkg-deb[8704]: code: 71280001 408200a0 1d2a0018 7d2b4a14 <a1090006> 2ea80000 40960010 e9090008 ---uname output--- 4.15.0-34,4.19.0-rc3 ---Debugger--- A debugger is not configured Contact Information = satheera@in.ibm.com Userspace tool common name: KVM Guest: Ubuntu GLIBC 2.27-3ubuntu1) stable release version 2.27, Chroot inside KVM Guest: Debian GLIBC 2.24-11+deb9u3) stable release version 2.24 Userspace rpm: KVM Guest: Ubuntu GLIBC 2.27-3ubuntu1) stable release version 2.27, Chroot inside KVM Guest: Debian GLIBC 2.24-11+deb9u3) stable release version 2.24 The userspace tool has the following bit modes: both Userspace tool obtained from project website: na *Additional Instructions for satheera@in.ibm.com: -Post a private note with access information to the machine that the bug is occuring on. -Attach ltrace and strace of userspace application. So latest update taken from https://github.ibm.com/powercloud/icp-ppc64le/issues/470 was able to recreate segfault using TM test cases /linux/tools/testing/selftests/powerpc/tm # ./tm-vmxcopy test: tm_vmxcopy tags: git_version:v4.19-rc3-0-g11da3a7f84f1-dirty !! child died by signal 11 failure: tm_vmxcopy this particular test on being run gets a signal 11 [267132.434651] tm-vmxcopy[641]: unhandled signal 11 at 0000000000000001 nip 0000000104ba122c lr 0000000104ba11e4 code 30001 [267253.708795] tm-vmxcopy[7861]: unhandled signal 11 at 0000000000000001 nip 000000012a31122c lr 000000012a3111e4 code 30001 [267385.064533] tm-vmxcopy[13314]: unhandled signal 11 at 0000000000000001 nip 00000001235f122c lr 00000001235f11e4 code 30001 == Comment: #12 - Michael Neuling <michael.neuling@au1.ibm.com> - 2018-09-13 00:34:16 == Fixes r11 corruption. == Comment: #14 - Satheesh Rajendran <satheera@in.ibm.com> - 2018-09-13 03:15:46 == Tested with above patch on KVM host and reported issue is fixed. # git log -1 commit 72664e47565f5de0a1fead1d9111c97b9b537713 (HEAD -> fix) Author: Michael Neuling <mikey@neuling.org> Date: Thu Sep 13 15:33:47 2018 +1000     KVM: PPC: Book3S HV: Fix guest r11 corruption with POWER9 TM workarounds     When we come into the softpatch handler (0x1500), we use r11 to store     the HSRR0 for later use by the denorm handler.     We also use the softpatch handler for the TM workarounds for     POWER9. Unfortunately, in kvmppc_interrupt_hv we later store r11 out     to the vcpu assuming it's still what we got from userspace.     This causes r11 to be corrupted in the VCPU and hence when we restore     the guest, we get a corrupted r11. We've seen this when running TM     tests inside guests on P9.     This fixes the problem by only touching r11 in the denorm case.     Fixes: 4bb3c7a020 ("KVM: PPC: Book3S HV: Work around transactional memory bugs in POWER9")     Cc: <stable@vger.kernel.org> # 4.17+     Test-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>     Reviewed-by: Paul Mackerras <paulus@ozlabs.org>     Signed-off-by: Michael Neuling <mikey@neuling.org> Regards, -Satheesh http://patchwork.ozlabs.org/patch/969256/
2018-10-23 14:47:27 Kleber Sacilotto de Souza linux (Ubuntu Bionic): status In Progress Fix Committed
2018-10-24 13:34:59 Brad Figg tags architecture-ppc64le bugnameltc-171274 p9 severity-critical targetmilestone-inin--- architecture-ppc64le bugnameltc-171274 p9 severity-critical targetmilestone-inin--- verification-needed-bionic
2018-10-24 14:27:28 Frank Heimes ubuntu-power-systems: status In Progress Fix Committed
2018-10-30 10:59:54 bugproxy attachment added testcase https://bugs.launchpad.net/bugs/1792501/+attachment/5207141/+files/htm_demo.c
2018-11-05 15:05:46 Andrew Cloke tags architecture-ppc64le bugnameltc-171274 p9 severity-critical targetmilestone-inin--- verification-needed-bionic architecture-ppc64le bugnameltc-171274 p9 severity-critical targetmilestone-inin--- verification-done-bionic
2018-11-13 18:51:26 Launchpad Janitor linux (Ubuntu Bionic): status Fix Committed Fix Released
2018-11-13 18:51:26 Launchpad Janitor cve linked 2017-13168
2018-11-13 18:51:26 Launchpad Janitor cve linked 2018-15471
2018-11-13 18:51:26 Launchpad Janitor cve linked 2018-16658
2018-11-13 18:51:26 Launchpad Janitor cve linked 2018-9363
2018-11-14 16:06:14 Joseph Salisbury linux (Ubuntu Cosmic): status Fix Committed Fix Released
2018-11-14 16:06:17 Joseph Salisbury linux (Ubuntu): status Fix Committed Fix Released
2018-11-14 16:32:54 Andrew Cloke ubuntu-power-systems: status Fix Committed Fix Released
2019-02-25 10:39:45 bugproxy tags architecture-ppc64le bugnameltc-171274 p9 severity-critical targetmilestone-inin--- verification-done-bionic architecture-ppc64le bugnameltc-171274 p9 severity-critical targetmilestone-inin18041 verification-done-bionic