Skip to content

Fix qos-test and updated CI pipeline#50

Merged
ho28 merged 3 commits into
wr-integrationfrom
jt-fix-qostest
Jun 25, 2026
Merged

Fix qos-test and updated CI pipeline#50
ho28 merged 3 commits into
wr-integrationfrom
jt-fix-qostest

Conversation

@hungmtruong

@hungmtruong hungmtruong commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fix the aarch64 qos-test iothread hang caused by a BQL deadlock, and update CI to work reliably in containerized environments.

Root Cause

The qos-test (iothread-attach-node) was hanging in CI because of a deadlock: the main thread holds BQL and waits for the iothread to stop, but the iothread needs BQL to finish a DMA write. Both wait forever, and then timeout.

Fix

Guard fdt_pack() with !qtest_enabled() so it only runs during real kernel boot where DTB size optimization matters, not during qtest where it triggers the deadlock. Real VxWorks/Linux boot behavior is unchanged.

Changes

  1. hw/arm/boot.c - Skip fdt_pack() in qtest mode
  2. tests/data/acpi/aarch64/virt/HEST - Regenerated to match CI environment
  3. .github/workflows/ci.yml - Add --disable-vhost-net --disable-vhost-user
    (vhost tests need kernel support unavailable in CI)

Testing

  • qos-test iothread-attach-node + iothread-virtio-error: PASS (local + Docker + CI)
  • Full test suite: 412 OK, 0 Fail, 0 Timeout
  • VxWorks boot on ZCU102: unaffected (fdt_pack still runs with real kernel)

@hungmtruong hungmtruong requested a review from ho28 June 24, 2026 17:32
@hungmtruong hungmtruong self-assigned this Jun 24, 2026

@ho28 ho28 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know you might still have some changes on the way, but left a few comments here for you

Comment thread hw/arm/boot.c
*/
if (!qtest_enabled()) {
rc = fdt_pack(fdt);
/* Should only fail if we've built a corrupted tree */

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the detailed commit message - but what exactly does "it triggers a BQL deadlock
in the virtio-scsi iothread dataplane stop path" mean, and how is it related to the size of the FDT?

I know you probably don't have the answer right now. If you want to look into and find out, then can you update the commit message and this comment with that info? Otherwise, just drop the specifics and mention that this causes qtest issues for reasons that are unclear to us.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used GDB to look into this, and this is what I have found:

The deadlock is between two threads during qos-test:

  • main thread: holds BQL, calls virtio_scsi_dataplane_stop(), waits for the iothread
  • iothread: completing a SCSI DMA unmap to address 0, needs BQL

Regarding the size of the FDT, I am not sure.

@ho28 ho28 Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok - I ask because the fix appears to be to not pack the DTB for the qtest. I'm fine with that fix. But its not clear to me how the size of the DTB affects synchronization around the Big Qemu Lock (BQL). i'm pushing on it because conceptually the DTB and the virtio scsi data path have nothing to do with each other. if theres a race condition somewhere, it would be nice to know the exact steps that race and how we end up in the deadlock vs the normal functioning path. But like i said before, it's not necessary to find this answer for us to ship this fix.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have fixed the commit message.

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml Outdated
Comment thread tests/data/acpi/aarch64/virt/HEST
@hungmtruong hungmtruong force-pushed the jt-fix-qostest branch 2 times, most recently from 596970b to 1bbb884 Compare June 24, 2026 19:14
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
@hungmtruong hungmtruong force-pushed the jt-fix-qostest branch 4 times, most recently from 2adc767 to 953d575 Compare June 25, 2026 15:31
fdt_pack() causes the aarch64 qos-test (iothread-attach-node)
to hang indefinitely. The exact mechanism of how fdt_pack
triggers the hang is unclear, but skipping it in qtest mode
resolves the issue.

Signed-off-by: Jason Truong <jason.truong@windriver.com>
Signed-off-by: Jason Truong <jason.truong@windriver.com>
Add --disable-vhost-net --disable-vhost-user to configure since
vhost tests require kernel support unavailable in CI containers.

Signed-off-by: Jason Truong <jason.truong@windriver.com>
@ho28 ho28 merged commit adb0942 into wr-integration Jun 25, 2026
1 check passed
@hungmtruong hungmtruong deleted the jt-fix-qostest branch June 29, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants