debug in ubuntu_kvm_unit_test timeout with "icebp" related test with J-realtime on openstack AMD64

Bug #2022877 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
New
Undecided
Unassigned
linux-realtime (Ubuntu)
New
Undecided
Unassigned

Bug Description

debug test in ubuntu_kvm_unit_test will timeout with J-realtime on openstack amd64 instance. This issue can be seen after we start testing on openstack with 5.15.0-1036.39 in sru-20230320.

Test log:
 Running '/home/ubuntu/autotest/client/tmp/ubuntu_kvm_unit_tests/src/kvm-unit-tests/tests/debug'
 BUILD_HEAD=d8edb59a
 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=tcg -kernel /tmp/tmp.41OPX1wv8j -smp 1 # -initrd /tmp/tmp.iW4XNY1xjR
 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
 PASS: Single-step #DB on emulated instructions
 PASS: Usermode Single-step #DB on emulated instructions
 PASS: Single-step #DB w/ STI blocking
 PASS: Usermode Single-step #DB w/ STI blocking
 PASS: Single-step #DB w/ MOVSS blocking
 PASS: Usermode Single-step #DB w/ MOVSS blocking
 qemu-system-x86_64: terminating on signal 15 from pid 9487 (timeout)
 FAIL debug (timeout; duration=90s)

I tried to bump the timeout to 240s but it's not helping, and there is no output from dmesg when running this test.

It's worthy to note that this test has passed with j/ibm, the whole test sequence should be like this:
 DR4==DR6 with CR4.DE == 0
 DR4 read got #UD with CR4.DE == 1
 #BP
 hw breakpoint (test that dr6.BS is not set)
 hw breakpoint (test that dr6.BS is not cleared)
 Single-step #DB basic test
 Usermode Single-step #DB basic test
 Single-step #DB on emulated instructions
 Usermode Single-step #DB on emulated instructions
 Single-step #DB w/ STI blocking
 Usermode Single-step #DB w/ STI blocking
 Single-step #DB w/ MOVSS blocking
 Usermode Single-step #DB w/ MOVSS blocking
 Single-Step + ICEBP #DB w/ MOVSS blocking
 Usermode Single-Step + ICEBP #DB w/ MOVSS blocking
 Single-step #DB w/ MOVSS blocking and DR7.GD=1
 hw watchpoint (test that dr6.BS is not cleared)
 hw watchpoint (test that dr6.BS is not set)
 icebp
 MOV SS + watchpoint + ICEBP
 MOV SS + watchpoint + int $1
 MOV SS + watchpoint + INT3

It's the "icebp" related tests causing this timeout.
If we comment out these 3 tests from kvm-unit-tests/x86/debug.c:
 Usermode Single-Step + ICEBP #DB w/ MOVSS blocking
 icebp
 MOV SS + watchpoint + ICEBP

The debug test can finish with one failure:
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
PASS: Single-step #DB on emulated instructions
PASS: Usermode Single-step #DB on emulated instructions
PASS: Single-step #DB w/ STI blocking
PASS: Usermode Single-step #DB w/ STI blocking
PASS: Single-step #DB w/ MOVSS blocking
PASS: Usermode Single-step #DB w/ MOVSS blocking
FAIL: Single-step #DB w/ MOVSS blocking and DR7.GD=1
PASS: hw watchpoint (test that dr6.BS is not cleared)
PASS: hw watchpoint (test that dr6.BS is not set)
PASS: MOV SS + watchpoint + int $1
PASS: MOV SS + watchpoint + INT3
SUMMARY: 18 tests, 1 unexpected failures
FAIL debug (18 tests, 1 unexpected failures)

Po-Hsu Lin (cypressyew)
summary: - debug in ubuntu_kvm_unit_test timeout with J-realtime on openstack AMD64
+ debug in ubuntu_kvm_unit_test timeout with "icebp" related test with
+ J-realtime on openstack AMD64
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

The same issue still exist with the latest upstream kvm-unit-tests code (02d8befe99f8)

Not sure if it's worth it to dig deeper as this is running kvm unit tests inside a VM (on openstack).

Po-Hsu Lin (cypressyew)
tags: added: ubuntu-kvm-unit-tests
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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