diff --git a/.wolf/buglog.json b/.wolf/buglog.json index bdc2e333..22d904f2 100644 --- a/.wolf/buglog.json +++ b/.wolf/buglog.json @@ -17509,6 +17509,30 @@ "fcca4c9c" ], "record": ".wolf/bugs/bug-1925.md" + }, + { + "id": "bug-1926", + "status": "open", + "status_updated": "2026-10-08", + "status_note": "newly logged", + "component": "scheduler", + "severity": "wrong-result", + "timestamp": "2026-10-08T16:08:34Z", + "last_seen": "2026-10-08T16:08:34Z", + "occurrences": 1, + "error_message": "xce_scheduler --sim REPL break jobid= filter ignores the dashed jobid form the REPL prints\n\n**Observed:** a `break DECISION jobid=` (or `break jobid=`) breakpoint set with the dashed jobid form the REPL itself prints never fires. With the 1.1 contention fixture:\n```\n[sim] breakpoint 1 set: DECISION jobid=0-0-0-104\n-- (continue runs to the end; no hit)\n[sim] breakpoint 1 set: DECISION jobid=104\n[sim] hit breakpoint 1 @ decision: PEND jobid=0-0-0-104\n```\nThe hit line prints `jobid=0-0-0-104`, yet only the raw decimal packed id (`jobid=104`) matches. The breakpoint is accepted without any warning.\n\n**Expected:** a jobid filter accepts the same jobid forms the REPL prints and `info job` accepts (`parse_jobid`/`parse_jobsel`, including `X[k]` array elements), as well as the raw decimal id.\n\n**Impact:** wrong result, usability. An operator copies a jobid from REPL output into `break ... jobid=`, and the breakpoint silently never stops the run. For real jobids (non-zero cluster/user/time fields) the raw decimal form is a large number nobody types, so jobid breakpoints are effectively unusable. No effect on scheduling.\n\n**Found by:** spec task scheduler-sim-decision-trace 6.1 (end-to-end tests had to use raw decimal ids for breakpoints), confirmed by the 6.1 review. It predates that feature: `repl_u64_str_eq` comes from commit 2fecea35 (2026-08-07).\n\nSuspected: `repl_u64_str_eq()` (src/scheduler/src/repl_break.c:210) formats the packed jobid with `%llu` and compares strings, so only the decimal form can match. It is used by the decision filter (`repl_decision_matches_filter`, ~line 346) and, per its comment, by every `jobid=` filter including event filters.", + "file": "src/scheduler/src/repl_break.c", + "root_cause": "TODO: required for fixed/partial", + "fix": "TODO: required for fixed/partial\n\nVerification:\n- Test: TODO: name + file; RED before the fix, GREEN after\n- Suites: TODO: suite results and build profile\n- Live: TODO: soak/deploy run, or n/a and why", + "tags": [ + "sim", + "repl", + "breakpoint", + "jobid" + ], + "related_bugs": [], + "fix_commits": [], + "record": ".wolf/bugs/bug-1926.md" } ] } diff --git a/.wolf/bugs/bug-1926.md b/.wolf/bugs/bug-1926.md new file mode 100644 index 00000000..2569d7bd --- /dev/null +++ b/.wolf/bugs/bug-1926.md @@ -0,0 +1,63 @@ +--- +id: "bug-1926" +status: "open" +status_updated: "2026-10-08" +status_note: "newly logged" +component: "scheduler" +severity: "wrong-result" +timestamp: "2026-10-08T16:08:34Z" +last_seen: "2026-10-08T16:08:34Z" +occurrences: 1 +files: ["src/scheduler/src/repl_break.c"] +tags: ["sim", "repl", "breakpoint", "jobid"] +related: [] +--- + +# bug-1926: xce_scheduler --sim REPL break jobid= filter ignores the dashed jobid form the REPL prints + +## Description +**Observed:** a `break DECISION jobid=` (or `break jobid=`) breakpoint set with the dashed jobid form the REPL itself prints never fires. With the 1.1 contention fixture: +``` +[sim] breakpoint 1 set: DECISION jobid=0-0-0-104 +-- (continue runs to the end; no hit) +[sim] breakpoint 1 set: DECISION jobid=104 +[sim] hit breakpoint 1 @ decision: PEND jobid=0-0-0-104 +``` +The hit line prints `jobid=0-0-0-104`, yet only the raw decimal packed id (`jobid=104`) matches. The breakpoint is accepted without any warning. + +**Expected:** a jobid filter accepts the same jobid forms the REPL prints and `info job` accepts (`parse_jobid`/`parse_jobsel`, including `X[k]` array elements), as well as the raw decimal id. + +**Impact:** wrong result, usability. An operator copies a jobid from REPL output into `break ... jobid=`, and the breakpoint silently never stops the run. For real jobids (non-zero cluster/user/time fields) the raw decimal form is a large number nobody types, so jobid breakpoints are effectively unusable. No effect on scheduling. + +**Found by:** spec task scheduler-sim-decision-trace 6.1 (end-to-end tests had to use raw decimal ids for breakpoints), confirmed by the 6.1 review. It predates that feature: `repl_u64_str_eq` comes from commit 2fecea35 (2026-08-07). + +Suspected: `repl_u64_str_eq()` (src/scheduler/src/repl_break.c:210) formats the packed jobid with `%llu` and compares strings, so only the decimal form can match. It is used by the decision filter (`repl_decision_matches_filter`, ~line 346) and, per its comment, by every `jobid=` filter including event filters. + +## Environment +- OS: no /etc/os-release; Docker container; NixOS kernel; kernel Linux 6.18.33 x86_64 +- libc: glibc 2.42-47 (interpreter /nix/store/wb6rhpznjfczwlwx23zmdrrw74bayxw4-glibc-2.42-47/lib/ld-linux-x86-64.so.2) +- Toolchain: gcc (GCC) 15.2.0, meson 1.9.1 +- Build: asan (xce.build) +- Code: scheduler-framework @ 4d1a245f-dirty +- Deployment: none (offline `xce_scheduler --sim --interactive`) + +## Reproduction +1. Build the scheduler: `bash src/tools/xce-build.sh scheduler` (ASAN, `src/xce.build`). +2. `sh /home/claude/tmp/bug-1926/repro.sh /home/rshen/projects/xce/scheduler-framework`. It runs the committed fixture `src/scheduler/testsuite/fixtures/repl_trace_baseline/contention.replay` with the script `break DECISION jobid=`, `continue`, `quit`, once with `sel=0-0-0-104` and once with `sel=104`. +3. The dashed form prints only the "breakpoint 1 set" line; the decimal form also prints "hit breakpoint 1 @ decision: PEND jobid=0-0-0-104". +- Frequency: deterministic (1/1 each, 2026-10-08) +- Evidence: `/home/claude/tmp/bug-1926/` (`repro.sh`, `repro.out`) + +## Root cause +TODO: required for fixed/partial + +## Fix +TODO: required for fixed/partial + +## Verification +- Test: TODO: name + file; RED before the fix, GREEN after +- Suites: TODO: suite results and build profile +- Live: TODO: soak/deploy run, or n/a and why + +## References +- Related: none