strace support for p4d, p4broker, and p4p SDP init scripts
Added diagnostic strace feature to p4d_base, p4broker_base, and p4p_base.
When a file $LOGS/.strace.<ServiceName> exists at start time, strace is
enabled using one of two modes selected automatically:
- Wrap mode (systemd): strace runs the service binary as its child
process, capturing every syscall from the very first instruction.
Ideal for diagnosing startup-phase issues (e.g. replica startup threads).
- Attach mode (non-systemd): strace attaches to the already-running
service after startup using strace -p <pid>. Best effort -- early
startup syscalls may be missed.
Strace output goes to $LOGS/strace.<ServiceName>.<YYYYMMDD_HHMMSS>.log;
in attach mode the strace PID is also recorded in
$LOGS/.strace.<ServiceName>.pid.
Shared functions live in a new library: /p4/common/lib/strace.lib
Also added startup/shutdown logging to p4broker_base and p4p_base, which
previously had no init logging.