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

Utils.run_exclusive causes GenServer error #1306

Closed
Neylix opened this issue Oct 18, 2023 · 0 comments · Fixed by #1347
Closed

Utils.run_exclusive causes GenServer error #1306

Neylix opened this issue Oct 18, 2023 · 0 comments · Fixed by #1347
Assignees
Labels
bug Something isn't working

Comments

@Neylix
Copy link
Member

Neylix commented Oct 18, 2023

Describe the problem you discovered

When a node is not synchronized it starts a repair process.
This process is started with NetworkChain.asynchronous_resync which calls Utils.run_exclusive. But this last one create a task using Task.async_nolink which means that the process that created this task will receive an event {ref, res} and {:DOWN, ...}.

Since this function may be called from GenServer if they don't handle the event they'll have a function clause error.
Example from Node responsivness and Node Renewal Scheduler:

image

image

Describe the solution you'd like

The Utils.run_exclusive should not start an async task that return event to the caller but a "fire and forget" task using Task.Supervisor.start_child

Epic

No response

@Neylix Neylix added the bug Something isn't working label Oct 18, 2023
@bchamagne bchamagne self-assigned this Dec 11, 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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants