Skip to content

Fix deadlocks and concurrency issues in provider and sequencer components#1347

Closed
khyatimahendru wants to merge 3 commits into
faucetsdn:masterfrom
khyatimahendru:flakyfix
Closed

Fix deadlocks and concurrency issues in provider and sequencer components#1347
khyatimahendru wants to merge 3 commits into
faucetsdn:masterfrom
khyatimahendru:flakyfix

Conversation

@khyatimahendru
Copy link
Copy Markdown
Collaborator

@khyatimahendru khyatimahendru commented Jun 4, 2026

  • PubberBacnetProvider: Removed synchronized blocks on long-running provider methods and replaced ArrayDeque with ConcurrentLinkedDeque. This decouples the methods from the main executor threads, resolving a deadlock where discovery scan stops were blocked by synchronous internal logging.
  • SequenceBase: Replaced ArrayDeque with a thread-safe LinkedBlockingDeque for the message queue to safely support concurrent processing.
  • WritebackSequences: Add explicit timeout to writeback wait calls in sequencer. Fixes a race condition where the default 10-second timeout in waitUntil for expected states would perfectly collide with the device's simulated 10-second writeback delay. Added MAX_WAIT_TIME (20 seconds) to provide sufficient buffer for network transit and device processing.

…ents

- PubberBacnetProvider: Removed synchronized blocks on long-running provider methods and replaced ArrayDeque with ConcurrentLinkedDeque. This decouples the methods from the main executor threads, resolving a deadlock where discovery scan stops were blocked by synchronous internal logging.
- SequenceBase: Replaced ArrayDeque with a thread-safe LinkedBlockingDeque for the message queue to safely support concurrent processing.
Fixes a race condition where the default 10-second timeout in waitUntil
for expected states would perfectly collide with the device's simulated
10-second writeback delay. Added MAX_WAIT_TIME (20 seconds) to provide
sufficient buffer for network transit and device processing.
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.

1 participant