Ceiridge / WinFsp-MemFs-Extended

tmpfs for Windows / Fully dynamic RAM disk by extending WinFsp's memfs to be variable size and maximally resource efficient without compromising performance
GNU General Public License v3.0
51 stars 2 forks source link

Service Failure After WinFsp 2022+ARM64 RC1 Upgrade #1

Closed protonpony closed 2 years ago

protonpony commented 2 years ago

Memefs64 fails after upgrading from WinFsp 2022+ARM64 Beta3 to WinFsp 2022+ARM64 RC1 with the following output posted to the Windows application log:

launcher-x64: create memefs64\ramdisk = 0 memefs-x64: cannot create MEMFS memefs-x64: The service memefs has failed to start (Status=800704db). launcher-x64: terminated memefs64\ramdisk

Windows command line output:

❯ launchctl-x64.exe start memefs64 test "" X: OK ❯ launchctl-x64.exe stop memefs64 test KO launcher: error 2

I require assistance producing debug output.

Ceiridge commented 2 years ago

I will take a look at this problem soon. I assume it is because of ARM. If you are using the compiled release, then it might be the issue, because it is compiled for x86-64. I will release an ARM version soon and maybe it should work

protonpony commented 2 years ago

Thank-you for your efforts and ultra prompt response. I upgraded winfsp with hopes of resolving periodic errors encountered while using the ramdrive path as the TEMP environment variable. Restoring the default path solved an array of issues ranging from general application installer failures to Windows update boot loops.

Ceiridge commented 2 years ago

Yes, some installers temporarily save some stuff in the temp folder and still require it after a reboot. I use it as my Downloads folder. As far as I know, most people have a huge and cluttered Downloads folder and never take the time to organize the downloaded files. A ramdrive enforces doing this and also turns the Downloads folder into a temporary working directory

Ceiridge commented 2 years ago

Maybe you could provide a dump file? Try searching for a memefs dump file in these following directories: %userprofile%\AppData\Local\CrashDumps C:\Windows\System32\config\systemprofile\AppData\Local\CrashDumps\

Maybe you could find it by searching for ext:dmp with Everything.

protonpony commented 2 years ago

Sorry, nothing in either of the provided paths. I use Everything extensively and that didn't return anything either. I noticed a couple switches for memefs-x64.exe to write debug output but couldn't get them to work. Are you able to reproduce the problem now? I'll hold off downgrading winfsp as long as I can be of assistance.

Yes, some installers temporarily save some stuff in the temp folder and still require it after a reboot.

That explains some of the errors I encounterd, but others happened before rebooting.

As far as I know, most people have a huge and cluttered Downloads folder and never take the time to organize the downloaded files.

I definitely fall in that category. I considered using Blackhole for that purpose, but memefs64 might be better suited. I just need to move my torrents first.

Ceiridge commented 2 years ago

The error code seems to be ERROR_SERVICE_NOT_FOUND. Do the registry keys and the respective files still exist according to the installation guide?

Can you try starting memefs manually with this test command line: memefs-x64.exe -i -m T: (will mount memefs on T:)

protonpony commented 2 years ago

Do the registry keys and the respective files still exist according to the installation guide?

Yes, that's the first thing I checked.

❯ memefs-x64.exe -i -m T: memefs -t -1 -s 0 -m T: The service memefs has been started.

The T: drive DOES appear in explorer after running the above command. However, the installed service still does not work.

Ceiridge commented 2 years ago

If memefs fully works by starting it manually means that memefs is not the cause. Maybe reading this documentation will help: https://winfsp.dev/doc/WinFsp-Service-Architecture/

Maybe this note is important?: Please note that in a 64-bit system the actual location is HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\WinFsp\Services

protonpony commented 2 years ago

Probably so. Perhaps I'll try again later. If the latest winfsp is working for you, then I must have overlooked something. I truly appreciate your contributions and assistance.

protonpony commented 2 years ago

Since upgrading winfsp requires uninstalling the old version first, I thought it prudent to do the same with memefs. When the ramdrive failed to map afterwards, I pasted the scheduled task directly into a command prompt which produced the following output. I failed to notice that tab-completion inserted launcher-x64.exe instead of launchctl-x64.exe which started me down a path that consumed the better part of four hours we'll never get back (for which I'm deeply sorry). However, my mistake would have have been exposed as soon as someone else performed the upgrade without incident.

❯ "C:\Program Files (x86)\WinFsp\bin\launcher-x64.exe" start memefs64 ramdisk "" R: The service WinFsp.Launcher has failed to start (Status=c0000022).

Ceiridge commented 2 years ago

0xC0000022 = STATUS_ACCESS_DENIED Have you executed it with administrator rights?

protonpony commented 2 years ago

As I said, the problem is solved and the error is my own. I typed launch[er]-x64.exe instead of launch[ctl]-x64.exe. Thank-you for your kindness and all your hard work.