Repository navigation
Fix generic client removal deadlocks, add DeviceSet fallback and dedup - #42
Open
viacheslauK wants to merge 13 commits into
Open
viacheslauK wants to merge 13 commits into
viacheslauK wants to merge 13 commits into
Conversation
…it without Manufacturer
…idation on reconnect remove() holds the config lock of the block while it waits for the scheduler, and onConnectionRestored() took the same lock on the scheduler thread. It now relies on processingMutex only.
…for a sample The wait happened under the config locks of the device, its FB folder and the block. A core event handler or reader callback running inside that sample and reading the block or the device deadlocked with the removal.
…waiting on removal The scheduler takes a reference to the block for the duration of each call; removing a block no longer waits for a sample in progress.
…processed samples
viacheslauK
marked this pull request as ready for review
October 6, 2026 18:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Review follow-ups for the generic OPC UA client: removing a monitored item no longer waits for a sample in progress (fixes deadlocks with reconnect revalidation and application callbacks), device info falls back to the server's
DeviceSet, and samples with an already published domain timestamp are not republished.Changes
DeviceNodeID*is tried first; if it is not set, missing or gives no device info, the single device referenced byDeviceSetis used.SerialNumber—<Manufacturer>_<SerialNumber>, or<SerialNumber>alone; otherwise theApplicationUri.processSample()drops a sample whose domain timestamp was already published;onConnectionRestored()no longer takes the config lock and keepsconfigErr.registerItem()takes an owner that is kept alive during each call into the item;unregisterItem()no longer waits; lost wakeup on reconnect fixed.DefaultSamplingIntervallimited to1..UINT32_MAXvia property min/max.OpcUaServerTestHelper; new tests for the above; unconditional sleeps replaced with waits for processed samples.USAGE.mdcovers theDeviceSetfallback and removal rules for callbacks.Notes
removeFunctionBlock()may return while a sample is still running; the block is destroyed once the scheduler lets go of it.