-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BSOD when loading the driver: SYSTEM_THREAD_EXCEPTION_NOT_HANDLED
#10
Comments
Strange, VirtioVgpuDeviceReleaseHardware was only called when the driver is unloading. |
That could not be true. I did enable it with If I didn't, I won't even get the driver to run! The driver will be blocked during installation, and nothing happens.
Do you mean that I should compile a driver in the debug mode by myself? |
The system may unload the driver due to the small memory. Attempt to allocate a larger memory size. |
I increased it to 8GB RAM. No luck. :( I find my issue similar to #5 and try to compile the driver successfully by myself. Both of his and my situations are listed here: #5:
Mine:
|
The driver only worked for Mvisor! |
Update: I thought Code 39 is due to a too high version of the target NT kernel, so I decreased Now the kernel driver installs and (seems?) loading successfully, and the device's status also becomes "Operating normally". But now I encounter #2 too. Same I will close this issue, since the problem described here has been fixed. The later discussion will be in #2. Thanks a lot! 👍 Solution: rebuild the kernel driver with a lower |
1. Problem
The kernel BSODed when trying to load mvisor-win-vgpu-driver, due to an error
Attempt to read from address 0000000000000008
. BSOD code isSYSTEM_THREAD_EXCEPTION_NOT_HANDLED
.2. Steps to reproduce
.qcow2
withqemu-img
:qemu-img -f qcow2 win.qcow2 80G
;https://github.com/tenclass/mvisor
and buildbuild/visor
with the instructions in README;Windows 10 (consumer editions), version 22H2 (updated July 2024) (x64) - DVD (Chinese-Simplified)
) from MSDN I Tell You.magnet:?xt=urn:btih:04c08aeaf5f6849b30cead6f722138d7ce1460c6&dn=zh-cn_windows_10_consumer_editions_version_22h2_updated_july_2024_x64_dvd_3245b006.iso&xl=7133401088
config/sample.yaml
with the following content:config/sample.yaml
./build/mvisor -c config/sample.yaml -vnc 5900
to install Windows normally;install.bat
with admin permission. While installing the kernel driver, the screen immediately freezes and BSODs, and then restarts..dmp
file is dumped inC:/Windows/minidump
.3. Additional Information
I debugged a little with WinDbg and Ghidra, and I believe that the error is due to a broken
Idrs[0].FreeIdList
.The error is
NULL_CLASS_PTR_DEREFERENCE
, and it seems thatvgpu.sys+0x3753
instruction was trying to access zero address, which is likely in:mvisor-win-vgpu-driver/kernelmode/vgpu/idr.c
Lines 50 to 63 in 45ab463
This method is called by
VirtioVgpuDeviceReleaseHardware
invgpu.c
, according to the dump stacktrace.I checked the disassembled codes of
UnInitializeIdr
:+3748
,LEA RBX, [0x14000c1b0]
setsRBX
to the address of&Idrs[0].FreeIdList
static variable (i.e.RBX = &Idrs[0].FreeIdList
), then jumps to37af
;+37af
,MOV RAX, qword ptr [RBX]
reads the first integer fromIdrs
and saves toRAX
, which should beRAX = Idrs[0].FreeIdList.Flink
;Idrs[0].FreeIdList.Flink
and&Idrs[0].FreeIdList
(which is0x0
and0x14000c1b0
respectively), and jump to+3753
;+3753
,CMP qword ptr [RAX + 0x8], RBX
reads from addressRAX + 0x8
, i.e.Idrs[0].FreeIdList.Flink->Blink
, i.e.0x0000000000000008
, and the exception occurred.The pseudocode is:
4. Logs and dumps
Windows minidump: 080524-4140-01.dmp
System Information:
The text was updated successfully, but these errors were encountered: