Unpredictable behaviour resulting in User process faults

This bug has been copied automatically from: https://bugs.launchpad.net/qemu/+bug/1865160
Reported by 'A. Farrell' on 2020-02-28 :

An example of the behaviour can be reproduced when using NPM, whereby
running the command multiple times will result in a variety of error
conditions causing the command to fail:

Example of failure:

Segmentation fault.] / rollbackFailedOptional: verb npm-session
1a805a5e0ff7b8f5

[ 3144.216869] User process fault: interruption code 0038 ilc:3
[ 3144.216981] Failing address: 66616c7365000000 TEID: 66616c7365000800
[ 3144.217009] Fault in primary space mode while using user ASCE.
[ 3144.217055] AS:00000000ed28c1c7 R3:0000000000000024

Feb 28 14:32:08 qemus390x kernel: [ 3144.216869] User process fault:
interruption code 0038 ilc:3
Feb 28 14:32:08 qemus390x kernel: [ 3144.216981] Failing address:
66616c7365000000 TEID: 66616c7365000800
Feb 28 14:32:08 qemus390x kernel: [ 3144.217009] Fault in primary space
mode while using user ASCE.
Feb 28 14:32:08 qemus390x kernel: [ 3144.217055] AS:00000000ed28c1c7
R3:0000000000000024
Feb 28 14:32:08 qemus390x kernel: [ 3144.217217] CPU: 2 PID: 1018 Comm:
npm Not tainted 4.15.0-88-generic #88-Ubuntu
Feb 28 14:32:08 qemus390x kernel: [ 3144.217234] Hardware name: QEMU 2964
QEMU (KVM/Linux)
Feb 28 14:32:08 qemus390x kernel: [ 3144.217257] User PSW :
00000000185db982 00000000c1d5a1a1
Feb 28 14:32:08 qemus390x kernel: [ 3144.217290]            R:0 T:1 IO:1
EX:1 Key:0 M:1 W:0 P:1 AS:0 CC:2 PM:0 RI:0 EA:3
Feb 28 14:32:08 qemus390x kernel: [ 3144.217322] User GPRS:
000002aa03705200 0000006a16d73ac1 0000003da4b829f1 0000000000000000
Feb 28 14:32:08 qemus390x kernel: [ 3144.217343]
0000003da4b82a08 0000003da4b82a08 000002aa036a92ec 0000000000000000
Feb 28 14:32:08 qemus390x kernel: [ 3144.217364]
0000003da4b829f1 000003ffdb8f7e50 0000003da4b82a08 000003ffdb8f7d88
Feb 28 14:32:08 qemus390x kernel: [ 3144.217385]
66616c7365000000 000002aa036a05b0 000002aa015bcfb2 000003ffdb8f7d88
Feb 28 14:32:08 qemus390x kernel: [ 3144.217512] User
Code:#0000006a16d73b00: c0f4000000df      brcl    15,0000006a16d73cbe
Feb 28 14:32:08 qemus390x kernel: [ 3144.217512]
>0000006a16d73b06: a7290000          lghi    %r2,0
Feb 28 14:32:08 qemus390x kernel: [ 3144.217512]
0000006a16d73b0a: 07fe              bcr     15,%r14
Feb 28 14:32:08 qemus390x kernel: [ 3144.217512]
0000006a16d73b0c: c02f000001f3      llilf   %r2,499
Feb 28 14:32:08 qemus390x kernel: [ 3144.217512]
0000006a16d73b12: e3d0dff8ff71      lay     %r13,-8(%r13)
Feb 28 14:32:08 qemus390x kernel: [ 3144.217512]
0000006a16d73b18: e320d0000024      stg     %r2,0(%r13)
Feb 28 14:32:08 qemus390x kernel: [ 3144.217512]
0000006a16d73b1e: c028000002aa      iihf    %r2,682
Feb 28 14:32:08 qemus390x kernel: [ 3144.217724] Last Breaking-Event-
Address:
Feb 28 14:32:08 qemus390x kernel: [ 3144.217759]  [<000002aa015bcfae>]
0x2aa015bcfae




QEMU emulator version 4.2.0
Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers

QEMU Command:

sudo qemu-system-s390x -smp cpus=5 -machine s390-ccw-virtio -cpu
max,zpci=on -serial telnet::4441,server -display none -m 4096 -net nic
-net tap  -drive file=ubuntu.root,if=none,id=drive-virtio-
disk0,format=raw,cache=none -device virtio-blk-
ccw,devno=fe.0.0003,drive=drive-virtio-disk0,id=virtio-
disk0,bootindex=100,scsi=off -drive file=ubuntu.home,if=none,id=drive-
virtio-disk1,format=raw,cache=none -device virtio-blk-
ccw,devno=fe.0.0002,drive=drive-virtio-disk1,id=virtio-
disk1,bootindex=1,scsi=off -drive file=ubuntu.swap,if=none,id=drive-
virtio-disk4,format=raw,cache=none -device virtio-blk-
ccw,devno=fe.0.0005,drive=drive-virtio-disk4,id=virtio-
disk4,bootindex=101,scsi=off


Ubuntu 18.04.4 LTS qemus390x ttysclp0