Bug #3377
open[svc] newsyslog fails to rotate syslog logs
0%
Description
So:
newsyslog: can't notify daemon, pid 3476 = /var/run/syslog.pid: Operation not permitted
The pid is corect, `ping -1 -F /var/run/syslog.pid`, the only difference is `syslogd` is running under `svc`.
Updated by arcade@b1t.name 3 months ago
Sorry, s/ping/pkill/: `pkill -1 -F /var/run/syslog.pid` is actually working.
`svc` is a /sbin/svc, we have it since 4.0, it can be used to automatically to set up/control/jail service. I'm using custom init, that can use svc/daemon/plain service startup.
Updated by arcade@b1t.name 2 months ago
Actually, sometimes I can even hit it from shell:
# pkill -1 -F /var/run/syslog.pid
pkill: signalling pid 1117: Operation not permitted
# kill -1 1117
1117: Operation not permitted
Updated by arcade@b1t.name about 1 month ago
Actually this is totally an `svc` issue. Moving cron service under daemon fixes it. There are no extra isolation features enabled on the service, and yet it can't send any signals to anything outside service process group.
Updated by arcade@b1t.name about 1 month ago
- Priority changed from Normal to Low
Updated by liweitianux about 1 month ago
- Subject changed from newsyslog fails to rotate syslog logs to [svc] newsyslog fails to rotate syslog logs
Hi, I discussed this issue with dillon today.
The root cause is that two reapers (svc(8) uses them) are isolated, so a process (like the newsyslog) in reaper A is prevented from sending signals to another process (like the syslogd) in reaper B.
A solution is to extend svc(8)'s kill
directive to send the signal on behalf of the caller, which should be adjusted to explicitly use the svc(8) framework.