towerops-agent/.cargo/config.toml
Graham McIntire 55d001d9f8
Add fork()-based process isolation for SNMP operations
Each SNMP GET/WALK now runs in a forked child process. If libnetsnmp
triggers a SIGSEGV or other fatal signal, only the child dies - the
parent agent logs the crash and continues operating for all other devices.

Key changes:
- C helper: snmp_get_isolated() and snmp_walk_isolated() using
  fork+pipe pattern with 60s alarm watchdog and mutex-serialized forks
- Rust: IsolationMode enum (Fork/Direct) controlled by
  TOWEROPS_SNMP_ISOLATION env var, defaults to Fork
- New CrashRecovered error variant with signal info and logging
- Device poller logs crash recovery events at error level
- Startup logs active isolation mode

Set TOWEROPS_SNMP_ISOLATION=direct to disable isolation for debugging.
2026-02-10 16:12:41 -06:00

7 lines
385 B
TOML

# Limit test parallelism to avoid macOS fork() issues with Objective-C runtime.
# Our SNMP isolation uses fork() for crash protection, which conflicts with
# macOS's multi-threaded fork safety checks when many threads fork concurrently.
# On Linux (production target), this limit is not needed but is harmless.
[env]
OBJC_DISABLE_INITIALIZE_FORK_SAFETY = "YES"
RUST_TEST_THREADS = "2"