Skip to content

Db2 abend injection (X73): AD2Z planned on a -911 statement (Part of #6271) - #6350

Merged
squid-protocol merged 6 commits into
mainfrom
churn/6271-20261024T0319Z
Oct 24, 2026
Merged

squid-protocol merged 6 commits into
mainfrom
churn/6271-20261024T0319Z

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Checklist: partial [c:b93f4d8b] -- LINK/CALL abends, non-file commands

What changed

Db2 abend injection (register X73). A scenario sql_faults entry that names its statement by line and fails it with SQLCODE -911 may add "abend": "AD2Z": the statement fails as planned, then the task abends AD2Z (cause system) and the nearest HANDLE ABEND exit runs.

  • equivalence_cics.py: sql_fault_plan accepts/refuses and emits a CICS-side plan line SQL PROG:LINE NTH -1 0 AD2Z; mark_sql_abends plants EXEC CICS GGSQLAB after the planned statement's call (COBOL side); faults.cfg is also written for an abend-only plan.
  • ggcics.c: GGCSQLAB stub reads the plan through injected().
  • det/sql.py: in a program with HANDLE ABEND, a statement is followed by task.planned("SQL", ...), abendExit() and ended() checks (this moved 25 det ports; all re-proved PROVED).
  • Cases: cbsa-dbcrfun update-deadlock-abends-ad2z (line 392), cbsa-xfrfun from-update-deadlock-abends-ad2z (line 992). Both PROVED.
  • docs/language_status/register/X73.md, tests/tools/test_equivalence_sql_abend_injection.py (13 tests).

Evidence level

Executed-equivalent on 2 scenarios (DBCRFUN, XFRFUN), COBOL under GnuCOBOL + stub vs det port, events and faults fired equal. Assumed: the failed rollback (the plan states it), the SQLCA left after the abend, and sqlerrmc 00C90088 (the AD2Z arm reads SQLERRMC(1:SQLERRML)). The oracle is GnuCOBOL plus our stub, not z/OS. Refused: other abend codes, other SQLCODEs, table/verb selection, a program with no HANDLE ABEND.

Gates

audit_check.py all clear; pr_gates.py --fast 7/7; --ratchets 9/9; unit test 13 passed. No parsing files touched (no golden bless).

Class / Sibling gaps

  • INQACCCU: has HANDLE ABEND and an AD2Z arm on cursor OPEN/FETCH; no scenario yet (cursor statement lines, e.g. FETCH ~467). Not here: file limit, needs its own generated variant.
  • cbsa-xfrfun-generated: scenario dropped; the generated Db2 rows never reach the first UPDATE, so nothing fired on either side.
  • INQACC: has an AD2Z arm but no HANDLE ABEND hit, so the exit cannot be taken (refused by design).
  • INQCUST: HANDLE ABEND but no EXEC SQL.
  • Other SQLCODEs (-913 timeout, etc.): IBM ties only the deadlock rollback to AD2Z, refused.
  • Remaining slices: abends of LINKed/CALLed programs, non-file CICS commands.

Cross-repo: none.

🤖 Generated with Claude Code

Coverage (det sweep, re-recorded in the ledger at ab07113)

  • cbsa-dbcrfun: 29 -> 30 scenarios, paragraphs 19 -> 21/22, branches 28 -> 30/35
  • cbsa-xfrfun: 27 -> 28 scenarios, paragraphs 27/28 (unchanged), branches 46 -> 47/81

Lessons for agents

  • A red det check whose ci_digest names cases NOT PROVEN is not always the cause. Here the skip-Db2 leg's mortgage cases were expected (baselined FUNCTION ANNUITY hole). The real failure was in the Db2 leg: coverage ledger: <case>: ... coverage moved lines, printed just above sweep: N unexpected. If a PR adds scenarios to a Db2 case, re-run proof_sweep.py --det-only --cases <case> (Db2 container up) and det_coverage_ledger.py update <work> before pushing.

squid-protocol and others added 4 commits October 23, 2026 23:31
…BEND takes it (Part of #6271)

A scenario sql_faults entry naming its statement by line and failing it with -911 may add "abend": "AD2Z": the statement fails as planned,
then the task abends AD2Z (IBM: the CICS-Db2 attach's syncpoint rollback after the deadlock fails). The COBOL side plants a GGSQLAB marker
after the statement's call; the det port checks task.planned("SQL", ...) in a HANDLE ABEND program. Proven on cbsa-dbcrfun.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…umption in X73 (Part of #6271)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 24, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 24, 2026 03:55
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol enabled auto-merge (squash) October 24, 2026 04:01
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #6350 @ 8f0b77b: 1 failed check(s)

== det (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40060305640/job/120779767024
repro: tests/tools/box/heavy-run.sh python tests/tools/proof_sweep.py --det-only --skip-db2 --cases mortgage-cmort,mortgage-csmrt,mortgage-mpmt --work /tmp/gitgalaxy-scratch/ci-digest/sweep
det cases not proven: mortgage-cmort,mortgage-csmrt,mortgage-mpmt
errors:
det mortgage-csmrt NOT PROVEN proven on 5 scenarios, covering 1/1 paragraphs and 1/2 branches
det mortgage-mpmt NOT PROVEN not proven; 11 calls cover 4/4 paragraphs and 12/12 branches
det mortgage-cmort NOT PROVEN proven on 16 scenarios, covering 6/6 paragraphs and 18/21 branches
##[error]Process completed with exit code 1.
log tail:
compression-level: 6
overwrite: false
include-hidden-files: false
archive: true
env:
pythonLocation: /opt/hostedtoolcache/Python/3.12.15/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib
##[endgroup]
With the provided path, there will be 176 files uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: det-sweep-ledger.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 150224
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is a056966ec50e2ea51354f3a34fb95908fb31214a6c4277176bc84505954e0d66
Finalizing artifact upload
Artifact det-sweep-ledger successfully finalized. Artifact ID 12547229657
Artifact det-sweep-ledger has been successfully uploaded! Final size is 150224 bytes. Artifact ID is 12547229657
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/40060305640/artifacts/12547229657
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/5a361a15-aadb-4610-a56c-17f62619e8a7' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 24, 2026
squid-protocol and others added 2 commits October 24, 2026 00:47
…AD2Z scenarios (Part of #6271)

The det CI ratchet failed on these two entries (case fingerprint stale, coverage moved up:
dbcrfun 19->21/22 paragraphs, 28->30/35 branches; xfrfun 46->47/81 branches). Re-measured from a
local Db2 sweep at this head; both PROVED with the numbers CI measured.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@squid-protocol squid-protocol removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 24, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

CI shepherd: the head of this PR (ab07113) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then).

@squid-protocol squid-protocol added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Oct 24, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 24, 2026 04:56
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant