diff --git a/.wolf/buglog.json b/.wolf/buglog.json index 11c07423..d8bdf437 100644 --- a/.wolf/buglog.json +++ b/.wolf/buglog.json @@ -16631,6 +16631,33 @@ "4e484629" ], "record": ".wolf/bugs/bug-1895.md" + }, + { + "id": "bug-1896", + "status": "open", + "status_updated": "2026-09-30", + "status_note": "newly logged", + "component": "controller", + "severity": "wrong-result", + "timestamp": "2026-09-30T04:32:34Z", + "last_seen": "2026-09-30T04:32:34Z", + "occurrences": 1, + "error_message": "Job arrays ignore the indices given in -J: arr[1-3] and arr[1,5,9] both become elements [0]..[2]\n\n**Observed:** submitting `xcecli jobs submit -J 'arr[1-3]' -q normal sleep 300` created elements numbered from 0:\n```\nJob <1-0-1790742148-0[0]> is submitted to default queue .\n1-0-1790742148-0[0] admin RUN normal xce 1*worker* arr[0]\n1-0-1790742148-0[1] admin RUN normal xce 1*worker* arr[1]\n1-0-1790742148-0[2] admin RUN normal xce 1*worker* arr[2]\n```\n**Expected:** the elements carry the indices the user gave -- [1], [2], [3] here; [1], [5], [9] for `arr[1,5,9]`; steps such as `[1-10:2]` honored -- as in LSF, whose -J array syntax XCE follows (LSF indices start at 1).\n**Impact:** wrong result for every array job whose indices are not exactly 0..n-1: element numbers, %I substitution in output/input file names, and any index-based job control (`jobs kill [5]`) refer to indices the user never asked for; gaps and steps are silently dropped.\n**Found by:** user question while verifying bug-1894's array-job check, 2026-09-29.", + "file": "src/frontend/apiserver/controllers/jobs.go (CreateJob, createArrayName), src/schema/controller.capnp (job submit arraySize), src/include/persist.h (WAL_JOB_ARRAY_SUBMIT), src/controller/job.c (array expansion), src/frontend/apiserver/backend/convert_pure.go (rawJobArrayToModels)", + "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": [ + "job-array", + "apiserver", + "controller", + "wal", + "lsf-compat" + ], + "related_bugs": [ + "bug-1894" + ], + "fix_commits": [], + "record": ".wolf/bugs/bug-1896.md" } ] } diff --git a/.wolf/bugs/bug-1896.md b/.wolf/bugs/bug-1896.md new file mode 100644 index 00000000..b0181a63 --- /dev/null +++ b/.wolf/bugs/bug-1896.md @@ -0,0 +1,56 @@ +--- +id: "bug-1896" +status: "open" +status_updated: "2026-09-30" +status_note: "newly logged" +component: "controller" +severity: "wrong-result" +timestamp: "2026-09-30T04:32:34Z" +last_seen: "2026-09-30T04:32:34Z" +occurrences: 1 +files: ["src/frontend/apiserver/controllers/jobs.go (CreateJob, createArrayName)", "src/schema/controller.capnp (job submit arraySize)", "src/include/persist.h (WAL_JOB_ARRAY_SUBMIT)", "src/controller/job.c (array expansion)", "src/frontend/apiserver/backend/convert_pure.go (rawJobArrayToModels)"] +tags: ["job-array", "apiserver", "controller", "wal", "lsf-compat"] +related: ["bug-1894"] +--- + +# bug-1896: Job arrays ignore the indices given in -J: arr[1-3] and arr[1,5,9] both become elements [0]..[2] + +## Description +**Observed:** submitting `xcecli jobs submit -J 'arr[1-3]' -q normal sleep 300` created elements numbered from 0: +``` +Job <1-0-1790742148-0[0]> is submitted to default queue . +1-0-1790742148-0[0] admin RUN normal xce 1*worker* arr[0] +1-0-1790742148-0[1] admin RUN normal xce 1*worker* arr[1] +1-0-1790742148-0[2] admin RUN normal xce 1*worker* arr[2] +``` +**Expected:** the elements carry the indices the user gave -- [1], [2], [3] here; [1], [5], [9] for `arr[1,5,9]`; steps such as `[1-10:2]` honored -- as in LSF, whose -J array syntax XCE follows (LSF indices start at 1). +**Impact:** wrong result for every array job whose indices are not exactly 0..n-1: element numbers, %I substitution in output/input file names, and any index-based job control (`jobs kill [5]`) refer to indices the user never asked for; gaps and steps are silently dropped. +**Found by:** user question while verifying bug-1894's array-job check, 2026-09-29. + +## 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 @ 38afb98c-dirty +- Deployment: local 3-node HA controller cluster + xcecd_virtual worker + scheduler + apiserver on :8080 (deploy-ha.sh + start-all.sh) + +## Reproduction +1. Deploy a cluster with an apiserver (deploy-ha.sh + scripts/start-all.sh); `xcecli login -u admin -p admin --url http://localhost:8080` +2. `xcecli jobs submit -J 'arr[1-3]' -q normal sleep 300