myxce/.wolf/bugs/bug-1926.md
Rongsong Shen aa401627a8
docs(buglog): bug-1926 sim REPL break jobid= filter ignores dashed jobids
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 16:08:54 +00:00

63 lines
3.3 KiB
Markdown

---
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=<id>` (or `break <EVENT> jobid=<id>`) 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 <replay> --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=<sel>`, `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