Skip to content

Detect unreleased Behavior Annex shared-data locks 馃 - #3246

Merged
lwrage merged 2 commits into
masterfrom
3189_detect_unreleased_shared_resources
Sep 18, 2026
Merged

lwrage merged 2 commits into
masterfrom
3189_detect_unreleased_shared_resources

Conversation

@lwrage

@lwrage lwrage commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Fixes #3189

The Behavior Annex validator previously accepted paths that entered a complete state with shared data still locked. Add resource-lifetime analysis across sequences, unordered action sets, branches, loops, transition joins and cycles, and wildcard operations. Preserve distinct access paths through inherited, nested, and inverted feature groups.

Established violations produce errors. Findings that depend on conservative assumptions about runtime conditions produce info messages, so potential false positives do not invalidate balanced models.

Issue3189Test and its external AADL model project cover balanced and unreleased paths, grouped resources, unreachable code, and diagnostic severity for correlated conditions. The regression commit precedes the production fix.

Validation

  • Before the fix, the six original negative test groups failed because their expected diagnostics were absent; the balanced control passed without unrelated diagnostics.
  • Focused regression: 9 tests passed. Full BA suite: 199 tests passed.
  • Clean root reactor: 1,660 tests across 15 bundles passed, with no failures, errors, or skips. Characterization baselines were compared normally in this run.
mvn -o -T5 -s releng/osate.releng/settings.xml -Plocal \
  -Dtycho.localArtifacts=ignore -Dpr.build=true -Dsign=false \
  -Dspotbugs=false -Dcodecoverage=false -Djavadoc=false \
  -DfailIfNoTests=false clean install

Targets master; no dependencies on unmerged PRs. Runtime-value correlations and instance-level aliases between accesses remain outside this declarative analysis; its conservative runtime findings are informational.

Exercise shared-data lock lifetimes through embedded AADL Behavior Annex models, including branches, unordered action sets, loops, wildcard operations, inherited and grouped accesses, and transition joins and cycles.

Require precise diagnostics on complete-state entry with a possible held lock while accepting balanced and unreachable paths. Established violations are errors; findings that can be false positives because of runtime assumptions must be informational, including correlated conditions within and across transitions.

The pre-fix regression demonstrates missing diagnostics without unrelated AADL validation failures.
Track required data-access locks through sequences, unordered action sets, branches, loops, and the behavior-state graph. Preserve inherited and nested feature-group access paths and expand wildcard operations over the visible required resources.

Report complete-state entry with a held resource. Use errors for paths established without runtime assumptions and info messages for potential false positives from conservative branch or loop analysis. Reuse static Boolean evaluation to exclude impossible paths, document the analysis boundary, and add characterization baselines for the regression models.

Validation: nine focused regression tests, 199 BA tests, and the clean root reactor with 1,660 tests passed.

Fixes #3189
@lwrage
lwrage merged commit 1278376 into master Sep 18, 2026
1 check passed
@lwrage
lwrage deleted the 3189_detect_unreleased_shared_resources branch September 18, 2026 16:30
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.

Detect Behavior Annex paths that reach complete states while resources remain locked 馃

2 participants