Giter Site home page Giter Site logo

Comments (11)

andry81 avatar andry81 commented on July 29, 2024

I have tried the Arsenal Image Mounter v3.9.228 and got the same bug but, with slightly different stack trace at ~60GB point. I've took it after termination of the hanged dotnet.exe process (all threads has closed instead of 2, where one have has cycles).

Stack trace of one thread with cycles after dotnet.exe termination initiated by the PH

0, ntoskrnl.exe!KeInsertQueueApc+0x5cb
1, ntoskrnl.exe!ObfReferenceObject+0x99d
2, ntoskrnl.exe!KeDelayExecutionThread+0x186
3, ntoskrnl.exe!RtlFreeUnicodeString+0xa3
4, ntoskrnl.exe!IoCreateController+0x13ad
5, ntoskrnl.exe!ObReferenceObjectByHandle+0x7c9
6, ntoskrnl.exe!KeInsertQueueApc+0x6cc
7, ntoskrnl.exe!KiCpuId+0x2730
8, ntoskrnl.exe!longjmp+0x5c97
9, ntdll.dll!NtWaitForMultipleObjects+0xa
10, KernelBase.dll!GetCurrentProcess+0x40
11, kernel32.dll!WaitForMultipleObjectsEx+0xb3
12, coreclr.dll+0x3587f
13, coreclr.dll+0x356f1
14, coreclr.dll+0x35260
15, 0x7fe87fa23c7
16, 0x7fe87fa4443
17, 0x7fe87fa3fa0
18, 0x7fe87f9efce
19, 0x7fe87f9ee0a
20, 0x7fe87fa742f
21, 0x7fe87f9df7a
22, 0x7fe87fa4d2f
23, 0x7fe87fa485f
24, 0x7fe87f993b6
25, 0x7fe87f985c4
26, System.Private.CoreLib.dll+0x2c286f
27, coreclr.dll!coreclr_shutdown_2+0x16003
28, coreclr.dll+0x56d9c
29, coreclr.dll!coreclr_execute_assembly+0x26723
30, coreclr.dll+0x336f5
31, coreclr.dll+0x335fa
32, coreclr.dll+0x33419
33, kernel32.dll!BaseThreadInitThunk+0xd
34, ntdll.dll!RtlUserThreadStart+0x1d

At this time it could unblock the hanged copy operation with the Win32 Exception dialog after ~2-4 mins of waiting (update: the dialog does appear only if the Remove button been pressed in the UI beside the dotnet.exe process termination):

Error when dismounting virtual disk.

The system cannot find the file specified. (2)

Do you want to forcefully remove the virtual disk device instead?

I don't know, but I've issued the mountvol <mounted-drive> /d and have terminated dotnet.exe process and that may be somehow got loose the hang.

Or is that connected to the CLR and .NET?

.NET runtime installer: windowsdesktop-runtime-6.0.10-win-x64.exe

from imdisk.

andry81 avatar andry81 commented on July 29, 2024

I've minimized the reproduction steps and just copy now 40GB single file. It got stuck on ~10GB get copied. I think this somehow related to the physical memory size which in mine case is 64GB.

The .vdi file can be created through the Arsenal Image Mounter UI as is.

Then updated .NET Desktop runtime up to 6.0.11. Reproduced the issue.

Then I've made w:\1.vdi to mount and w:\2.vdi to copy into first one. I have used Windows Explorer to copy. It got stuck at very end. Created the minidump from the Process Hacker.

dotnet.exe.zip

from imdisk.

andry81 avatar andry81 commented on July 29, 2024

I've updated .NET Desktop runtime up to 7.0.0. The case with the w:\1.vdi file is not reproduced. But the initial SSD copy operation still does reproduce.

Then I downgraded to .NET Desktop runtime 5.0.17. Run Arsenal Image Mounter v3.6.188 and got the same bug as for the ImDisk without ability to revive the system. The stack trace was looking the same with the WriteFile in the middle.

from imdisk.

LTRData avatar LTRData commented on July 29, 2024

Thanks for your report.

I'll do some tests soon and see what I can reproduce here.

Could this possibly be related to cache of some kind? If you look at Task Manager, memory tab, while this happens, do you notice a huge increase of used memory that slowly drops down to normal levels again during the period where the drive appears hung? Do you notice any differences when the target image file is stored in different locations such as on system volume, external disks, network shares etc?

If you want to forcefully remove an Arsenal Image Mounter mounted disk, the best option is usually to use aim_ll.exe tool:
aim_ll -d (to remove all mounted disks) or aim_ll -d -m D: (to remove disk mounted to drive letter D:) or aim_ll -d -u 000100 (to remove disk with a specified device number in Arsenal Image Mounter driver). You can use aim_ll -l to list all mounted disks.
https://github.com/ArsenalRecon/Arsenal-Image-Mounter/tree/master/Command%20line%20applications

If you kill the dotnet.exe process that mounted the disk, the disk will hang and all I/O to it will eventually timeout. The only way to remove it is then usually to use aim_ll -d.

from imdisk.

andry81 avatar andry81 commented on July 29, 2024

Could this possibly be related to cache of some kind? If you look at Task Manager, memory tab, while this happens, do you notice a huge increase of used memory that slowly drops down to normal levels again during the period where the drive appears hung?

No. Memory hasn't any noticeable consumption.

Do you notice any differences when the target image file is stored in different locations such as on system volume, external disks, network shares etc?

I didn't notice the difference. But I've only tested it for 2 volumes from HDD and SSD.

If you want to forcefully remove an Arsenal Image Mounter mounted disk, the best option is usually to use aim_ll.exe tool:
aim_ll -d (to remove all mounted disks) or aim_ll -d -m D: (to remove disk mounted to drive letter D:) or aim_ll -d -u 000100 (to remove disk with a specified device number in Arsenal Image Mounter driver). You can use aim_ll -l to list all mounted disks.

There is no such utility, only aim_cli.exe

If you kill the dotnet.exe process that mounted the disk, the disk will hang and all I/O to it will eventually timeout. The only way to remove it is then usually to use aim_ll -d.

Currently this is the only way to revive the system. By timeout.

from imdisk.

LTRData avatar LTRData commented on July 29, 2024

Thanks for testing. I have done some tests here, but I cannot reproduce anything like this.

If you want to forcefully remove an Arsenal Image Mounter mounted disk, the best option is usually to use aim_ll.exe tool:
aim_ll -d (to remove all mounted disks) or aim_ll -d -m D: (to remove disk mounted to drive letter D:) or aim_ll -d -u 000100 (to remove disk with a specified device number in Arsenal Image Mounter driver). You can use aim_ll -l to list all mounted disks.

There is no such utility, only aim_cli.exe

You need to download aim_ll using the link:
https://github.com/ArsenalRecon/Arsenal-Image-Mounter/blob/master/Command%20line%20applications

If you kill the dotnet.exe process that mounted the disk, the disk will hang and all I/O to it will eventually timeout. The only way to remove it is then usually to use aim_ll -d.

Currently this is the only way to revive the system. By timeout.

If possible, could you test with aim_ll -d and see if that removes the mounted disk? I am curious to know that, because it points in a bit different direction depending on whether that helps or not.

from imdisk.

andry81 avatar andry81 commented on July 29, 2024

Thanks for testing. I have done some tests here, but I cannot reproduce anything like this.

Can't say it is clearly related to the ImDisk or Arsenal Image Mounter. There is another driver which uses mounting - VeraCrypt. I've feelings it somehow involved into the issue. I am using 1.25.9 has installed over 1.24-update7 using .inf file directly (currently there is an issue with the installation of the last installer on Windows 7 x64 and another issue with uninstalling of a previous version).

May be you could test using mine case?

from imdisk.

LTRData avatar LTRData commented on July 29, 2024

Thanks for more details, I'll do some tests together with VeraCrypt as well and see what I can find.

One thing that really surprises me here, is that you get slower I/O with vhd format. That is usually the fastest and most efficient, since it does not use DiscUtils implementation but instead a separate highly optimized kernel driver implementation. Or more specifically, that is in the case of AIM, maybe you compared performance when using ImDisk instead? Could you try with a mounted vhd in AIM and see if you still get the hang? Also, is it the same if you use Windows built-in features for mounting the vhd (in Disk Management)?

from imdisk.

LTRData avatar LTRData commented on July 29, 2024

I have done some tests now with VeraCrypt installed and running as well. I can however still not reproduce any similar problem.

from imdisk.

andry81 avatar andry81 commented on July 29, 2024

I've tried to retest the case and got stuck on another issue.

If try to run Arsenal Image Mounter and create .vdi or .vhd image then, the app does freeze with the Please wait... dialog. But, the buttons still can be pressed and I pressed Refresh and saw incompletely mounted item in the list (has no drive letter). If open the Device Manager dialog and open tree item with disk drives then, there would be the Arsenal Virtual SCSI Disk Device item together with an orange exclamation icon. The properties shows the driver is programmatically disabled (code 32) but, if open driver details tab there would be a list of files loaded together with the Arsenal driver:

C:\Windows\system32\DRIVERS\disk.sys
C:\Windows\system32\drivers\partmgr.sys
C:\Windows\system32\drivers\veracrypt.sys

The Arsenal Image Mounter GUI still usable and I can just remove the item with the exception:

DriveNotFoundException

Error when dismounting virtual disk.

Device 000000 is not ready

No drive found for device number 000000

Do You want to forcefully remove the virtual disk device instead?

[Yes] [No]

The Arsenal app still shows the Please wait... splash dialog and I think this is another bug.

But, I've disable all suspicious or relevant drivers before the test: Veracrypt, VirtualBox, ImDisk. Did remove .NET Desktop runtime 7.0.0.

Seems the Veracrypt somehow has forced to load together with the Arsenal driver.

Update:
I renamed the sys file and it made the trick. The driver file is removed from the list. But the freeze still persist.

from imdisk.

LTRData avatar LTRData commented on July 29, 2024

I would recommend that you search registry for references to veracrypt.sys. I did not expect it to load as a filter driver in another stack in this way, but it seems like it does in your case. Or something else might be interfering in some way. Not sure really what is going on. If you have another machine or virtual machine etc where you can try out configuration changes, could you try and see if you can reproduce it there and if not, which of applications installed can you install there too without this issue happening?

from imdisk.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.