-
Notifications
You must be signed in to change notification settings - Fork 26
Windows minidumps
Crashdumps can be enabled in Settings > System > Info under "extended system settings" If you do managed to get a Blue Screen Of Death (BSOD), Windows should in theory write a crash dump file to:
C:\Windows\MEMORY.DMP
The dump file can be analyzed with [http://windbg.org WinDbg.exe]
Debug builds of OpenZFS include debugging symbols to assist in dump analysis which are located at:
C:\Program Files\OpenZFS On Windows\symbols\
Once installed, WinDbg.exe can be run from a CMD.com or PowerShell terminal with Administrative privileges:
WinDbgX.exe -y ‘C:\Program Files\OpenZFS On Windows\symbols\’ -z C:\Windows\MEMORY.DMP
This will launch the application and you can perform dump analysis with:
kd> !analyze -v
To run the analysis in a single command:
WinDbgX.exe -y ‘C:\Program Files\OpenZFS On Windows\symbols\’ -z C:\Windows\MEMORY.DMP -c !analyze -v
Launch WinDbg.exe and set the symbol path:
kd> .symfix c:\cache
kd> .sympath+ C:\Program Files\OpenZFS On Windows\symbols
kd> .reload
So that it can load both the symbols from Microsoft, and from the installed Open ZFS directory.
Open the crash dump file with:
File: Open crash dump
C:\Windows\MEMORY.DMP
Perform the analysis:
kd> !analyze -v
Should at least show the stack.
-

Set symbol path -

Add path -

Load crash dump -

Locate minidump -

Minidump loading -

Analyze with stack
A successful crash dump would look something like:
OpenZFS!zfs_range_lock_reader+0x290 [c:\src\openzfs\zfs\module\zfs\zfs_rlock.c @ 417] C/C++/ASM
OpenZFS!zfs_range_lock+0x16d [c:\src\openzfs\zfs\module\zfs\zfs_rlock.c @ 453] C/C++/ASM
OpenZFS!zil_lwb_commit+0x99f [c:\src\openzfs\zfs\module\zfs\zil.c @ 1570] C/C++/ASM
OpenZFS!zil_process_commit_list+0x30e [c:\src\openzfs\zfs\module\zfs\zil.c @ 2182] C/C++/ASM
OpenZFS!zil_commit_writer+0x111 [c:\src\openzfs\zfs\module\zfs\zil.c @ 2318] C/C++/ASM
If you get only OpenZFS+0x"hex-number" it means it is not reading the debug symbols correctly, to be able to convert the hex-number into a function name.
Windows features a circular debug print buffer which can also be written to disk:
kd> .writemem C:\Users\<your Windows username>\Desktop\cbuf.txt poi(OpenZFS!cbuf) L100000
Do not worry if you get a message about short write, it just means you have not yet filled the buffer.
This will include -EB- at the end of the buffer.
Do not worry if the rest of the buffer has "@" (nul) symbols, it just means the buffer was not yet full.
Please provide the contents of the dump analysis and cbuf.txt in your crash-related tickets.
Other useful debugger commands:
# Write out OpenZVOL's cbuf instead.
kd> .writemem zvol_cbuf.txt poi(OpenZVOL!cbuf) L100000
# Dump all OpenZFS stacks (somewhat slow)
.logopen c:\src\stacks.txt ; !stacks 2 OpenZFS; .logclose
# Dump all stacks (definitely slow)
.logopen c:\src\stacks.txt ; !stacks 2; .logclose