Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
T
Tidal
  • Overview
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • PLN
  • Tidal
  • Repository

Switch branch/tag
  • Tidal
  • perf.sh
Find file
BlameHistoryPermalink
  • PLN (Algolia)'s avatar
    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) authored Sep 05, 2026
    c7ac1741
perf.sh 35.9 KB
EditWeb IDE
×

Replace perf.sh

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.