SRU template for resolute. Paolo, could you copy it to the top of the
bug description? I can't edit the description.

[ Impact ]

On Ubuntu 26.04 (glibc 2.43), slurmstepd never collects job usage data.
sacct shows empty MaxRSS, AveRSS and TRESUsageInMax for every job, sstat
shows no memory and a nonsense AveCPU, and the slurmdbd database stores
no measured usage. Sites can't see how much memory a job used, which
breaks memory accounting and reporting.

The cause is sscanf(sbuf, "%d (%39c", ...) in
src/plugins/jobacct_gather/common/common_jag.c. glibc 2.43 changed %Nc
to fail when fewer than N characters are left, and process names are at
most 15 characters, so the call always fails and the PID is never
stored. Both jobacct_gather/cgroup and jobacct_gather/linux use this
code.

Upstream fixed it in Slurm 25.11.7 with commit 0d323a1ed8cc
("jobacct_gather - Remove unused 'cmd' string", upstream issue 50879).
The development release already ships Slurm 26.05.4, which contains the
fix.

[ Test Plan ]

1. Install slurm-wlm (slurmctld, slurmd, slurmdbd) on Ubuntu 26.04 with 
JobAcctGatherType=jobacct_gather/cgroup and accounting_storage/slurmdbd.
2. Submit a job that holds 300 MB for 90 seconds:
   sbatch --wrap 'python3 -c "import time; b=bytearray(300*2**20); 
time.sleep(90)"'
3. While it runs: sstat -j <id>.batch -o JobID,MaxRSS,AveRSS. Expected: about 
300M.
4. After it ends: sacct -j <id> -o JobID,MaxRSS,AveRSS,TRESUsageInMax. 
Expected: about 300M, not empty.
5. Repeat with JobAcctGatherType=jobacct_gather/linux. Expected: same result.
6. Check that TotalCPU, sreport and memory limits (ConstrainRAMSpace) still 
work.

With the current package, steps 3 to 5 show empty values.

[ Where problems could occur ]

The patch only removes an unused field from one sscanf() call that
parses /proc/<pid>/stat. A mistake would show up as wrong or missing
per-process data in jobacct_gather (MaxRSS, CPU, disk), the same symptom
as today. Job scheduling, limits and slurmctld/slurmdbd don't use this
code. The change is the upstream fix, already released in Slurm 25.11.7
and 26.05.

[ Other Info ]

Debdiff for 25.11.2-1ubuntu2.1 follows in the next comment.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2169842

Title:
  slurmd 25.11.2 on Resolute: job accounting gather never polls (empty
  MaxRSS/sstat); upstream 25.11.7 fixes JobAccountGather on glibc 2.43

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/slurm-wlm/+bug/2169842/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to