Skip to content

test(coverage): run dead + DB_REGISTER groups (lock_deadlock 0.7->66%, env_register 0->55%) - #76

Merged
gburd merged 1 commit into
masterfrom
coverage/register-deadlock-rebased
Jul 29, 2026
Merged

test(coverage): run dead + DB_REGISTER groups (lock_deadlock 0.7->66%, env_register 0->55%)#76
gburd merged 1 commit into
masterfrom
coverage/register-deadlock-rebased

Conversation

@gburd

@gburd gburd commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Wires the existing dead (deadlock detector) group and env007/env012 (DB_REGISTER) into the coverage run — they existed but were never measured. New COV_DEAD_REG block (driver-per-test, 300s timeout, orphan-worker cleanup, copying the proven COV_REP pattern).

file before after (line) after (branch)
lock/lock_deadlock.c 0.7% 65.9% 43.2%
env/env_register.c 0% 54.7% 43.1%
env/env_failchk.c (bonus) 17.4% 65.2% 38.6%
  • Deadlock detector: dead001–006 spawn ddscript workers into ring/clump lock cycles; __lock_detect picks the victim (in-process for dead002/003).
  • DB_REGISTER: env007+env012 open with -register, kill a process, reopen with -recover/-failchk; the survivor hits __envreg_register/__envreg_isalive + recovery.

All 8 tests PASS under timeout. Proc counts trimmed to {2 4} (the 10-proc iterations exceed 300s but add zero new coverage — slow, not deadlocked). No bugs found. No coverage artifacts committed.

…_coverage.sh

Add a COV_DEAD_REG block (on by default) that runs the two multi-process
suites reaching the deadlock detector and the process-registry crash/
recovery path, which the single-tclsh COV_TESTS loop cannot:

- dead001..dead006 spawn ddscript.tcl workers via wrap.tcl to build a
  ring/clump lock cycle; __lock_detect (src/lock/lock_deadlock.c) then
  picks a victim. dead002/003 run detection in-process in each worker.
- env007 + env012 use envscript.tcl to open the env with DB_REGISTER,
  "crash" a process, and let a survivor detect the dead slot
  (__envreg_register/__envreg_isalive, src/env/env_register.c) and run
  recovery/failchk.

Like the COV_REP block these run driver-per-test with a per-test timeout
and orphan-worker cleanup (they reset TESTDIR and a hung worker must not
wedge the run). Proc counts are trimmed to {2 4} ({4} for dead005) so
each finishes well inside the 300s timeout; the full {2 4 10} matrix adds
only minutes, no new lines.

Measured on r-class box (gcc --coverage, lcov from .libs):
  lock/lock_deadlock.c  0.7% -> 65.9% line (43.2% branch)
  env/env_register.c    0.0% -> 54.7% line (43.1% branch)
  env/env_failchk.c    17.4% -> 65.2% line (bonus, DB_REGISTER failchk path)

All eight tests pass reliably under timeout. README documents the block
and updates the least-covered table.
@gburd
gburd merged commit 6c0d656 into master Jul 29, 2026
45 of 47 checks passed
@gburd
gburd deleted the coverage/register-deadlock-rebased branch July 29, 2026 11:11
@github-actions

Copy link
Copy Markdown

Coccinelle convention checks

No new violations. ✅

Resolved since baseline (2) -- update dist/cocci/baseline.txt to lock these in.
rule_mutex_unbalanced|MUTEX_UNBALANCED|src/crypto/mersenne/mt19937db.c|return (ret);
rule_mutex_unbalanced|MUTEX_UNBALANCED|src/mp/mp_register.c|return (ret);

@github-actions

Copy link
Copy Markdown

ABI diff vs v5.3.31 (libabigail — authoritative)

Removed exported symbols (nm -D, _NNNN version suffix normalized)

None.


Advisory: libabigail/nm is the authoritative binary-ABI check; Coccinelle is complementary source-level early warning. See dist/cocci/README.md.

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