Skip to content

fix/deadlock in handling FSchain blocks#3700

Merged
roman-khimov merged 3 commits intomasterfrom
fix/async-epoch-timers-handling
Nov 27, 2025
Merged

fix/deadlock in handling FSchain blocks#3700
roman-khimov merged 3 commits intomasterfrom
fix/async-epoch-timers-handling

Conversation

@carpawell
Copy link
Member

@carpawell carpawell commented Nov 25, 2025

Handling events is often related to sending something to chain, while updating time in timers is receiving events from the chain itself. Send/receive conflict always leads to a deadlock, so not blocking timers (a routine that is known for sure as a chain subscriber) helps to prevent locking. In particular, it fixes locking payment routine in IR when the network is real with its latencies and the number of containers.

@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

❌ Patch coverage is 0% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 27.30%. Comparing base (eda6714) to head (c8137d7).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
pkg/util/worker_pool.go 0.00% 24 Missing ⚠️
pkg/innerring/innerring.go 0.00% 5 Missing ⚠️
cmd/neofs-node/container.go 0.00% 3 Missing ⚠️
pkg/innerring/processors/settlement/calls.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3700      +/-   ##
==========================================
- Coverage   27.32%   27.30%   -0.02%     
==========================================
  Files         658      658              
  Lines       41859    41881      +22     
==========================================
+ Hits        11436    11437       +1     
- Misses      29363    29381      +18     
- Partials     1060     1063       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@carpawell carpawell force-pushed the fix/async-epoch-timers-handling branch from c80e415 to 6cbfcae Compare November 25, 2025 17:15
@carpawell carpawell marked this pull request as ready for review November 25, 2025 17:15
@carpawell carpawell force-pushed the fix/async-epoch-timers-handling branch from 6cbfcae to 9813342 Compare November 25, 2025 17:40
@roman-khimov roman-khimov added this to the v0.50.2 milestone Nov 25, 2025
@roman-khimov
Copy link
Member

Seems like the first patch is sufficient for now. We'll check the blocks later.

@carpawell carpawell force-pushed the fix/async-epoch-timers-handling branch 2 times, most recently from e16deb9 to 41e15ef Compare November 26, 2025 08:32
@carpawell carpawell force-pushed the fix/async-epoch-timers-handling branch 3 times, most recently from 0b99236 to 6f49b54 Compare November 26, 2025 21:17
@carpawell carpawell changed the title pkg/timers: handle time events in a worker pool fix/deadlock in handling FSchain blocks Nov 26, 2025
Handling timer ticks is now non-blocking: if handling events is still in
progress, mark it as ready-to-execute again and continue reading block events.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
It confuses when it is seen that something is started but there is no finishing
logs.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
@carpawell carpawell force-pushed the fix/async-epoch-timers-handling branch from 6f49b54 to c8137d7 Compare November 27, 2025 09:08
@roman-khimov roman-khimov merged commit 2de6d94 into master Nov 27, 2025
20 of 22 checks passed
@roman-khimov roman-khimov deleted the fix/async-epoch-timers-handling branch November 27, 2025 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants