Skip to content

Potential fix for testChannelAccess tests - #224

Merged
anjohnson merged 1 commit into
epics-base:masterfrom
anjohnson:fix-testChannelAccess
Jul 22, 2026
Merged

Potential fix for testChannelAccess tests#224
anjohnson merged 1 commit into
epics-base:masterfrom
anjohnson:fix-testChannelAccess

Conversation

@anjohnson

Copy link
Copy Markdown
Member

Bug analysis and fix developed by Claude Opus 4.6:

Root cause: A race condition in SyncChannelArrayRequesterImpl in
syncTestRequesters.h:1382-1433. The waitUntilGetArrayDone (and
Put/SetLength variants) reset their status flag to false after the
async request was already sent. If the callback fires before the
reset (common on a single-CPU system where the test thread gets
preempted), the callback's true status is overwritten, and the test
reports a spurious failure despite the operation succeeding.

Fix: Moved the status reset from the waitUntilDone methods into the
sync
methods, before the async call is sent, to match the pattern
used by the other requester classes in the file
(SyncChannelGetRequesterImpl, SyncChannelPutRequesterImpl, etc.).

@codacy-production

codacy-production Bot commented Apr 6, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

Bug analysis and fix developed by Claude Opus 4.6:

  Root cause: A race condition in SyncChannelArrayRequesterImpl in
  syncTestRequesters.h:1382-1433. The waitUntilGetArrayDone (and
  Put/SetLength variants) reset their status flag to false after the
  async request was already sent. If the callback fires before the
  reset (common on a single-CPU system where the test thread gets
  preempted), the callback's true status is overwritten, and the test
  reports a spurious failure despite the operation succeeding.

  Fix: Moved the status reset from the waitUntil*Done methods into the
  sync* methods, before the async call is sent, to match the pattern
  used by the other requester classes in the file
  (SyncChannelGetRequesterImpl, SyncChannelPutRequesterImpl, etc.).
@anjohnson
anjohnson force-pushed the fix-testChannelAccess branch from c679265 to 8302464 Compare July 6, 2026 12:33
@AppVeyorBot

Copy link
Copy Markdown

@anjohnson
anjohnson merged commit b87a5ba into epics-base:master Jul 22, 2026
26 checks passed
@anjohnson
anjohnson deleted the fix-testChannelAccess branch July 24, 2026 20:11
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.

2 participants