Skip to content
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

No such pool available after windows update #414

Open
AfmanS opened this issue Nov 16, 2024 · 26 comments
Open

No such pool available after windows update #414

AfmanS opened this issue Nov 16, 2024 · 26 comments

Comments

@AfmanS
Copy link

AfmanS commented Nov 16, 2024

System information

Windows 11 24H2
26100.2314
zfswin-2.2.6rc9
zfs-kmod-zfswin-2.2.6rc9

Describe the problem you're observing

Sometimes after booting the PC, the script I run that imports my pool returns "cannot import 'tank': no such pool available". This doesn't happen after every boot, only sometimes. The only pattern I've come to suspect is that it seems this happens when the PC needs to reboot for an update.

Describe how to reproduce the problem

  1. Install 2.2.6rc9
  2. Create a pool
  3. Wait until windows needs to apply an update
  4. Reboot computer
  5. Run zpool import tank
  6. Returns cannot import 'tank': no such pool available

Include any warning/errors/backtraces from the system logs

The command returns:

zpool import tank
path '\\?\scsi#disk&ven_seagate&prod_expansion#7&3529844e&1&000000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}'
 and '\\?\PhysicalDrive5'
read partitions ok 4
    mbr 0: type 7 off 0x8000 len 0x1d1c0e98200
    mbr 1: type 0 off 0x0 len 0x0
    mbr 2: type 0 off 0x0 len 0x0
    mbr 3: type 0 off 0x0 len 0x0
asking libefi to read label
EFI read OK, max partitions 128
path '\\?\scsi#disk&ven_hitachi&prod_hts547550a9e384#5&2b637674&0&050000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}'
 and '\\?\PhysicalDrive3'
read partitions ok 4
    mbr 0: type ee off 0x200 len 0x7470c05e00
    mbr 1: type 0 off 0x0 len 0x0
    mbr 2: type 0 off 0x0 len 0x0
    mbr 3: type 0 off 0x0 len 0x0
asking libefi to read label
EFI read OK, max partitions 9
path '\\?\scsi#disk&ven_nvme&prod_samsung_ssd_970#5&d9881e1&0&000000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}'
 and '\\?\PhysicalDrive4'
read partitions ok 5
    gpt 0: type 836b8fdc80 off 0x100000 len 0x6400000
    gpt 1: type 836b8fdc80 off 0x6500000 len 0x1000000
    gpt 2: type 836b8fdc80 off 0x7500000 len 0x7411100000
    gpt 3: type 836b8fdc80 off 0x7418600000 len 0x2b900000
    gpt 4: type 836b8fdc80 off 0x7444000000 len 0x2cb00000
asking libefi to read label
EFI read OK, max partitions 128
    part 0:  offset 800:    len 32000:    tag: c    name: 'EFI system partition'
    part 1:  offset 32800:    len 8000:    tag: 10    name: 'Microsoft reserved partition'
    part 2:  offset 3a800:    len 3a088800:    tag: 11    name: 'Basic data partition'
path '\\?\scsi#disk&ven_&prod_st500lt012-9ws14#5&2b637674&0&010000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}'
 and '\\?\PhysicalDrive1'
read partitions ok 4
    mbr 0: type ee off 0x200 len 0x7470c05e00
    mbr 1: type 0 off 0x0 len 0x0
    mbr 2: type 0 off 0x0 len 0x0
    mbr 3: type 0 off 0x0 len 0x0
asking libefi to read label
EFI read OK, max partitions 9
path '\\?\scsi#disk&ven_hitachi&prod_hts543216l9sa00#5&2b637674&0&000000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}'
 and '\\?\PhysicalDrive0'
read partitions ok 4
    mbr 0: type ee off 0x200 len 0x25433d5e00
    mbr 1: type 0 off 0x0 len 0x0
    mbr 2: type 0 off 0x0 len 0x0
    mbr 3: type 0 off 0x0 len 0x0
asking libefi to read label
EFI read OK, max partitions 9
path '\\?\scsi#disk&ven_fujitsu&prod_mhw2120bh#5&2b637674&0&040000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}'
 and '\\?\PhysicalDrive2'
read partitions ok 4
    mbr 0: type ee off 0x200 len 0x1bf2975e00
    mbr 1: type 0 off 0x0 len 0x0
    mbr 2: type 0 off 0x0 len 0x0
    mbr 3: type 0 off 0x0 len 0x0
asking libefi to read label
EFI read OK, max partitions 9
cannot import 'tank': no such pool available
@lundman
Copy link

lundman commented Nov 16, 2024

So maybe a timing thing, after a reboot? Does the physicaldriveX that the pool is on show in that output?

@AfmanS
Copy link
Author

AfmanS commented Nov 16, 2024

It's on 0, 1, 2 and 3. All showing up.

@lundman
Copy link

lundman commented Nov 16, 2024

And presumably if you wait a bit and try to import it goes ok? It is clearly reading the partition table, so it's not like the whole drive is locked.

@AfmanS
Copy link
Author

AfmanS commented Nov 16, 2024

No, the pool just doesn't show up anymore, even if I try to import later. It's been a few days and a few power cycles since it disappeared too.

@lundman
Copy link

lundman commented Nov 16, 2024

Oh so
This doesn't happen after every boot, only sometimes
is from before, now you can't import the pool at all any more? You didnt change the ZFS version since working?

@AfmanS
Copy link
Author

AfmanS commented Nov 16, 2024

I was on 2.2.3 but updating Windows to 24H2 broke something in the drivers, the commands weren't showing up, so I installed 2.2.6. When I did, the pool didn't show up. I didn't think much of it and just created a new pool. But every now and then the pool disappears again and I have to create a new one.

@lundman
Copy link

lundman commented Nov 16, 2024

Can you also show output from zpool import on its own.

@AfmanS
Copy link
Author

AfmanS commented Nov 16, 2024

path '\\?\scsi#disk&ven_seagate&prod_expansion#7&3529844e&1&000000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}'
 and '\\?\PhysicalDrive5'
read partitions ok 4
    mbr 0: type 7 off 0x8000 len 0x1d1c0e98200
    mbr 1: type 0 off 0x0 len 0x0
    mbr 2: type 0 off 0x0 len 0x0
    mbr 3: type 0 off 0x0 len 0x0
asking libefi to read label
EFI read OK, max partitions 128
path '\\?\scsi#disk&ven_hitachi&prod_hts547550a9e384#5&2b637674&0&050000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}'
 and '\\?\PhysicalDrive3'
read partitions ok 4
    mbr 0: type ee off 0x200 len 0x7470c05e00
    mbr 1: type 0 off 0x0 len 0x0
    mbr 2: type 0 off 0x0 len 0x0
    mbr 3: type 0 off 0x0 len 0x0
asking libefi to read label
EFI read OK, max partitions 9
path '\\?\scsi#disk&ven_nvme&prod_samsung_ssd_970#5&d9881e1&0&000000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}'
 and '\\?\PhysicalDrive4'
read partitions ok 5
    gpt 0: type b4df8fda30 off 0x100000 len 0x6400000
    gpt 1: type b4df8fda30 off 0x6500000 len 0x1000000
    gpt 2: type b4df8fda30 off 0x7500000 len 0x7411100000
    gpt 3: type b4df8fda30 off 0x7418600000 len 0x2b900000
    gpt 4: type b4df8fda30 off 0x7444000000 len 0x2cb00000
asking libefi to read label
EFI read OK, max partitions 128
    part 0:  offset 800:    len 32000:    tag: c    name: 'EFI system partition'
    part 1:  offset 32800:    len 8000:    tag: 10    name: 'Microsoft reserved partition'
    part 2:  offset 3a800:    len 3a088800:    tag: 11    name: 'Basic data partition'
path '\\?\scsi#disk&ven_&prod_st500lt012-9ws14#5&2b637674&0&010000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}'
 and '\\?\PhysicalDrive1'
read partitions ok 4
    mbr 0: type ee off 0x200 len 0x7470c05e00
    mbr 1: type 0 off 0x0 len 0x0
    mbr 2: type 0 off 0x0 len 0x0
    mbr 3: type 0 off 0x0 len 0x0
asking libefi to read label
EFI read OK, max partitions 9
path '\\?\scsi#disk&ven_hitachi&prod_hts543216l9sa00#5&2b637674&0&000000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}'
 and '\\?\PhysicalDrive0'
read partitions ok 4
    mbr 0: type ee off 0x200 len 0x25433d5e00
    mbr 1: type 0 off 0x0 len 0x0
    mbr 2: type 0 off 0x0 len 0x0
    mbr 3: type 0 off 0x0 len 0x0
asking libefi to read label
EFI read OK, max partitions 9
path '\\?\scsi#disk&ven_fujitsu&prod_mhw2120bh#5&2b637674&0&040000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}'
 and '\\?\PhysicalDrive2'
read partitions ok 4
    mbr 0: type ee off 0x200 len 0x1bf2975e00
    mbr 1: type 0 off 0x0 len 0x0
    mbr 2: type 0 off 0x0 len 0x0
    mbr 3: type 0 off 0x0 len 0x0
asking libefi to read label
EFI read OK, max partitions 9
no pools available to import

@AfmanS
Copy link
Author

AfmanS commented Nov 23, 2024

Updated to rc10 and created the pool again, everything was fine for several days and shutdowns until I had to reboot for an update just now and now the pool is gone again.

@lundman
Copy link

lundman commented Nov 24, 2024

why would an update write to an unrelated disk, that is most peculiar.

@AfmanS
Copy link
Author

AfmanS commented Nov 24, 2024

Happened again, without windows prompting an update. I was downloading a steam game onto it and the download froze, I couldn't write to the disk it seems, I also tried using qBittorrent on it and it couldn't even create the torrent folder. I could read files from it though. I tried unmounting but got error -1. When I restarted the PC the pool was gone.

@lundman
Copy link

lundman commented Nov 24, 2024

OK so something else is going on then. Are we talking physical drives, vm attached files? '\\?\scsi#disk&ven_seagate&prod_expansion# sounds like regular drives.

If you create a pool, write something to it, export it, then import it - does it still work?

@AfmanS
Copy link
Author

AfmanS commented Nov 25, 2024

They're physical, although very old (around 10-15 years old) drives. They never show any errors when I check with zpool status.

If I create a pool, write something to it, and export it, I get

zpool export tank
zunmount(tank,E:/) running
zunmount(tank,E:/) returns 0

But the prompt never returns back to me, it got stuck for at least 4 minutes.

@lundman
Copy link

lundman commented Nov 25, 2024

OK so we need to address that first perhaps. Interestingly zunmount(tank,E:/) returns 0 means the kernel is done, and it's back to userland to just finish up. Can you check the stack of zpool, maybe we can spot where it is stuck,

@AfmanS
Copy link
Author

AfmanS commented Nov 25, 2024

I don't know how to check the stack, but looking at the wiki, I think this might be what you're after. I ran this after trying to create the pool, which also did not finish.
https://pastebin.com/29TrW60a

Running the command returned this:

zpool create -O casesensitivity=insensitive -O compression=lz4 -O atime=off -o ashift=12 -f tank mirror PHYSICALDRIVE0 PHYSICALDRIVE2 mirror PHYSICALDRIVE1 PHYSICALDRIVE3
Expanded path to '\\?\PHYSICALDRIVE0'
Expanded path to '\\?\PHYSICALDRIVE2'
Expanded path to '\\?\PHYSICALDRIVE1'
Expanded path to '\\?\PHYSICALDRIVE3'
working on dev '#1048576#160031571968#\\?\PHYSICALDRIVE0'
setting path here '/dev/physicaldrive0'
setting physpath here '#1048576#160031571968#\\?\PHYSICALDRIVE0'
working on dev '#1048576#120024203264#\\?\PHYSICALDRIVE2'
setting path here '/dev/physicaldrive2'
setting physpath here '#1048576#120024203264#\\?\PHYSICALDRIVE2'
working on dev '#1048576#500098400256#\\?\PHYSICALDRIVE1'
setting path here '/dev/physicaldrive1'
setting physpath here '#1048576#500098400256#\\?\PHYSICALDRIVE1'
working on dev '#1048576#500098400256#\\?\PHYSICALDRIVE3'
setting path here '/dev/physicaldrive3'
setting physpath here '#1048576#500098400256#\\?\PHYSICALDRIVE3'

And then the prompt never came back to me.

@lundman
Copy link

lundman commented Nov 26, 2024

I believe https://superuser.com/questions/462989/how-can-i-view-the-call-stack-of-a-running-process-thread can help here. Userland is pretty straight forward.

@AfmanS
Copy link
Author

AfmanS commented Nov 27, 2024

Again when creating a new pool it hangs. There are two threads, these are their stacks

ntoskrnl.exe!KeSaveStateForHibernate+0x7d66
ntoskrnl.exe!CcUninitializeCacheMap+0x2308
ntoskrnl.exe!KeDelayExecutionThread+0xbd3
ntoskrnl.exe!KeWaitForSingleObject+0x7a4
ntoskrnl.exe!KeCopyAffinityEx2+0x30dc
ntoskrnl.exe!PsIsThreadTerminating+0xfa9
ntoskrnl.exe!CcUninitializeCacheMap+0x23b5
ntoskrnl.exe!KeDelayExecutionThread+0xbd3
ntoskrnl.exe!KeRemoveQueueEx+0x386
ntoskrnl.exe!IoRemoveIoCompletion+0x92
ntoskrnl.exe!ExReleaseSpinLockExclusive+0x1051
ntoskrnl.exe!setjmpex+0x9288
ntdll.dll!NtWaitForWorkViaWorkerFactory+0x14
ntdll.dll!TpCallbackMayRunLong+0x18be
KERNEL32.DLL!BaseThreadInitThunk+0x17
ntdll.dll!RtlUserThreadStart+0x2c
ntoskrnl.exe!KeSaveStateForHibernate+0x7d66
ntoskrnl.exe!CcUninitializeCacheMap+0x2308
ntoskrnl.exe!KeDelayExecutionThread+0xbd3
ntoskrnl.exe!KeWaitForSingleObject+0x7a4
OpenZFS.sys!spl_mutex_enter+0x125
OpenZFS.sys!spa_create+0xc6
OpenZFS.sys!zfs_ioc_pool_create+0x37c
OpenZFS.sys!zfsdev_ioctl_common+0x7db
OpenZFS.sys!zfsdev_ioctl+0x166
OpenZFS.sys!ioctlDispatcher+0x2b7
OpenZFS.sys!dispatcher+0x1ec
ntoskrnl.exe!IofCallDriver+0xbe
ntoskrnl.exe!NtDeviceIoControlFile+0x1b18
ntoskrnl.exe!NtDeviceIoControlFile+0x9b0
ntoskrnl.exe!NtDeviceIoControlFile+0x5e
ntoskrnl.exe!setjmpex+0x9288
ntdll.dll!NtDeviceIoControlFile+0x14
KERNELBASE.dll!DeviceIoControl+0x73
KERNEL32.DLL!DeviceIoControl+0x75
zpool.exe!zcmd_ioctl_compat+0xe7
zpool.exe!lzc_ioctl_fd+0x41
zpool.exe!zfs_ioctl+0x28
zpool.exe!zpool_create+0x48f
zpool.exe!zpool_do_create+0xde5
zpool.exe!main+0x2b9
zpool.exe!__scrt_common_main_seh+0x10c
KERNEL32.DLL!BaseThreadInitThunk+0x17
ntdll.dll!RtlUserThreadStart+0x2c

@lundman
Copy link

lundman commented Dec 7, 2024

Your 2nd thread:

OpenZFS.sys!spl_mutex_enter+0x125
OpenZFS.sys!spa_create+0xc6
OpenZFS.sys!zfs_ioc_pool_create+0x37c

Is basically trying to grab spa_namespace_lock which is generally only taken by other command requests, like zpool/zfs.
https://github.com/openzfsonwindows/openzfs/blob/development/module/zfs/spa.c

So something has already got stuck before the create. Although it goes down to CcUninitializeCacheMap which does not make any sense in this stack context.

The first process I am not sure on, can't be sure it is ZFS from the stacktrace. It's even got two CcUninitializeCacheMap in it which is even more confusing. How are the stacks printed?

@AfmanS
Copy link
Author

AfmanS commented Dec 9, 2024

I followed the instruction on the StackOverflow link. I found zpool.exe in process explorer, then Properties - Threads - and there were two. I tried creating a pool, writing something to it and exporting it now. It only hanged on the exporting and there is a single thread. Here's the stack, I hope it's more useful.

ntoskrnl.exe!KeSaveStateForHibernate+0x7d66
ntoskrnl.exe!CcUninitializeCacheMap+0x2308
ntoskrnl.exe!KeDelayExecutionThread+0xbd3
ntoskrnl.exe!KeWaitForMultipleObjects+0x56e
OpenZFS.sys!spl_cv_wait+0xea
OpenZFS.sys!rrw_enter_write+0xa9
OpenZFS.sys!rrm_enter_write+0x35
OpenZFS.sys!rrm_enter+0x3b
OpenZFS.sys!zfsvfs_teardown+0xcd
OpenZFS.sys!zfs_vfs_unmount+0x209
OpenZFS.sys!zfs_windows_unmount+0x7ac
OpenZFS.sys!zfs_ioc_unmount+0x55
OpenZFS.sys!zfsdev_ioctl_common+0x7db
OpenZFS.sys!zfsdev_ioctl+0x166
OpenZFS.sys!ioctlDispatcher+0x2b7
OpenZFS.sys!dispatcher+0x1ec
ntoskrnl.exe!IofCallDriver+0xbe
ntoskrnl.exe!NtDeviceIoControlFile+0x1b18
ntoskrnl.exe!NtDeviceIoControlFile+0x9b0
ntoskrnl.exe!NtDeviceIoControlFile+0x5e
ntoskrnl.exe!setjmpex+0x9288
ntdll.dll!NtDeviceIoControlFile+0x14
KERNELBASE.dll!DeviceIoControl+0x73
KERNEL32.DLL!DeviceIoControl+0x75
zpool.exe!zcmd_ioctl_compat+0xe7
zpool.exe!lzc_ioctl_fd+0x41
zpool.exe!zfs_ioctl+0x28
zpool.exe!do_unmount_impl+0xf9
zpool.exe!do_unmount+0x3b
zpool.exe!unmount_one+0x27
zpool.exe!zpool_disable_datasets+0x357
zpool.exe!zpool_export_one+0x47
zpool.exe!pool_list_iter+0x8b
zpool.exe!for_each_pool+0xb8
zpool.exe!zpool_do_export+0x2af
zpool.exe!main+0x2b9
zpool.exe!__scrt_common_main_seh+0x10c
KERNEL32.DLL!BaseThreadInitThunk+0x17
ntdll.dll!RtlUserThreadStart+0x2c

@lundman
Copy link

lundman commented Dec 9, 2024

That it is. We are stuck here

OpenZFS.sys!rrm_enter+0x3b
OpenZFS.sys!zfsvfs_teardown+0xcd

more precisely,

https://github.com/openzfsonwindows/openzfs/blob/development/module/os/windows/zfs/zfs_vfsops.c#L1431

which means it wants a WRITER lock, and is waiting for it, and if it is stuck there, something is holding a READER lock. Which most likely means an unbalanced pair of
zfs_enter() that fails to call
zfs_exit()
somewhere. Let me poke around and see if I can find where.

@AfmanS
Copy link
Author

AfmanS commented Dec 20, 2024

I tried to do the same using 2.2.6rc11 and the zpool export tank step caused a bluescreen. I don't think it wrote anything to MEMORY.DMP as it has a modified date a few months in the past.

@lundman
Copy link

lundman commented Dec 20, 2024

Yeah I think I am going to need a memory.dmp when that has happened - I have checked for leaks but it's not easy to try to guess. If it doesn't BSOD, you are supposed to be able to generate one:
https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/task-manager-live-dump

if you do BSOD but it doesn't write a MEMORY.DMP then ahh, I have no idea :)

@AfmanS
Copy link
Author

AfmanS commented Dec 29, 2024

I've sent a link to access the dump via e-mail.

@lundman
Copy link

lundman commented Dec 29, 2024

0000009e`cf7fb380 00007ffe`b30632b5     KERNELBASE!DeviceIoControl+0x73
0000009e`cf7fb3f0 00007ff6`41f377e7     kernel32!DeviceIoControlImplementation+0x75
0000009e`cf7fb440 00007ff6`41f376b1     zpool!zcmd_ioctl_compat+0xe7 [C:\src\openzfs\lib\libzfs_core\os\windows\libzfs_core_ioctl.c @ 54]
0000009e`cf7fb4d0 00007ff6`41f0f058     zpool!lzc_ioctl_fd+0x41 [C:\src\openzfs\lib\libzfs_core\os\windows\libzfs_core_ioctl.c @ 110]
0000009e`cf7fb520 00007ff6`41f31eb9     zpool!zfs_ioctl+0x28 [C:\src\openzfs\lib\libzfs\os\windows\libzfs_util_os.c @ 55]
0000009e`cf7fb560 00007ff6`41f31c7b     zpool!do_unmount_impl+0xf9 [C:\src\openzfs\lib\libzfs\os\windows\libzfs_mount_os.c @ 322]
0000009e`cf7fe8c0 00007ff6`41f218e7     zpool!do_unmount+0x3b [C:\src\openzfs\lib\libzfs\os\windows\libzfs_mount_os.c @ 371]
0000009e`cf7fe900 00007ff6`41f23147     zpool!unmount_one+0x27 [C:\src\openzfs\lib\libzfs\libzfs_mount.c @ 553]
0000009e`cf7fe950 00007ff6`41ec7397     zpool!zpool_disable_datasets+0x357 [C:\src\openzfs\lib\libzfs\libzfs_mount.c @ 1447]
0000009e`cf7fea00 00007ff6`41ea441b     zpool!zpool_export_one+0x47 [C:\src\openzfs\cmd\zpool\zpool_main.c @ 2416]
0000009e`cf7fea50 00007ff6`41ea4688     zpool!pool_list_iter+0x8b [C:\src\openzfs\cmd\zpool\zpool_iter.c @ 186]
0000009e`cf7feab0 00007ff6`41eafe5f     zpool!for_each_pool+0xb8 [C:\src\openzfs\cmd\zpool\zpool_iter.c @ 262]
0000009e`cf7feb30 00007ff6`41ea6939     zpool!zpool_do_export+0x2af [C:\src\openzfs\cmd\zpool\zpool_main.c @ 2551]
0000009e`cf7fec00 00007ff6`42acc789     zpool!main+0x2b9 [C:\src\openzfs\cmd\zpool\zpool_main.c @ 13516]
0000009e`cf7ffe30 00007ff6`42acc632     zpool!invoke_main+0x39 [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 79]
0000009e`cf7ffe80 00007ff6`42acc4ee     zpool!__scrt_common_main_seh+0x132 [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 288]
0000009e`cf7ffef0 00007ff6`42acc81e     zpool!__scrt_common_main+0xe [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 331]
0000009e`cf7fff20 00007ffe`b306e8d7     zpool!mainCRTStartup+0xe [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp @ 17]
0000009e`cf7fff50 00007ffe`b431fbcc     kernel32!BaseThreadInitThunk+0x17

Sadly, I can not see the other process and stacks, due to memory.dmp being smallest. Can you change it to at least Kernel memory dump ?

Chatgpt gives instructions as:

Open Control Panel → System and Security → System.
Click Advanced system settings on the left.
In the System Properties dialog, go to the Advanced tab.
Under Startup and Recovery, click Settings.
Set the Write debugging information option to:
Kernel memory dump (recommended).

@AfmanS
Copy link
Author

AfmanS commented Dec 29, 2024

I've added the new dump to the shared folder. Please note that a few minutes ago I disabled hybernation on my PC as the hyberfil.sys file was reaching 50GB. This had the effect of "zpool export tank" crashing more, so far every time I ran it the PC had a BSOD. Nevertheless the PC wrote a dump file successfully.

@lundman
Copy link

lundman commented Dec 30, 2024

OK this is different, a BSOD (as you mentioned), but let's look into it:

07 ffffe082`894ada20 fffff802`66921181     nt!KiBreakpointTrap+0x35b
08 ffffe082`894adbb0 fffff802`6695188f     OpenZFS!spl_panic+0x71 [C:\src\openzfs\module\os\windows\spl\spl-err.c @ 85] 
09 ffffe082`894adc10 fffff802`66952671     OpenZFS!spl_assert+0x3f [C:\src\openzfs\include\os\windows\spl\sys\debug.h @ 172] 
0a ffffe082`894adc60 fffff802`66c655d6     OpenZFS!vnode_rele+0x111 [C:\src\openzfs\module\os\windows\spl\spl-vnode.c @ 1407] 
0b ffffe082`894adcb0 fffff802`66c68c12     OpenZFS!volume_close+0x166 [C:\src\openzfs\module\os\windows\zfs\zfs_vnops_windows.c @ 6359] 
0c ffffe082`894add50 fffff802`66c669c1     OpenZFS!diskDispatcher+0x292 [C:\src\openzfs\module\os\windows\zfs\zfs_vnops_windows.c @ 7185] 
0d ffffe082`894ade30 fffff802`c66f79fe     OpenZFS!dispatcher+0x331 [C:\src\openzfs\module\os\windows\zfs\zfs_vnops_windows.c @ 8061] 
0e ffffe082`894adf60 fffff802`5a54fd1c     nt!IofCallDriver+0xbe
0f ffffe082`894adfa0 fffff802`5a5de87d     fvevol!FveFilterSkip+0x3c
10 ffffe082`894adfd0 fffff802`c66f79fe     fvevol!FveFilterClose+0xed
11 ffffe082`894ae000 fffff802`5a775053     nt!IofCallDriver+0xbe
12 ffffe082`894ae040 fffff802`c66f79fe     iorate!IoRateDispatchPassthrough+0x23
13 ffffe082`894ae070 fffff802`5a6735e9     nt!IofCallDriver+0xbe
14 ffffe082`894ae0b0 fffff802`c66f79fe     volsnap!VolSnapDefaultDispatch+0x39
15 ffffe082`894ae0e0 fffff802`c66f79fe     nt!IofCallDriver+0xbe
16 ffffe082`894ae120 fffff802`c6c71989     nt!IofCallDriver+0xbe
17 ffffe082`894ae160 fffff802`c6c4535c     nt!IopDeleteFile+0x139
18 ffffe082`894ae1f0 fffff802`c662db79     nt!ObpRemoveObjectRoutine+0xfc
19 ffffe082`894ae250 fffff802`c6c3d435     nt!ObfDereferenceObjectWithTag+0x79
1a ffffe082`894ae290 fffff802`c6c3bb89     nt!ObCloseHandleTableEntry+0x3e5
1b ffffe082`894ae3e0 fffff802`c6a8d358     nt!NtClose+0xe9
1c ffffe082`894ae450 fffff802`c6a7b7e0     nt!KiSystemServiceCopyEnd+0x28
1d ffffe082`894ae5e8 fffff802`c6d7c774     nt!KiServiceLinkage
1e ffffe082`894ae5f0 fffff802`c6d198e2     nt!IopInvalidateVolumesForDevice+0x2f0
1f ffffe082`894ae6c0 fffff802`c6de08ff     nt!IopRemoveDevice+0x1b6
20 ffffe082`894ae770 fffff802`c6de07ce     nt!PnpSurpriseRemoveLockedDeviceNode+0xdb
21 ffffe082`894ae7e0 fffff802`c6de05c5     nt!PnpDeleteLockedDeviceNode+0x7e
22 ffffe082`894ae820 fffff802`c6d1b29d     nt!PnpDeleteLockedDeviceNodes+0x109
23 ffffe082`894ae8b0 fffff802`c6cfb14b     nt!PnpProcessQueryRemoveAndEject+0x4c1
24 ffffe082`894ae990 fffff802`c6d089b7     nt!PnpProcessTargetDeviceEvent+0xe7
25 ffffe082`894ae9c0 fffff802`c67704a2     nt!PnpDeviceEventWorker+0x1e7
26 ffffe082`894aea40 fffff802`c685585a     nt!ExpWorkerThread+0x1b2
27 ffffe082`894aebf0 fffff802`c6a7ae54     nt!PspSystemThreadStartup+0x5a
28 ffffe082`894aec40 00000000`00000000     nt!KiStartSystemThread+0x34

The panic is that vp->v_usecount is 0, and we are trying to decrease it due to volume_close() being called. Why it is, without a volume_open() I do not know, unless Windows has gone an cloned the descriptor without telling me.

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

No branches or pull requests

2 participants