Created attachment 4206 [details] Ignore syslog's errno on FreeBSD Hello, We're running our slurmdbd on a FreeBSD machine. There, syslog() changes errno to 13 (Permission denied) which causes slurmdbd commands to fail when debugging level is high (and slurmdbd is daemonized). e.g.: $ sacct JobID JobName Partition Account AllocCPUS State ExitCode ------------ ---------- ---------- ---------- ---------- ---------- -------- sacct: error: Permission denied $ The reason is that e.g. src/slurmdbd/proc_req.c:_get_jobs_cond checks errno's value without resetting it first. Attached is a patch that ignores syslog's errno on FreeBSD. Best Regards, Yair. P.S. I do consider this also a FreeBSD bug (which happens because syslog() tries to open /var/run/logpriv and fails on permission denied). However, one can claim that the proper way is to check errno after each library call anyway, and not after several calls (which this patch doesn't do...).
Thank you for your contribution. A slightly modified version of your patch been committed to Slurm version 17.11.1. Here is the commit: https://github.com/SchedMD/slurm/commit/148185fb535ec002a9ba0e52bf3d237061719b92