-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
bug: Unable to start daemon after unclean shutdown #3061
Comments
@mateon1 thanks for the report! Our windows testing right now is definitely lacking, This issue looks like it would likely be addressed by upstream changes in the locking library we're using. |
@whyrusleeping I remember other issues where we were talking about changing the lock lib, did it happen? |
@Kubuxu i don't think we ever got around to updating that |
@Kubuxu Sure. If I force kill the daemon process on 0.4.3-rc2, the lock can't be acquired for about 10 seconds (1-2 failed daemon launches), after which the daemon starts correctly. |
I this issue seems to be fixed in 0.4.3; the lockfile is a JSON object, marking the owning process's PID. I believe if the PID exists, the lock considers itself claimed, otherwise invalid, fixing this issue. |
It could be that problem is still there. Or maybe a little different kind of problem I was using version 0.4.3 (binary from Easiest way to reproduce it is to run C:\Users\Iwasawafag>ipfs swarm peers
Error: This command must be run in online mode. Try running 'ipfs daemon' first.
Use 'ipfs swarm peers --help' for information about this command
C:\Users\Iwasawafag>ipfs swarm peers
Error: cannot acquire lock: file "C:\\Users\\Iwasawafag\\.ipfs\\repo.lock" already locked I'm not really familiar with Go, so I can't tell what's going on here. From the |
same problem |
when i shutdown ipfs using ctrl+c and then trying to rerun it again. I get the error that repo.lock is alrleady locked |
@kris113 windows? That won't be fixed in the next release (baking right now) but will be in the next. Lockfiles on windows will now be cleaned up by the OS. FYI, to work around this, call |
Version/Platform/Processor information: ipfs version 0.4.2; Windows 10 x64
(Unrecognized option 'all')
Type: bug
Area: daemon
Priority: P2
Description:
After an unclean daemon shutdown, the $IPFS_PATH/repo.lock can be left in an invalid state, preventing the daemon from launching without manual intervention (deleting the lock file).
Example, running
ipfs --debug daemon
:The text was updated successfully, but these errors were encountered: