https://bugs.winehq.org/show_bug.cgi?id=40240
Bug ID: 40240 Summary: ntdll:exception causes the Windows 10 VM to crash Product: Wine-Testbot Version: unspecified Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: unknown Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com Distribution: ---
The ntdll:exception test causes the Windows 10 VM (w1064) to crash. Given that this does not happen on real hardware it is a TestBot bug.
Incidentally this is why we don't get any WineTest result from that VM.
Either there is a way to avoid the crash by adjusting the QEMU configuration or a QEMU bug should be filed.
https://bugs.winehq.org/show_bug.cgi?id=40240
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
--- Comment #1 from Sebastian Lackner sebastian@fds-team.de --- Does it also crash with a bluescreen, like on my local test VM?
https://bugs.winehq.org/show_bug.cgi?id=40240
--- Comment #2 from François Gouget fgouget@codeweavers.com --- Yes. On that screen I got KMOD_EXCEPTION_NOT_HANDLED once with the 64 bit test, but usually I get SERVICE_SYSTEM_EXCEPTION.
https://bugs.winehq.org/show_bug.cgi?id=40240
--- Comment #3 from François Gouget fgouget@codeweavers.com --- It turns out that the ntdll:exception Windows crash on wtbw1064 produces the following kernel error messages on the host:
Dec 16 13:43:48 vm3 kernel: [ 191.624802] kvm [2064]: vcpu0, guest rIP: 0xfffff803cb3c0bf3 kvm_set_msr_common: MSR_IA32_DEBUGCTLMSR 0x1, nop Dec 16 13:43:48 vm3 kernel: [ 191.624835] kvm [2064]: vcpu0, guest rIP: 0xfffff803cb3c0c5c unhandled rdmsr: 0x1c9
This happens even with QEMU 1:2.7+dfsg-3~bpo8+2 and linux-image 4.7.8-1~bpo8+1. Fortunately looking up these messages turns up the following workaround which lets ntdll:exception succeed.
echo 1 >/sys/module/kvm/parameters/ignore_msrs
https://www.reddit.com/r/VFIO/comments/42dj7n/some_games_crash_to_biosboot_o...
Todo: 1) Make sure the echo will be performed on boot, on all VM hosts so the Windows 10 VM can be moved around at will. 2) Report this QEMU issue if it has not been reported yet. 3) This implies checking whether this issue is specific to Intel hosts or if it also happens on AMD ones (vm2). 4) Check whether it also happens on my TestBot rig. 5) I seem to remember the crash did not happen on the Windows 7 and 8.1 VMs that were upgraded to Windows 10. Double-check, on a host know to have the above issue (e.g. vm3). 6) Record the relevant QEMU bug(s) here so we can keep track of them.
https://bugs.winehq.org/show_bug.cgi?id=40240
--- Comment #4 from Henri Verbeet hverbeet@gmail.com --- (In reply to François Gouget from comment #3)
- Make sure the echo will be performed on boot, on all VM hosts so the
Windows 10 VM can be moved around at will.
It may be easier to just pass the parameter on the kernel command line.
https://bugs.winehq.org/show_bug.cgi?id=40240
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- OS|Linux |Windows
https://bugs.winehq.org/show_bug.cgi?id=40240
--- Comment #5 from François Gouget fgouget@codeweavers.com --- I added a /etc/init.d script that should do the trick (local-qemu).
https://bugs.winehq.org/show_bug.cgi?id=40240
--- Comment #6 from François Gouget fgouget@codeweavers.com --- Created attachment 56949 --> https://bugs.winehq.org/attachment.cgi?id=56949 Source code to reproduce the issue
This tar file contains a self-contained set of sources files for reproducing this crash. It can be compiled with just MinGW. The file is a bit big because I had to include a few Wine headers but the actual source file is only 85 lines, including the LGPL header.
https://bugs.winehq.org/show_bug.cgi?id=40240
--- Comment #7 from François Gouget fgouget@codeweavers.com ---
From the todo list:
1) I created an init.d script so the workaround should now automatically be applied on boot. It might be simpler to use a modeprobe.conf file though: echo "options kvm ignore_msrs=1" >> /etc/modprobe.d/local-kvm.conf Neither has really been tested since the hosts have not been restarted yet.
4) On my machine (i7-4790K) I have: $ cat /sys/module/kvm/parameters/ignore_msrs N
Yet, I cannot crash the wtbw7u VM when I use its Windows 10 snapshot (that VM has been upgraded to Windows 10, though the TestBot only uses the Windows 7 snapshot for now).
But with the wtbw1064 VM the crash happens just as for the TestBot: - I get the same kvm errors in /var/log/syslog. - The same workaround fixes the issue.
This means this issue depends on some aspect of the guest environment and not just on the host's configuration or CPU.
5) The point above confirms that this issue does not happen on all Windows 10 guests.
7) I uploaded source code to reproduce this issue.
All that remains now is checking if this issue happens on AMD processors (3, but this seems optional), and reporting to QEMU (2) and recording the reference here (6).
https://bugs.winehq.org/show_bug.cgi?id=40240
--- Comment #8 from François Gouget fgouget@codeweavers.com --- More data: * The crash also happens with the Windows 10 snapshot of wtbw7pro64. So it's a Windows 10 64 bit thing. * The crash does not happen with the Windows 10 snapshot of wtbw7pro64 when running on vm2. Note that I had to change the CPU to 'copy the host configuration' though (Opteron 6128). So this takes care of (3). * On my box the CPU was set to core2duo but changing it to 'copy the host configuration' though (i7-4790K in this case) did not change anything.
https://bugs.winehq.org/show_bug.cgi?id=40240
--- Comment #9 from François Gouget fgouget@codeweavers.com --- As a correction to comment 2, KMOD_EXCEPTION_NOT_HANDLED is the normal type of BSOD for this bug.
https://bugs.winehq.org/show_bug.cgi?id=40240
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://bugs.launchpad.net/ | |qemu/+bug/1658141
--- Comment #10 from François Gouget fgouget@codeweavers.com --- I did not find any related QEMU bug so I reported it there: https://bugs.launchpad.net/qemu/+bug/1658141
With that all of the todo list has been taken care of.
https://bugs.winehq.org/show_bug.cgi?id=40240
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de Status|NEW |RESOLVED Resolution|--- |NOTOURBUG
--- Comment #11 from André H. nerv@dawncrow.de --- not our bug then
https://bugs.winehq.org/show_bug.cgi?id=40240
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #12 from Austin English austinenglish@gmail.com --- Closing.