A deadlock-monitor hook skipped at boot is one Warning line that no boot summary counts (#2671)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
Research direction
Read src/runtime/patch/deadlock_monitor.cpp and the call in src/runtime/lifecycle/initialize.cpp, then follow the boot summary counting logic in src/runtime/patch/binary_bug_fixes.cpp. Start with the status decision and native test in src/runtime/patch/deadlock_monitor_loop.h; the issue also calls for testing that a skipped monitor is counted. Done when a skip is named in the boot summary's failed count, with the requested tests covering that behavior.
Written by the indexing model from the issue text.
Description
Path: PC runtime, boot hook installation (shared by every mode).
A required startup hook that is skipped at boot is one WARNING line. No boot summary and no self-check counts it. The defect was found while fixing #2671, where the deadlock-monitor hook was skipped in a tester's run and nothing reported it as a failure.
Evidence at 595871d99
src/runtime/patch/deadlock_monitor.cpp:74:VOID PatchDeadlockMonitor()returns nothing. Its three skip paths each log one Warning and return:reason=timer_prologue_mismatch(line 80),reason=prologue_mismatch(line 90),reason=vtable_slot_mismatch(line 102, after the comparison at line 100).src/runtime/lifecycle/initialize.cpp:646callsPatchDeadlockMonitor();and reads no result.- The boot summary
[NEVR.PATCH] hooks installed: %d succeeded, %d failed (failed: %s)(src/runtime/patch/binary_bug_fixes.cpp:825) counts only the hooks in its own table: the loop from line 638 adds toinstalledandfailedfor each entry it visits. The deadlock monitor is not an entry of that table. git grep -n -i 'deadlock monitor\|CDeadlockMonitor' origin/main -- src/runtime/patch/binary_bug_fixes.cpp src/runtime/lifecycle src/runtime/compat/self_check.cpp src/runtime/logfinds no line in those paths that counts or reports the monitor's install result. Its only hits are symbol-name data insrc/runtime/log/symcache_data.cpp.docs/standards/logging.md, Rule 6, requires hook failures at Warning and an aggregate at boot completion. The monitor's skip is a Warning without the aggregate.- Field evidence (a tester's native Windows run, run id 1404-1dd7e03a149d58b, NEVR-BUILD 6.19.1-dev.69+5bebd6af8): the run log's line 128 (00:09:56.685Z) is the skip line with
reason=vtable_slot_mismatch. The run then crashed on the stock monitor's stall path (#2671). The skip cost the run the hook's behaviour and nothing in the run's summaries named it.
Not shown
- Whether the run's own boot summary line appeared and what it counted. The seat read the matches of two greps over the run log and its last 30 lines, not the whole log.
- Whether any consumer (a check, a dashboard, the tester) reads the Warning line. Not established.
- Whether another void-returning install function in
src/runtime/patch/has the same shape. Not surveyed.
Falsifier
A boot log from a build where a required hook's skip reaches the failed count of the boot summary, with the hook's name in failed: %s, shows the defect is already handled for that hook. A code path that returns the install result of PatchDeadlockMonitor to initialize.cpp and counts it also falsifies the claim.
Work
- Make the monitor's install return a status (installed, skipped with reason, failed), and count a skipped install in the boot summary as failed, named in
failed: %s, at Warning, as the table inbinary_bug_fixes.cppalready does for its own skips. - Test first: a native test of the status decision (the pure function in
src/runtime/patch/deadlock_monitor_loop.h), and a test that a skipped monitor is counted. Prove it with a mutant that drops the count and a run of the test that fails on it. - Consider a self-check for the required hooks, using the pattern in
src/runtime/lifecycle/quit_check.h(nevr_self_check::Report), so a skipped hook is a FAIL in the run log's self-check output as well as in the summary.
Refs #2671 (the crash that exposed it). Related: #1533 (the host exits silently when the runtime does not load), #1252 (closed: host stops are silent in -server).
- Dominant language
- C++
- Stars
- 3
- Forks
- 5
- Avg merge
- 4h 37m
- Merged PRs (30d)
- 524
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EchoTools/nevr-runtime
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
EchoTools/nevr-runtime#2912 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
EchoTools/nevr-runtime#2910 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
EchoTools/nevr-runtime#2909 ·
Maintainers usually reply within 1 day
-
build: the generated defaults header is written 0600, so a seat outside nevr-build cannot read itOpenbacklog
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
EchoTools/nevr-runtime#2901 · 1 comment ·
Maintainers usually reply within 1 day
-
backlog
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
EchoTools/nevr-runtime#2897 ·
Maintainers usually reply within 1 day
All issues in EchoTools/nevr-runtime
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
category:port-update
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
bug-unconfirmed
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
libc++
Difficulty 1/5 Under an hour Newbie friendliness 88/100
llvm/llvm-project#246508 ·
Maintainers usually reply within 1 day
-
good first issue help wanted phase:0 priority:P3 type:task
Difficulty 2/5 1-3 hours Newbie friendliness 67/100