Skip to content

Conversation

yacovm
Copy link
Contributor

@yacovm yacovm commented Apr 21, 2025

Why this should be merged

How this works

How this was tested

Need to be documented in RELEASES.md?

@yacovm yacovm requested a review from StephenButtolph as a code owner April 21, 2025 19:24
@yacovm yacovm marked this pull request as draft April 21, 2025 19:25
for !vm.isLocalPlatformChainInSync() {
time.Sleep(pChainPostBootstrapSyncPollInterval)
}
scheduler.Dispatch(time.Now())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By deferring the call to Dispatch the scheduler is going to block upon calls to scheduler.SetBuildBlockTime. However, scheduler.SetBuildBlockTime is called with the context lock held in SetPreference.

I think that can cause a deadlock if we are unlucky enough for the P-chain to have caught back up before SetPreference is called but without isLocalPlatformChainInSync having returned true.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, fixed.

@yacovm yacovm force-pushed the platformVMDispatch branch 7 times, most recently from 625b6dc to d302519 Compare April 21, 2025 22:13
@yacovm yacovm force-pushed the platformVMDispatch branch from d302519 to 95f020b Compare April 21, 2025 22:36
Copy link

This PR has become stale because it has been open for 30 days with no activity. Adding the lifecycle/frozen label will cause this PR to ignore lifecycle events.

Copy link

This PR is being closed due to no activity. Please re-open if this needs to be prioritized.

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

Successfully merging this pull request may close these issues.

2 participants