btrfs icon indicating copy to clipboard operation
btrfs copied to clipboard

Copying files from NTFS to BTRFS of 2GB or more hangs completely

Open X9VoiD opened this issue 3 years ago • 7 comments

File copy transfers of 2GB or more hangs the transfer and Windows itself, sometimes even leading to a BSoD.

X9VoiD avatar Jan 31 '21 07:01 X9VoiD

What version of Windows is this on? (Try running winver.)

Can you get it to generate a minidump for the BSOD?

maharmstone avatar Jan 31 '21 13:01 maharmstone

I couldn't reproduce this on Windows 10... I'll have to close this unless you give me the details.

maharmstone avatar Feb 03 '21 17:02 maharmstone

Apparently, this bug happens on Windows 10 20H2, and doesn't happen on LTSC which is based on Windows 10 1809.

Sorry for late reply. Will try to post a minidump someday when I get the chance.

X9VoiD avatar Feb 22 '21 11:02 X9VoiD

Here happen the same issue, Windows 10 20H1 64. Copying files 2 GB freeze Windows Explorer and even removing the drive (if using external drive) the freeze continue and need restart the system. Impossible copy my files from external driver BTRFS to internal drive NTFS using Windows Explorer. If using FastCopy utility not happen the problem and is possible copying all files without hangs on system.

Augusto7743 avatar Mar 25 '21 15:03 Augusto7743

@maharmstone you wanted details, here are some :)

I can confirm this on Windows 10 2004, latest driver version (1.7.6). I was initially able to copy 60GB of data onto it no problem (using the partition for my steam library). But now, whenever steam updates games I observe the same behaviour described by others in this thread and in #346.

At this point I have already encountered the bug twice, both times while steam was doing updates, so it might be reproducible if I just wait for steam to update something. I have not had a BSOD yet though.

The partition resides on a spinny-disk, was formatted using mkbtrfs here on Windows and has exactly one subvolume containing all the data, and there is one snapshot of this subvolume. Compression was set to zstd right after creating the subvol (but not forced). Steam is the only thing on my system using this partition (also no swapfile on there).

An interesting nuance I observed (not sure how helpful though) is that windows task manager shows about 3.5GB of "Modified" RAM in the Memory tab while this bug is "in progress", so to say. That value has been the same both times. What's also weird to me is that all disk IO (yes, writing and reading) of the system gets locked up, even on completely unrelated drives that have no btrfs partition on them.

I'd try debugging when it happens again but I have absolutely no idea how to go about that on Windows. Since the system doesn't crash there's no dump - so how could I see what it's currently doing (or not doing for that matter)?

Henningstone avatar Mar 26 '21 20:03 Henningstone

@maharmstone I've finally gotten around to familiarise myself with Windows Kernel Debugging and the results look promising (to me anyway).

As I said, the problem happens when Steam updates games, that's why you see steam.exe in the following dumps.

From what I understand it looks like a deadlock between fast_io_write and the flush-thread.

Looking at the commit history it seems like you beat me to it by 3 days 😃 So hopefully my findings here help confirm a potential suspicion you might have had there 🙂


!locks

Resource @ 0xffffa483fc3c1358    Shared 1 owning threads
    Contention Count = 264
    NumberOfSharedWaiters = 5
    NumberOfExclusiveWaiters = 1
     Threads: ffffa483fce86500-01    ffffa48402677080-01    ffffa48403a38080-01    ffffa483fd5f2080-01    
              ffffa4840a02e080-01    ffffa48401c27080-01<*> 

     Threads Waiting On Exclusive Access:
              ffffa483fc52c180

Thread waiting for exclusive access:

4: kd> !thread ffffa483fc52c180
THREAD ffffa483fc52c180  Cid 0004.034c  Teb: 0000000000000000 Win32Thread: 0000000000000000 WAIT: (WrResource) KernelMode Non-Alertable
    ffffb70009287a70  SynchronizationEvent
Not impersonating
DeviceMap                 ffff8d8bcf046360
Owning Process            ffffa483f76a9080       Image:         System
Attached Process          N/A            Image:         N/A
Wait Start TickCount      20468          Ticks: 192 (0:00:00:03.000)
Context Switch Count      786            IdealProcessor: 3             
UserTime                  00:00:00.000
KernelTime                00:00:00.296
Win32 Start Address btrfs!flush_thread (0xfffff80030a7b660)
Stack Init ffffb70009287b90 Current ffffb700092875d0
Base ffffb70009288000 Limit ffffb70009281000 Call 0000000000000000
Priority 8 BasePriority 8 PriorityDecrement 0 IoPriority 2 PagePriority 5
Child-SP          RetAddr           : Args to Child                                                           : Call Site
ffffb700`09287610 fffff800`25065850 : ffffdf01`dd2c1180 00000000`ffffffff 00000004`ffffff00 00000000`00000000 : nt!KiSwapContext+0x76
ffffb700`09287750 fffff800`25064d7f : 2020203f`00000004 00000000`00000002 ffffb700`09287910 00000000`00000000 : nt!KiSwapThread+0x500
ffffb700`09287800 fffff800`25064623 : 00000000`00000040 ffffa484`00000000 00000000`00000000 ffffa483`fc52c2c0 : nt!KiCommitThreadWait+0x14f
ffffb700`092878a0 fffff800`250674fd : ffffb700`09287a70 00000000`0000001b 00000000`00000000 00000000`00000000 : nt!KeWaitForSingleObject+0x233
ffffb700`09287990 fffff800`25061e0e : ffffa483`fc3c1358 ffffb700`09287a58 00000000`00010224 fffff800`251225f0 : nt!ExpWaitForResource+0x6d
ffffb700`09287a10 fffff800`30a75f11 : ffffa483`fc3c0030 ffffa483`fc3c1ec0 ffffa483`fc3c0180 ffffa483`fc3c0180 : nt!ExAcquireResourceExclusiveLite+0x1fe
ffffb700`09287aa0 fffff800`30a7b6ed : ffffffff`ee1e5d00 ffffa483`fc3c1ec0 ffffffff`ee1e5d00 ffffa483`fc52c100 : btrfs!do_flush+0x21 [Z:\home\hellas\wine\fs\btrfs\src\flushthread.c @ 7796] 
ffffb700`09287ad0 fffff800`25117e85 : ffffa483`fc52c180 00000000`00000080 fffff800`30a7b660 ffffa483`fc3c0030 : btrfs!flush_thread+0x8d [Z:\home\hellas\wine\fs\btrfs\src\flushthread.c @ 7832] 
ffffb700`09287b10 fffff800`251fd2a8 : fffff800`21fad180 ffffa483`fc52c180 fffff800`25117e30 00000000`00000000 : nt!PspSystemThreadStartup+0x55
ffffb700`09287b60 00000000`00000000 : ffffb700`09288000 ffffb700`09281000 00000000`00000000 00000000`00000000 : nt!KiStartSystemThread+0x28

Owner of the lock:

4: kd> !thread ffffa48401c27080
THREAD ffffa48401c27080  Cid 25f8.1e2c  Teb: 00000000004ea000 Win32Thread: 0000000000000000 WAIT: (Executive) KernelMode Non-Alertable
    ffffb7000a9374a0  NotificationEvent
Not impersonating
DeviceMap                 ffff8d8bd3edaa80
Owning Process            ffffa48409bfc080       Image:         steam.exe
Attached Process          N/A            Image:         N/A
Wait Start TickCount      20638          Ticks: 22 (0:00:00:00.343)
Context Switch Count      698            IdealProcessor: 4             
UserTime                  00:00:00.000
KernelTime                00:00:00.109
Win32 Start Address 0x0000000073b64d70
Stack Init ffffb7000a937b90 Current ffffb7000a937090
Base ffffb7000a938000 Limit ffffb7000a931000 Call 0000000000000000
Priority 13 BasePriority 8 PriorityDecrement 80 IoPriority 2 PagePriority 5
Child-SP          RetAddr           : Args to Child                                                           : Call Site
ffffb700`0a9370d0 fffff800`25065850 : ffffdf01`dd140180 00000000`00000000 00000000`00000000 00000000`00000000 : nt!KiSwapContext+0x76
ffffb700`0a937210 fffff800`25064d7f : ffffa484`00000002 ffffffff`00000004 ffffb700`0a9373d0 fffff800`00000000 : nt!KiSwapThread+0x500
ffffb700`0a9372c0 fffff800`25064623 : ffffa483`00000033 00000000`00000000 ffffa483`f79e1a00 ffffa484`01c271c0 : nt!KiCommitThreadWait+0x14f
ffffb700`0a937360 fffff800`252217ba : ffffb700`0a9374a0 ffffb700`00000000 00000000`00000000 fffff800`25adb700 : nt!KeWaitForSingleObject+0x233
ffffb700`0a937450 fffff800`256865ed : 00000000`00000000 00000000`00000009 ffffa484`05c25178 ffffa483`fc3c13b8 : nt!CcCanIWrite+0x1f367a
ffffb700`0a9375d0 fffff800`30a68496 : ffffa484`03112d10 ffffa484`05c25178 00000000`00000708 ffff8d8b`dbab7b01 : nt!FsRtlCopyWrite+0x7d
ffffb700`0a9376b0 fffff800`28d973fc : fffff800`30b4b200 ffffa483`fbfadce0 ffffa483`fc3c0030 ffffa484`03112d10 : btrfs!fast_io_write+0xb6 [Z:\home\hellas\wine\fs\btrfs\src\fastio.c @ 363] 
ffffb700`0a937700 fffff800`28d944d7 : ffffb700`0a937810 ffffb700`0a9377a8 ffffa484`05c25110 ffffa484`05c25010 : FLTMGR!FltpPerformFastIoCall+0x16c
ffffb700`0a937760 fffff800`28dcb215 : ffffb700`0a938000 ffffb700`0a931000 ffffa484`01c27118 ffffa484`03112d10 : FLTMGR!FltpPassThroughFastIo+0x107
ffffb700`0a9377e0 fffff800`253e433d : ffffa484`03112d10 00000000`00000000 00000000`00000000 00000000`00000000 : FLTMGR!FltpFastIoWrite+0x165
ffffb700`0a937890 fffff800`252075b5 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : nt!NtWriteFile+0x43d
ffffb700`0a937990 00000000`77b21cfc : 00000000`0ae4a9b0 00000000`04e4eb30 00000000`00000000 00000000`04e487a0 : nt!KiSystemServiceCopyEnd+0x25 (TrapFrame @ ffffb700`0a937a00)
00000000`04e4efe8 00000000`0ae4a9b0 : 00000000`04e4eb30 00000000`00000000 00000000`04e487a0 00000000`0b0f5ba0 : 0x77b21cfc
00000000`04e4eff0 00000000`04e4eb30 : 00000000`00000000 00000000`04e487a0 00000000`0b0f5ba0 00000000`04e4eb30 : 0xae4a9b0
00000000`04e4eff8 00000000`00000000 : 00000000`04e487a0 00000000`0b0f5ba0 00000000`04e4eb30 00000000`00000000 : 0x4e4eb30

Verbose information on this resource:

4: kd> !locks -v 0xffffa483fc3c1358

Resource @ 0xffffa483fc3c1358    Shared 1 owning threads
    Contention Count = 264
    NumberOfSharedWaiters = 5
    NumberOfExclusiveWaiters = 1
     Threads: ffffa483fce86500-01    

     THREAD ffffa483fce86500  Cid 0004.0e74  Teb: 0000000000000000 Win32Thread: 0000000000000000 WAIT: (WrResource) KernelMode Non-Alertable
         ffffb7000ccbf6b8  SynchronizationEvent
     Not impersonating
     DeviceMap                 ffff8d8bcf046360
     Owning Process            ffffa483f76a9080       Image:         System
     Attached Process          N/A            Image:         N/A
     Wait Start TickCount      20495          Ticks: 165 (0:00:00:02.578)
     Context Switch Count      3908           IdealProcessor: 4             
     UserTime                  00:00:00.000
     KernelTime                00:00:11.234
     Win32 Start Address nt!ExpWorkerThread (0xfffff80025025870)
     Stack Init ffffb7000ccbfb90 Current ffffb7000ccbf200
     Base ffffb7000ccc0000 Limit ffffb7000ccb9000 Call 0000000000000000
     Priority 13 BasePriority 13 PriorityDecrement 0 IoPriority 2 PagePriority 5
     Child-SP          RetAddr           Call Site
     ffffb700`0ccbf240 fffff800`25065850 nt!KiSwapContext+0x76
     ffffb700`0ccbf380 fffff800`25064d7f nt!KiSwapThread+0x500
     ffffb700`0ccbf430 fffff800`25064623 nt!KiCommitThreadWait+0x14f
     ffffb700`0ccbf4d0 fffff800`250674fd nt!KeWaitForSingleObject+0x233
     ffffb700`0ccbf5c0 fffff800`250625aa nt!ExpWaitForResource+0x6d
     ffffb700`0ccbf640 fffff800`25062014 nt!ExpAcquireResourceSharedLite+0x4da
     ffffb700`0ccbf700 fffff800`30a55d72 nt!ExAcquireResourceSharedLite+0x44
     ffffb700`0ccbf740 fffff800`2502cf70 btrfs!acquire_for_lazy_write+0x22 [Z:\home\hellas\wine\fs\btrfs\src\cache.c @ 28] 
     ffffb700`0ccbf770 fffff800`25032775 nt!CcWriteBehindInternal+0x130
     ffffb700`0ccbf850 fffff800`25034059 nt!CcWriteBehind+0x91
     ffffb700`0ccbf940 fffff800`25025975 nt!CcWorkerThread+0x259
     ffffb700`0ccbfa70 fffff800`25117e85 nt!ExpWorkerThread+0x105
     ffffb700`0ccbfb10 fffff800`251fd2a8 nt!PspSystemThreadStartup+0x55
     ffffb700`0ccbfb60 00000000`00000000 nt!KiStartSystemThread+0x28

ffffa48402677080-01    

     THREAD ffffa48402677080  Cid 1dc4.11b0  Teb: 00000000002a2000 Win32Thread: ffffa484023d6840 WAIT: (WrResource) KernelMode Non-Alertable
         ffffb7000c79f088  SynchronizationEvent
     IRP List:
         ffffa4840554da30: (0006,04c0) Flags: 00000884  Mdl: 00000000
     Not impersonating
     DeviceMap                 ffff8d8bd3edaa80
     Owning Process            ffffa484022c8080       Image:         explorer.exe
     Attached Process          N/A            Image:         N/A
     Wait Start TickCount      20526          Ticks: 134 (0:00:00:02.093)
     Context Switch Count      632            IdealProcessor: 2             
     UserTime                  00:00:00.015
     KernelTime                00:00:00.062
     Win32 Start Address ntdll!TppWorkerThread (0x00007fff1d142ad0)
     Stack Init ffffb7000c79fb90 Current ffffb7000c79ebd0
     Base ffffb7000c7a0000 Limit ffffb7000c799000 Call 0000000000000000
     Priority 13 BasePriority 8 PriorityDecrement 34 IoPriority 2 PagePriority 5
     Child-SP          RetAddr           Call Site
     ffffb700`0c79ec10 fffff800`25065850 nt!KiSwapContext+0x76
     ffffb700`0c79ed50 fffff800`25064d7f nt!KiSwapThread+0x500
     ffffb700`0c79ee00 fffff800`25064623 nt!KiCommitThreadWait+0x14f
     ffffb700`0c79eea0 fffff800`250674fd nt!KeWaitForSingleObject+0x233
     ffffb700`0c79ef90 fffff800`250625aa nt!ExpWaitForResource+0x6d
     ffffb700`0c79f010 fffff800`25062014 nt!ExpAcquireResourceSharedLite+0x4da
     ffffb700`0c79f0d0 fffff800`30a612e3 nt!ExAcquireResourceSharedLite+0x44
     ffffb700`0c79f110 fffff800`30a59986 btrfs!verify_vcb+0x33 [Z:\home\hellas\wine\fs\btrfs\src\create.c @ 4724] 
     ffffb700`0c79f190 fffff800`25052f55 btrfs!drv_create+0xb6 [Z:\home\hellas\wine\fs\btrfs\src\create.c @ 4830] 
     ffffb700`0c79f200 fffff800`28d96ccf nt!IofCallDriver+0x55
     ffffb700`0c79f240 fffff800`28dcbbd4 FLTMGR!FltpLegacyProcessingAfterPreCallbacksCompleted+0x28f
     ffffb700`0c79f2b0 fffff800`25052f55 FLTMGR!FltpCreate+0x324
     ffffb700`0c79f360 fffff800`25054544 nt!IofCallDriver+0x55
     ffffb700`0c79f3a0 fffff800`253fefad nt!IoCallDriverWithTracing+0x34
     ffffb700`0c79f3f0 fffff800`2542797e nt!IopParseDevice+0x117d
     ffffb700`0c79f560 fffff800`253eb27a nt!ObpLookupObjectName+0x3fe
     ffffb700`0c79f730 fffff800`2546d5af nt!ObOpenObjectByNameEx+0x1fa
     ffffb700`0c79f860 fffff800`2546d0f8 nt!IopCreateFile+0x40f
     ffffb700`0c79f900 fffff800`252075b5 nt!NtOpenFile+0x58
     ffffb700`0c79f990 00007fff`1d18d274 nt!KiSystemServiceCopyEnd+0x25 (TrapFrame @ ffffb700`0c79fa00)
     00000000`0786dec8 00000000`00000000 ntdll!NtOpenFile+0x14

ffffa48403a38080-01    

     THREAD ffffa48403a38080  Cid 1dc4.0c6c  Teb: 00000000002ae000 Win32Thread: ffffa48403adedf0 WAIT: (WrResource) KernelMode Non-Alertable
         ffffb70009cff088  SynchronizationEvent
     IRP List:
         ffffa483fd489460: (0006,04c0) Flags: 00000884  Mdl: 00000000
     Not impersonating
     DeviceMap                 ffff8d8bd3edaa80
     Owning Process            ffffa484022c8080       Image:         explorer.exe
     Attached Process          N/A            Image:         N/A
     Wait Start TickCount      20529          Ticks: 131 (0:00:00:02.046)
     Context Switch Count      56             IdealProcessor: 7             
     UserTime                  00:00:00.015
     KernelTime                00:00:00.031
     Win32 Start Address ntdll!TppWorkerThread (0x00007fff1d142ad0)
     Stack Init ffffb70009cffb90 Current ffffb70009cfebd0
     Base ffffb70009d00000 Limit ffffb70009cf9000 Call 0000000000000000
     Priority 13 BasePriority 8 PriorityDecrement 34 IoPriority 2 PagePriority 5
     Child-SP          RetAddr           Call Site
     ffffb700`09cfec10 fffff800`25065850 nt!KiSwapContext+0x76
     ffffb700`09cfed50 fffff800`25064d7f nt!KiSwapThread+0x500
     ffffb700`09cfee00 fffff800`25064623 nt!KiCommitThreadWait+0x14f
     ffffb700`09cfeea0 fffff800`250674fd nt!KeWaitForSingleObject+0x233
     ffffb700`09cfef90 fffff800`250625aa nt!ExpWaitForResource+0x6d
     ffffb700`09cff010 fffff800`25062014 nt!ExpAcquireResourceSharedLite+0x4da
     ffffb700`09cff0d0 fffff800`30a612e3 nt!ExAcquireResourceSharedLite+0x44
     ffffb700`09cff110 fffff800`30a59986 btrfs!verify_vcb+0x33 [Z:\home\hellas\wine\fs\btrfs\src\create.c @ 4724] 
     ffffb700`09cff190 fffff800`25052f55 btrfs!drv_create+0xb6 [Z:\home\hellas\wine\fs\btrfs\src\create.c @ 4830] 
     ffffb700`09cff200 fffff800`28d96ccf nt!IofCallDriver+0x55
     ffffb700`09cff240 fffff800`28dcbbd4 FLTMGR!FltpLegacyProcessingAfterPreCallbacksCompleted+0x28f
     ffffb700`09cff2b0 fffff800`25052f55 FLTMGR!FltpCreate+0x324
     ffffb700`09cff360 fffff800`25054544 nt!IofCallDriver+0x55
     ffffb700`09cff3a0 fffff800`253fefad nt!IoCallDriverWithTracing+0x34
     ffffb700`09cff3f0 fffff800`2542797e nt!IopParseDevice+0x117d
     ffffb700`09cff560 fffff800`253eb27a nt!ObpLookupObjectName+0x3fe
     ffffb700`09cff730 fffff800`2546d5af nt!ObOpenObjectByNameEx+0x1fa
     ffffb700`09cff860 fffff800`2546d0f8 nt!IopCreateFile+0x40f
     ffffb700`09cff900 fffff800`252075b5 nt!NtOpenFile+0x58
     ffffb700`09cff990 00007fff`1d18d274 nt!KiSystemServiceCopyEnd+0x25 (TrapFrame @ ffffb700`09cffa00)
     00000000`006f6b18 00000000`00000000 ntdll!NtOpenFile+0x14

ffffa483fd5f2080-01    

     THREAD ffffa483fd5f2080  Cid 07a4.172c  Teb: 000000000117f000 Win32Thread: ffffa483fd1a8800 WAIT: (WrResource) KernelMode Non-Alertable
         ffffb70009d773b8  SynchronizationEvent
     IRP List:
         ffffa484056cf520: (0006,04c0) Flags: 00000884  Mdl: 00000000
         ffffa48402385010: (0006,04c0) Flags: 00060000  Mdl: 00000000
         ffffa483fcd9f520: (0006,04c0) Flags: 00060000  Mdl: 00000000
         ffffa483fd23b520: (0006,04c0) Flags: 00060000  Mdl: 00000000
         ffffa484020a1a30: (0006,04c0) Flags: 00060000  Mdl: 00000000
         ffffa483fc0d18a0: (0006,04c0) Flags: 00060000  Mdl: 00000000
         ffffa48402455a30: (0006,04c0) Flags: 00060000  Mdl: 00000000
         ffffa484024f4520: (0006,04c0) Flags: 00060000  Mdl: 00000000
         ffffa484029e3520: (0006,04c0) Flags: 00060000  Mdl: 00000000
         ffffa48402693520: (0006,04c0) Flags: 00060000  Mdl: 00000000
         ffffa484029e4520: (0006,04c0) Flags: 00060000  Mdl: 00000000
         ffffa484026e5010: (0006,04c0) Flags: 00060000  Mdl: 00000000
         ffffa48402a46520: (0006,04c0) Flags: 00060000  Mdl: 00000000
         ffffa48402056a30: (0006,04c0) Flags: 00060000  Mdl: 00000000
         ffffa48402055010: (0006,04c0) Flags: 00060000  Mdl: 00000000
         ffffa48402693010: (0006,04c0) Flags: 00060000  Mdl: 00000000
         ffffa484025f0520: (0006,04c0) Flags: 00060000  Mdl: 00000000
     Not impersonating
     DeviceMap                 ffff8d8bd3edaa80
     Owning Process            ffffa483fd442080       Image:         explorer.exe
     Attached Process          N/A            Image:         N/A
     Wait Start TickCount      20529          Ticks: 131 (0:00:00:02.046)
     Context Switch Count      488            IdealProcessor: 5             
     UserTime                  00:00:00.078
     KernelTime                00:00:00.062
     Win32 Start Address shcore!_WrapperThreadProc (0x00007fff1bc3e5a0)
     Stack Init ffffb70009d77fd0 Current ffffb70009d76f00
     Base ffffb70009d78000 Limit ffffb70009d71000 Call 0000000000000000
     Priority 13 BasePriority 8 PriorityDecrement 48 IoPriority 2 PagePriority 5
     Child-SP          RetAddr           Call Site
     ffffb700`09d76f40 fffff800`25065850 nt!KiSwapContext+0x76
     ffffb700`09d77080 fffff800`25064d7f nt!KiSwapThread+0x500
     ffffb700`09d77130 fffff800`25064623 nt!KiCommitThreadWait+0x14f
     ffffb700`09d771d0 fffff800`250674fd nt!KeWaitForSingleObject+0x233
     ffffb700`09d772c0 fffff800`250625aa nt!ExpWaitForResource+0x6d
     ffffb700`09d77340 fffff800`25062014 nt!ExpAcquireResourceSharedLite+0x4da
     ffffb700`09d77400 fffff800`30a612e3 nt!ExAcquireResourceSharedLite+0x44
     ffffb700`09d77440 fffff800`30a59986 btrfs!verify_vcb+0x33 [Z:\home\hellas\wine\fs\btrfs\src\create.c @ 4724] 
     ffffb700`09d774c0 fffff800`25052f55 btrfs!drv_create+0xb6 [Z:\home\hellas\wine\fs\btrfs\src\create.c @ 4830] 
     ffffb700`09d77530 fffff800`28d96ccf nt!IofCallDriver+0x55
     ffffb700`09d77570 fffff800`28dcbbd4 FLTMGR!FltpLegacyProcessingAfterPreCallbacksCompleted+0x28f
     ffffb700`09d775e0 fffff800`25052f55 FLTMGR!FltpCreate+0x324
     ffffb700`09d77690 fffff800`25054544 nt!IofCallDriver+0x55
     ffffb700`09d776d0 fffff800`253fefad nt!IoCallDriverWithTracing+0x34
     ffffb700`09d77720 fffff800`2542797e nt!IopParseDevice+0x117d
     ffffb700`09d77890 fffff800`253eb27a nt!ObpLookupObjectName+0x3fe
     ffffb700`09d77a60 fffff800`2546e0f5 nt!ObOpenObjectByNameEx+0x1fa
     ffffb700`09d77b90 fffff800`252075b5 nt!NtQueryAttributesFile+0x1c5
     ffffb700`09d77e40 00007fff`1d18d3b4 nt!KiSystemServiceCopyEnd+0x25 (TrapFrame @ ffffb700`09d77e40)
     00000000`057ed3f8 00007fff`1aa748f5 ntdll!NtQueryAttributesFile+0x14
     00000000`057ed400 00007fff`1b92212a KERNELBASE!GetFileAttributesW+0x85
     00000000`057ed4a0 00007fff`18a45dc1 shlwapi!PathFileExistsAndAttributesW+0x5a
     00000000`057ed730 00007fff`18a3c30a windows_storage!CDrivesFolder::GetAttributesOf+0x151
     00000000`057ed8b0 00007fff`18a2e82c windows_storage!CRegFolder::GetAttributesOf+0x1aa
     00000000`057ed950 00007fff`18a43c36 windows_storage!SHILAliasTranslate+0x5ac
     00000000`057edd90 00007fff`18a3ce24 windows_storage!CDesktopFolder::ParseDisplayName+0xce6
     00000000`057ee7c0 00007fff`1bf4b565 windows_storage!CRegFolder::ParseDisplayName+0x134
     00000000`057ee8e0 00007fff`1bf47a13 SHELL32!GetUnaliasedItem+0x405
     00000000`057eec50 00007fff`1bf48db6 SHELL32!CreateUnaliasedIdListPreservingAttributes+0xdf
     00000000`057eef70 00007fff`1bf4bd7d SHELL32!CChangeNotify::AddInterruptSource+0x196
     00000000`057ef040 00007fff`1bf46e12 SHELL32!CChangeNotify::AddClient+0x55d
     00000000`057ef150 00007fff`1bf45d3c SHELL32!CChangeNotify::_OnChangeRegistration+0x242
     00000000`057ef210 00007fff`1c71e858 SHELL32!CChangeNotify::s_WndProc+0x85c
     00000000`057ef360 00007fff`1c71e3dc user32!UserCallWinProcCheckWow+0x2f8
     00000000`057ef4f0 00007fff`1c730bc3 user32!DispatchClientMessage+0x9c
     00000000`057ef550 00007fff`1d190a44 user32!_fnDWORD+0x33
     00000000`057ef5b0 00007fff`1b011064 ntdll!KiUserCallbackDispatcherContinue (TrapFrame @ 00000000`057ef478)
     00000000`057ef638 00007fff`1c71a5c3 win32u!NtUserPeekMessage+0x14
     00000000`057ef640 00007fff`1c71a523 user32!_PeekMessage+0x43
     00000000`057ef6b0 00007fff`1bee08ba user32!PeekMessageW+0x143


              ffffa4840a02e080-01    

     THREAD ffffa4840a02e080  Cid 1dc4.2af8  Teb: 00000000002bc000 Win32Thread: ffffa48403ae2c20 WAIT: (WrResource) KernelMode Non-Alertable
         ffffb700098a7088  SynchronizationEvent
     IRP List:
         ffffa48403a63010: (0006,04c0) Flags: 00000884  Mdl: 00000000
     Not impersonating
     DeviceMap                 ffff8d8bd3edaa80
     Owning Process            ffffa484022c8080       Image:         explorer.exe
     Attached Process          N/A            Image:         N/A
     Wait Start TickCount      20530          Ticks: 130 (0:00:00:02.031)
     Context Switch Count      102            IdealProcessor: 5             
     UserTime                  00:00:00.015
     KernelTime                00:00:00.000
     Win32 Start Address ntdll!TppWorkerThread (0x00007fff1d142ad0)
     Stack Init ffffb700098a7b90 Current ffffb700098a6bd0
     Base ffffb700098a8000 Limit ffffb700098a1000 Call 0000000000000000
     Priority 13 BasePriority 8 PriorityDecrement 34 IoPriority 2 PagePriority 5
     Child-SP          RetAddr           Call Site
     ffffb700`098a6c10 fffff800`25065850 nt!KiSwapContext+0x76
     ffffb700`098a6d50 fffff800`25064d7f nt!KiSwapThread+0x500
     ffffb700`098a6e00 fffff800`25064623 nt!KiCommitThreadWait+0x14f
     ffffb700`098a6ea0 fffff800`250674fd nt!KeWaitForSingleObject+0x233
     ffffb700`098a6f90 fffff800`250625aa nt!ExpWaitForResource+0x6d
     ffffb700`098a7010 fffff800`25062014 nt!ExpAcquireResourceSharedLite+0x4da
     ffffb700`098a70d0 fffff800`30a612e3 nt!ExAcquireResourceSharedLite+0x44
     ffffb700`098a7110 fffff800`30a59986 btrfs!verify_vcb+0x33 [Z:\home\hellas\wine\fs\btrfs\src\create.c @ 4724] 
     ffffb700`098a7190 fffff800`25052f55 btrfs!drv_create+0xb6 [Z:\home\hellas\wine\fs\btrfs\src\create.c @ 4830] 
     ffffb700`098a7200 fffff800`28d96ccf nt!IofCallDriver+0x55
     ffffb700`098a7240 fffff800`28dcbbd4 FLTMGR!FltpLegacyProcessingAfterPreCallbacksCompleted+0x28f
     ffffb700`098a72b0 fffff800`25052f55 FLTMGR!FltpCreate+0x324
     ffffb700`098a7360 fffff800`25054544 nt!IofCallDriver+0x55
     ffffb700`098a73a0 fffff800`253fefad nt!IoCallDriverWithTracing+0x34
     ffffb700`098a73f0 fffff800`2542797e nt!IopParseDevice+0x117d
     ffffb700`098a7560 fffff800`253eb27a nt!ObpLookupObjectName+0x3fe
     ffffb700`098a7730 fffff800`2546d5af nt!ObOpenObjectByNameEx+0x1fa
     ffffb700`098a7860 fffff800`2546d0f8 nt!IopCreateFile+0x40f
     ffffb700`098a7900 fffff800`252075b5 nt!NtOpenFile+0x58
     ffffb700`098a7990 00007fff`1d18d274 nt!KiSystemServiceCopyEnd+0x25 (TrapFrame @ ffffb700`098a7a00)
     00000000`08366dc8 00000000`00000000 ntdll!NtOpenFile+0x14

ffffa48401c27080-01<*> 

     THREAD ffffa48401c27080  Cid 25f8.1e2c  Teb: 00000000004ea000 Win32Thread: 0000000000000000 WAIT: (Executive) KernelMode Non-Alertable
         ffffb7000a9374a0  NotificationEvent
     Not impersonating
     DeviceMap                 ffff8d8bd3edaa80
     Owning Process            ffffa48409bfc080       Image:         steam.exe
     Attached Process          N/A            Image:         N/A
     Wait Start TickCount      20638          Ticks: 22 (0:00:00:00.343)
     Context Switch Count      698            IdealProcessor: 4             
     UserTime                  00:00:00.000
     KernelTime                00:00:00.109
     Win32 Start Address 0x0000000073b64d70
     Stack Init ffffb7000a937b90 Current ffffb7000a937090
     Base ffffb7000a938000 Limit ffffb7000a931000 Call 0000000000000000
     Priority 13 BasePriority 8 PriorityDecrement 80 IoPriority 2 PagePriority 5
     Child-SP          RetAddr           Call Site
     ffffb700`0a9370d0 fffff800`25065850 nt!KiSwapContext+0x76
     ffffb700`0a937210 fffff800`25064d7f nt!KiSwapThread+0x500
     ffffb700`0a9372c0 fffff800`25064623 nt!KiCommitThreadWait+0x14f
     ffffb700`0a937360 fffff800`252217ba nt!KeWaitForSingleObject+0x233
     ffffb700`0a937450 fffff800`256865ed nt!CcCanIWrite+0x1f367a
     ffffb700`0a9375d0 fffff800`30a68496 nt!FsRtlCopyWrite+0x7d
     ffffb700`0a9376b0 fffff800`28d973fc btrfs!fast_io_write+0xb6 [Z:\home\hellas\wine\fs\btrfs\src\fastio.c @ 363] 
     ffffb700`0a937700 fffff800`28d944d7 FLTMGR!FltpPerformFastIoCall+0x16c
     ffffb700`0a937760 fffff800`28dcb215 FLTMGR!FltpPassThroughFastIo+0x107
     ffffb700`0a9377e0 fffff800`253e433d FLTMGR!FltpFastIoWrite+0x165
     ffffb700`0a937890 fffff800`252075b5 nt!NtWriteFile+0x43d
     ffffb700`0a937990 00000000`77b21cfc nt!KiSystemServiceCopyEnd+0x25 (TrapFrame @ ffffb700`0a937a00)
     00000000`04e4efe8 00000000`0ae4a9b0 0x77b21cfc
     00000000`04e4eff0 00000000`04e4eb30 0xae4a9b0
     00000000`04e4eff8 00000000`00000000 0x4e4eb30



     Threads Waiting On Exclusive Access:
              ffffa483fc52c180       
1 total locks

Henningstone avatar Apr 02 '21 21:04 Henningstone

Thanks @Henningstone. Yes, that looks like the same issue - a deadlock caused by fast_io_write / FsRtlCopyWrite. Hopefully this is fixed now, then.

maharmstone avatar Apr 02 '21 22:04 maharmstone

Closing old issues

maharmstone avatar Nov 30 '23 01:11 maharmstone