debug in ubuntu_kvm_unit_test failed on 3.13 / 4.4 (FAIL: Single-step #DB on emulated instructions)

Bug #1821906 reported by Po-Hsu Lin
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Triaged
Undecided
Unassigned
linux (Ubuntu)
Confirmed
Undecided
Unassigned
Trusty
Confirmed
Undecided
Unassigned
Xenial
Confirmed
Undecided
Unassigned

Bug Description

This test failed with:
 FAIL: Single-step #DB on emulated instructions
 FAIL: Usermode Single-step #DB on emulated instructions
 KVM: entry failed, hardware error 0x80000021

Test log:
 Running '/home/ubuntu/autotest/client/tmp/ubuntu_kvm_unit_tests/src/kvm-unit-tests/tests/debug'
 BUILD_HEAD=63cdb04b
 timeout -k 1s --foreground 90s /usr/bin/qemu-system-x86_64 --no-reboot -nodefaults -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device pci-testdev -machine accel=kvm -kernel /tmp/tmp.IBmC6sYYO4 -smp 1 # -initrd /tmp/tmp.5wvGjtkv3G
 enabling apic
 smp: waiting for 0 APs
 PASS: DR4==DR6 with CR4.DE == 0
 PASS: DR4 read got #UD with CR4.DE == 1
 PASS: #BP
 PASS: hw breakpoint (test that dr6.BS is not set)
 PASS: hw breakpoint (test that dr6.BS is not cleared)
 PASS: Single-step #DB basic test
 PASS: Usermode Single-step #DB basic test
 FAIL: Single-step #DB on emulated instructions
 FAIL: Usermode Single-step #DB on emulated instructions
 KVM: entry failed, hardware error 0x80000021

 If you're running a guest on an Intel machine without unrestricted mode
 support, the failure can be most likely due to the guest entering an invalid
 state for Intel VT. For example, the guest maybe running in big real mode
 which is not supported on less recent Intel processors.

 RAX=0000000000000106 RBX=00000000004002ba RCX=00000000000003fd RDX=00000000000003f8
 RSI=0000000000400582 RDI=00000000004002ba RBP=00000000005116b0 RSP=00000000005116b0
 R8 =0000000000410589 R9 =00000000000003f8 R10=0000000000410589 R11=000000000000000d
 R12=0000000000400582 R13=0000000000000000 R14=0000000000000000 R15=0000000000000000
 RIP=00000000004002ca RFL=00000306 [-----P-] CPL=0 II=0 A20=1 SMM=0 HLT=0
 ES =0043 0000000000000000 ffffffff 00c0f300 DPL=3 DS [-WA]
 CS =0008 0000000000000000 ffffffff 00a09b00 DPL=0 CS64 [-RA]
 SS =0000 0000000000000000 ffffffff 00c00000
 DS =0043 0000000000000000 ffffffff 00c0f300 DPL=3 DS [-WA]
 FS =0000 0000000000000000 ffffffff 00c01300
 GS =0000 0000000000510720 ffffffff 00c01300
 LDT=0000 0000000000000000 0000ffff 00008200 DPL=0 LDT
 TR =0080 00000000005188a0 0000ffff 00008b00 DPL=0 TSS64-busy
 GDT= 000000000040e100 0000106f
 IDT= 000000000051f040 00000fff
 CR0=80000011 CR2=0000000000000000 CR3=000000000040c000 CR4=00000020
 DR0=0000000000400aa3 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000
 DR6=00000000ffff4ff0 DR7=0000000000000402
 EFER=0000000000000500
 Code=f0 5b 5d c3 55 48 89 e5 fa 9c 58 48 0d 00 01 00 00 50 9d fb <48> 25 ff fe ff ff 50 9d 48 8d 15 f1 ff ff ff 48 89 d0 5d c3 55 48 89 e5 9c 58 48 0d 00 01
 qemu: terminating on signal 15 from pid 14900
 FAIL debug (timeout; duration=90s)

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: linux-image-4.4.0-143-generic 4.4.0-143.169~14.04.2
ProcVersionSignature: User Name 4.4.0-143.169~14.04.2-generic 4.4.170
Uname: Linux 4.4.0-143-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.29
Architecture: amd64
Date: Wed Mar 27 11:15:05 2019
SourcePackage: linux-signed-lts-xenial
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
affects: linux-signed-lts-xenial (Ubuntu) → linux (Ubuntu)
tags: added: xenial
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1821906

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu Trusty):
status: New → Incomplete
Changed in linux (Ubuntu Xenial):
status: New → Incomplete
Revision history for this message
Po-Hsu Lin (cypressyew) wrote : Re: debug in ubuntu_kvm_unit_test failed on 3.13 / 4.4

Failure on Trusty:
 timeout -k 1s --foreground 90s /usr/bin/qemu-system-x86_64 -nodefaults -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device pci-testdev -machine accel=kvm -kernel /tmp/tmp.4VEzBBYPcp -smp 1 # -initrd /tmp/tmp.Ef5R8Mt7p5
 enabling apic
 PASS: #BP
 FAIL: hw breakpoint (test that dr6.BS is not set)
 FAIL: hw breakpoint (test that dr6.BS is not cleared)
 FAIL: single step
 FAIL: single step emulated instructions
 FAIL: hw watchpoint (test that dr6.BS is not cleared)
 FAIL: hw watchpoint (test that dr6.BS is not set)
 PASS: icebp
 PASS: MOV SS + watchpoint + ICEBP
 PASS: MOV SS + watchpoint + int $1
 PASS: MOV SS + watchpoint + INT3
 SUMMARY: 11 tests, 6 unexpected failures
 FAIL debug (11 tests, 6 unexpected failures)

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Changed in linux (Ubuntu Xenial):
status: Incomplete → Confirmed
Changed in linux (Ubuntu Trusty):
status: Incomplete → Confirmed
tags: added: 3.13 4.4 ubuntu-kvm-unit-tests
tags: added: sru-20190701
Revision history for this message
Sean Feole (sfeole) wrote :

Target: Xenial
8. 01/16 09:21:09 DEBUG| utils:0152| [stdout] PASS: #BP
9. 01/16 09:21:09 DEBUG| utils:0152| [stdout] PASS: hw breakpoint (test that dr6.BS is not set)
10. 01/16 09:21:09 DEBUG| utils:0152| [stdout] PASS: hw breakpoint (test that dr6.BS is not cleared)
11. 01/16 09:21:09 DEBUG| utils:0152| [stdout] PASS: single step
12. 01/16 09:21:09 DEBUG| utils:0152| [stdout] FAIL: single step emulated instructions
13. 01/16 09:21:09 DEBUG| utils:0152| [stdout] PASS: hw watchpoint (test that dr6.BS is not cleared)
14. 01/16 09:21:09 DEBUG| utils:0152| [stdout] PASS: hw watchpoint (test that dr6.BS is not set)
15. 01/16 09:21:09 DEBUG| utils:0152| [stdout] PASS: icebp
16. 01/16 09:21:09 DEBUG| utils:0152| [stdout] PASS: MOV SS + watchpoint + ICEBP
17. 01/16 09:21:09 DEBUG| utils:0152| [stdout] PASS: MOV SS + watchpoint + int $1
18. 01/16 09:21:09 DEBUG| utils:0152| [stdout] PASS: MOV SS + watchpoint + INT3
19. 01/16 09:21:09 DEBUG| utils:0152| [stdout] SUMMARY: 11 tests, 1 unexpected failures
20. 01/16 09:21:09 DEBUG| utils:0152| [stdout] FAIL debug (11 tests, 1 unexpected failures)

tags: added: sru-20200106
Sean Feole (sfeole)
Changed in ubuntu-kernel-tests:
status: New → Triaged
Sean Feole (sfeole)
tags: added: sru-20200127
Po-Hsu Lin (cypressyew)
tags: added: sru-20200316
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Still visible in Xenial 4.4.0-1118.132 AWS c5.metal

tags: added: sru-20201109
tags: added: sru-20210222
Revision history for this message
Marcelo Cerri (mhcerri) wrote :

Also seen in xenial linux-fips 4.4.0-1060.66 for sru-20210315 (also in sru-20200222)

tags: added: fips sru-20210315
tags: added: sru-20210412
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

Also found with xenial/linux-kvm 4.4.0-1094.103.

tags: added: kvm
Po-Hsu Lin (cypressyew)
description: updated
description: updated
summary: - debug in ubuntu_kvm_unit_test failed on 3.13 / 4.4
+ debug in ubuntu_kvm_unit_test failed on 3.13 / 4.4 (FAIL: single step
+ emulated instructions)
Revision history for this message
Krzysztof Kozlowski (krzk) wrote : Re: debug in ubuntu_kvm_unit_test failed on 3.13 / 4.4 (FAIL: single step emulated instructions)

Found on xenial/linux-aws/4.4.0-1132.146

tags: added: aws
tags: added: hinted
tags: added: sru-20210816
Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

Fails on 3.13.0-187 and 3.13.0-188.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

With kvm-unit-test repo updated to d8a4f9e5 (ci: Update the list of tests that we run in the Fedora Cirrus-CI), this test is still failing, I will update the bug description.

tags: added: sru-20220919
description: updated
summary: - debug in ubuntu_kvm_unit_test failed on 3.13 / 4.4 (FAIL: single step
+ debug in ubuntu_kvm_unit_test failed on 3.13 / 4.4 (Single-step #DB on
emulated instructions)
summary: - debug in ubuntu_kvm_unit_test failed on 3.13 / 4.4 (Single-step #DB on
- emulated instructions)
+ debug in ubuntu_kvm_unit_test failed on 3.13 / 4.4 (FAIL: Single-step
+ #DB on emulated instructions)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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