-
fix(perf): stop DWIM-launching Pulsar into /usr/local/sbin · c7ac1741
183 Pulsar SIGABRTs between 2026-08-19 and 2026-09-05, 80 of them inside one 70-minute window, all from this one block. perf.sh launched Pulsar in "the script's directory", $(dirname "${BASH_SOURCE[0]}") -- but perf.sh is deployed root-owned as /usr/local/sbin/perf-audio (perf-audio.sudoers, for scoped NOPASSWD), so BASH_SOURCE resolved to /usr/local/sbin and Pulsar got /usr/local/sbin as its project directory. Coredump argv: /opt/Pulsar/pulsar --executed-from=/home/pln --no-sandbox /usr/local/sbin The Bridge's perf watcher (bridge.py:41 -> perf.py:run_watcher -> reconcile -> set_mode) shells out here every ~30s, and every mode flag routes through set_priorities, so the retry was unbounded: crash -> pgrep finds nothing -> next tick tries again. No backoff, no lock, no exit-status check. And the "✓ Pulsar launched" line proved nothing: the verification was a 0.5s pgrep presence poll that caught the doomed Electron process alive during startup and returned before it aborted. Fixed by removing the launch, not by resolving the directory better. Setting priorities is this script's job; starting applications is not. Ardour, two branches up, has always been prioritize-if-present with no launch branch -- Pulsar is now symmetric with it. Both the tray and the Bridge have real Pulsar launchers that pass the right project directory and surface failures. #116 also wants the hot path unable to start things by accident, and a root script spawning a GUI editor through `sudo -u $USER env ...` every 30s is the opposite of that. NOT LIVE YET: /usr/local/sbin/perf-audio is a root-owned copy and still carries the bug. It needs sudo install -m755 -o root -g root perf.sh /usr/local/sbin/perf-audio which is outside the sudoers whitelist, so PLN has to run it. Dormant until then -- the block only fires when no Pulsar is running.PLN (Algolia) authoredc7ac1741
×