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

dkg: private key lock file not deleted properly on successful run #2258

Closed
gsora opened this issue May 31, 2023 · 1 comment
Closed

dkg: private key lock file not deleted properly on successful run #2258

gsora opened this issue May 31, 2023 · 1 comment
Assignees
Labels
bug Something isn't working protocol Protocol Team tickets

Comments

@gsora
Copy link
Collaborator

gsora commented May 31, 2023

🐞 Bug Report

Description

The goroutine that takes care of deleting the private key lock file when the context is cancelled might not be executed because the Go scheduler didn't schedule it for execution before the main one is.

🔬 Minimal Reproduction

This issue doesn't reproduce 100% of the times, because it's a concurrency issue.

Run a dkg, see if .charon/charon-enr-private-key.lock has been deleted.

@gsora gsora added the bug Something isn't working label May 31, 2023
@gsora gsora self-assigned this May 31, 2023
@github-actions github-actions bot added the protocol Protocol Team tickets label May 31, 2023
obol-bulldozer bot pushed a commit that referenced this issue Jun 1, 2023
Block `dkg` exit until `privkeylock.Run()` enclosing goroutine exits, ensuring that the private key lock file is always deleted.

`Run()` is supposed to be executed in a goroutine, and since we can't control the scheduler it might be scheduled *after* the `main` one exits, leading to the `ctx.Done()` code path to sometimes never be executed.

category: bug
ticket: #2258
@gsora
Copy link
Collaborator Author

gsora commented Jun 1, 2023

Closed by #2257.

@gsora gsora closed this as completed Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working protocol Protocol Team tickets
Projects
None yet
Development

No branches or pull requests

1 participant