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

The service memefs has failed to start #14

Open
Melab opened this issue Jan 31, 2024 · 15 comments
Open

The service memefs has failed to start #14

Melab opened this issue Jan 31, 2024 · 15 comments

Comments

@Melab
Copy link

Melab commented Jan 31, 2024

I installed the most recent release of this program after installing WinFsp 2.0.23075. I ran Command Prompt as administrator and this is what I got:
Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.

C:\Windows\system32>"C:\Program Files\memefs\memefs-x64.exe" -i F Temporary -u "" C:\Temporary
usage: memefs OPTIONS

options:
    -d DebugFlags       [-1: enable all debug logs]
    -D DebugLogFile     [file path; use - for stderr]
    -i                  [case insensitive file system]
    -f                  [flush and purge cache on cleanup]
    -s MaxFsSize        [bytes of maximum total memory size]
    -F FileSystemName
    -S RootSddl         [file rights: FA, etc; NO generic rights: GA, etc.]
    -u \Server\Share  [UNC prefix (single backslash)]
    -m MountPoint       [X:|* (required if no UNC prefix)]
    -l VolumeLabel      [optional volume label name]

The service memefs has failed to start (Status=c0000001).

C:\Windows\system32>"C:\Program Files\memefs\memefs-x64.exe" -i F Temporary -u "" -m T:
usage: memefs OPTIONS

options:
    -d DebugFlags       [-1: enable all debug logs]
    -D DebugLogFile     [file path; use - for stderr]
    -i                  [case insensitive file system]
    -f                  [flush and purge cache on cleanup]
    -s MaxFsSize        [bytes of maximum total memory size]
    -F FileSystemName
    -S RootSddl         [file rights: FA, etc; NO generic rights: GA, etc.]
    -u \Server\Share  [UNC prefix (single backslash)]
    -m MountPoint       [X:|* (required if no UNC prefix)]
    -l VolumeLabel      [optional volume label name]

The service memefs has failed to start (Status=c0000001).
@Ceiridge
Copy link
Owner

Have you tried it with the sample command line arguments: -i -F NTFS -u "" -m R:?

@Melab
Copy link
Author

Melab commented Feb 3, 2024

Have you tried it with the sample command line arguments: -i -F NTFS -u "" -m R:?

Ummm, does the name "NTFS" and the specific drive letter "R" matter? Because I used it with a plain old drive letter instead of a directory and it still didn't work.

Edit to add: I tried it with exactly those options and I received The service memefs has failed to start (Status=ffffffff). as a message.

@Ceiridge
Copy link
Owner

Ceiridge commented Feb 3, 2024

Edit to add: I tried it with exactly those options and I received The service memefs has failed to start (Status=ffffffff). as a message.

Do you get a crash dump somewhere? Is there a respective event logged in the eventvwr under Applications or System?
Also try running it with administrator rights.
Do you also have WinFsp itself installed?

@L3tum
Copy link

L3tum commented Mar 5, 2024

I've got a similar behaviour with error code 0xc00001 tho, one thing I noticed is that WinFsp also died WIN32_EXIT_CODE : 1077 (0x435).
I haven't found any logs, dumps or other things. I've uninstalled it for now but lmk if I can help somehow

@Ceiridge
Copy link
Owner

Ceiridge commented Mar 5, 2024

I've got a similar behaviour with error code 0xc00001 tho, one thing I noticed is that WinFsp also died WIN32_EXIT_CODE : 1077 (0x435). I haven't found any logs, dumps or other things. I've uninstalled it for now but lmk if I can help somehow

There has been no WinFsp update so far. It seems to be a WinFsp driver issue in your case. Perhaps you have made a mistake during installation

@L3tum
Copy link

L3tum commented Mar 8, 2024

I've tried a bit further and found that the communication with the WinFsp.Launcher service is unavailable due to the error "Pipe Busy". I haven't found anything further in regards to WinFsp.
From what I've found this error happens when either a named pipe isn't created or some other error occures that closes it. Since the service is running and a named pipe is created I'd guess that it enters an infinite loop about something. It doesn't crash and it also doesn't log anything.
During debugging I've found that another program repeatedly tries to access a registry key that isn't present, so I'll see if that's an issue. For now though I've uninstalled WinFsp again since it's creating more headaches than it's really worth, unfortunately.

@Ceiridge
Copy link
Owner

Ceiridge commented Mar 9, 2024

@L3tum This seems to be a problem on your side in regard to WinFsp. Were you able to use any other WinFsp filesystems, such as their pre-delivered memfs? (This repo is a full recode in C++ and improvement of exactly that)
You should create an issue in WinFsp itself.

@BilouGateux
Copy link

BilouGateux commented Mar 10, 2024

@L3tum
Try command line arguments below ie no -u param
"C:\Program Files\memefs\memefs-x64.exe" -i -F NTFS -l Ram -m \\.\Z:

memefs -s 0 -m \.\Z: -l Ram

The service memefs has been started.

mountvol /L

\\?\Volume{0a372907-deef-11ee-aa2b-00018085c70e}\
    Z:\

OS: Microsoft Windows 10 Pro
WinFSP: 2.0.23075.0_2023
Memefs-Installer: 3.2_2023

@Melab
Copy link
Author

Melab commented Oct 2, 2024

Edit to add: I tried it with exactly those options and I received The service memefs has failed to start (Status=ffffffff). as a message.

Do you get a crash dump somewhere? Is there a respective event logged in the eventvwr under Applications or System? Also try running it with administrator rights. Do you also have WinFsp itself installed?

I wouldn't even know where to look for a crash dump. I do not know what the eventvwr is.

I have since upgraded to Windows 10. Running "C:\Program Files\memefs\memefs-x64.exe" -i -F NTFS -u "" -m R: in Command Prompt with administrator privileges results in this being printed:

memefs -s 0 -m R:
The service memefs has been started.

Nothing else is printed after that (presumably this because the program is running in that). However, I do not see an R: drive in File Explorer and using a folder path instead of a drive name ("C:\Program Files\memefs\memefs-x64.exe" -i -F NTFS -u "" -m C:\Temporary) gives this:

cannot mount MEMFS
The service memefs has failed to start (Status=c0000035).

Do you also have WinFsp itself installed?

Yes.

@Ceiridge
Copy link
Owner

Ceiridge commented Oct 2, 2024

@Melab
eventwr is the built-in Windows Event Viewer, in which under the category Applications you can find error logs related to memefs. Take a look there.

Then also try running the command without administrator permissions. Also check if C:\Temporary already did exist. Deleting the folder might help?

You could also try running memefs like this: "C:\Program Files\memefs\memefs-x64.exe" -i -F NTFS -u \memefs64\example -m * (This command is untested)

@Ceiridge
Copy link
Owner

Ceiridge commented Oct 2, 2024

In addition, assuming you have used the Memefs Installer with the Launchctl Service, you can also do it that way:

"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start memefs64 ramdisk "" \\.\R:
(Run the as administrator and ensure the launchctl path is correct for your situation)

There is a guide for persistently installing Memefs: https://github.com/Ceiridge/WinFsp-MemFs-Extended/blob/master/Readme-Installation.txt

@Melab
Copy link
Author

Melab commented Oct 2, 2024

@Melab eventwr is the built-in Windows Event Viewer, in which under the category Applications you can find error logs related to memefs. Take a look there.

Okay, I'm in and I followed your previous directions, but I still don't know where to look.

Then also try running the command without administrator permissions.

Same error.

Also check if C:\Temporary already did exist.

It exists.

Deleting the folder might help?

That made it work. But shouldn't it work with the folder existing? Why doesn't it?

You could also try running memefs like this: "C:\Program Files\memefs\memefs-x64.exe" -i -F NTFS -u \memefs64\example -m * (This command is untested)

That worked, but why does it appear as a network drive? And what exactly does -F do?

@Melab
Copy link
Author

Melab commented Oct 2, 2024

In addition, assuming you have used the Memefs Installer with the Launchctl Service, you can also do it that way:

"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start memefs64 ramdisk "" \\.\R: (Run the as administrator and ensure the launchctl path is correct for your situation)

There is a guide for persistently installing Memefs: https://github.com/Ceiridge/WinFsp-MemFs-Extended/blob/master/Readme-Installation.txt

Those commands are very different. I don't see anything resembling the ones I've been testing. What is the difference?

Edit: I just ran that in Command Prompt as both administrator and as a normal user and it gave KO launcher: error 2.

@Ceiridge
Copy link
Owner

Ceiridge commented Oct 2, 2024

@Melab

| Okay, I'm in and I followed your previous directions, but I still don't know where to look.

On the left side are the categories you can open. You can try clicking on buttons until you are of the opinion of having reached your goal.

| That made it work. But shouldn't it work with the folder existing? Why doesn't it?

This does not work, because the folder could contain files and that would be an open question to deal with.

| That worked, but why does it appear as a network drive? And what exactly does -F do?

Yes, "-u" is for network drives. Note that they are tied to a specific Windows user, whereas drive letter mountpounts (like R:) are system-wide.

"-F" sets the filesystem string, in this case making it appear as if it was NTFS, increasing compatibility. However, it is mostly cosmetic.

| Those commands are very different. I don't see anything resembling the ones I've been testing. What is the difference

The difference is that launchctl is a WinFsp-specific thing that makes a WinFsp service manage the filesystem. If I remember correctly, exactly this allows you to use a system-wide mountpoint (e. g. \\.\R: which is an UNC-path to the R drive letter).
The guide I sent you is a guide on how to set up memefs to start when you log into your computer.

| Edit: I just ran that in Command Prompt as both administrator and as a normal user and it gave KO launcher: error 2.

It looks like you have failed to install something correctly or you are not running it fully as administrator. You will have to debug that yourself, because this is not customer support

@BilouGateux
Copy link

BilouGateux commented Oct 11, 2024

We have to check registry settings for the service using default values from NSIS installer

Name "Memefs"
!define INSTALLATIONNAME "Memefs"
OutFile "Memefs-Installer.exe"

!define FILE_SOURCE "x64\Release"
InstallDir $PROGRAMFILES64\memefs

WinFsp-Service-Architecture
Services that wish to be controlled by the WinFsp.Launcher must add themselves under the following registry key:

HKEY_LOCAL_MACHINE\Software\WinFsp\Services

Launch powershell console as administrator

$MyString = "Memefs";  $pattern = "^$([regex]::escape($myString)).*"; $Service = $null; $Subkey = $null; $Subkeypath = "SOFTWARE\WOW6432Node\WinFsp\Services"; $Subkey = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey($Subkeypath); $Service = $Subkey.GetSubKeyNames(); if ($Service -match $pattern) {Write-Output "Found `'$Service`' service"}; $Subkey.Dispose(); $Subkey = $null; $Service = $null; 

Confirm the result.

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

4 participants