i386 emulation unreliable since commit b76f0d8c2e3eac94bc7fd90a510cb7426b2a2699
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I am running daily automated tests of the qemu git mainline that
involve building qemu on a Linux host (32-bit), booting a NetBSD guest
in qemu-system-i386, and running the NetBSD operating system test
suite on the guest.
Since commit b76f0d8c2e3eac9
a marked increase in the number of failing test cases. Before that
commit, the number of failing test cases was typically in the range 3
to 6, but since that commit, test runs often show 10 or more failed
tests, or they end prematurely due to a segmentation fault in the test
framework itself.
To aid in reproducing the problem, I have prepared a disk image
containing a NetBSD 6.0.1 system configured to automatically run
the test suite on boot.
To reproduce the problem, run the following shell commands:
wget http://
gunzip NetBSD-
qemu-system-i386 -m 32 -nographic -snapshot -hda NetBSD-
The disk image is about 144 MB in size and uncompresses to 2 GB. The
test run typically takes a couple of hours, printing progress messages
to the terminal as it goes. When it finishes, the virtual machine
will be automatically powered down, causing qemu to exit.
Near the end of the output, before the shutdown messages, there should
be a summary of the test results. The expected output looks like this:
Summary for 500 test programs:
2958 passed test cases.
5 failed test cases.
45 expected failed test cases.
70 skipped test cases.
A number of "failed test cases" in the range 3 to 6 should be
considered normal. Please ignore the "expected failed test cases".
Using a version of qemu affected by the bug, the summary will look
more like this:
Summary for 500 test programs:
2951 passed test cases.
12 failed test cases.
45 expected failed test cases.
69 skipped test cases.
Or it may end with a segmentation fault like this:
p2k_ffs_race: atf-report: ERROR: 10912: Unexpected token `<<EOF>>'; expected end of test case or test case's stdout/stderr line
[1] Segmentation fault (core dumped) atf-run |
Done(1) atf-report
The problem goes away if the "-m 32" is omitted from the qemu command line,
which leads me to suspect that the problem may be related to paging or
swapping activity in the guest.
The revision listed in the subject, b76f0d8c2e3eac9
is the first one exhibiting the excessive test failures, but the bug may already
have been introduced in the previous commit, fdbb84d1332ae08
If I attempt to run the test on fdbb84d1332ae08
guest fails to boot. The revision before that, 32761257c0b9fa7
works as expected.
--
Andreas Gustafsson, <email address hidden>
Changed in qemu: | |
status: | Fix Committed → Fix Released |
This has been fixed in commit d6e839e718c2540 b880ac9d2d7a49f b7ade02cfb