Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

New keosd process is created even though there is an existing keosd process (develop branch) #5998

Closed
andriantolie opened this issue Oct 15, 2018 · 3 comments

Comments

@andriantolie
Copy link
Contributor

andriantolie commented Oct 15, 2018

I was investigating issue #4064, where cleos wallet create fails if "eosio-wallet" directory doesn't exist and keosd is already running.

This issue still persists in the master branch but has disappeared in the develop branch.

However, I noticce the following thing in develop branch:

  1. I call cleos wallet create, a keosd process is spawned
  2. I delete the "~/eosio-wallet" folder
  3. I call cleos wallet create again, another keosd process is spawned. So I have two keosd processes now running, which I think should be prevented since I already have a keosd process running?

Although it's not harmful or critical, I think it will be tidier if it can be cleaned up.

@conr2d
Copy link
Contributor

conr2d commented Oct 15, 2018

If there is an executed keosd process, 8900 port may be occupied (common configuration). In this case, another keosd fails to be executed.

@andriantolie
Copy link
Contributor Author

Correct. That's why this issue doesn't happen in the master branch as it is still using TCP port. However, the develop branch seems to have moved the keosd communication to unix socket instead and the unix socket file is located inside "eosio-wallet" folder.

@jgiszczak
Copy link
Contributor

Since all file locks in Linux are advisory locks, a perfect solution that avoids all possible race conditions is not possible. That said, keosd now monitors its lock file and terminates if it's manually removed, preventing most instances of abandoned keosd instances happening as a result of user experimentation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants