View Issue Details

IDProjectCategoryView StatusLast Update
0010235ardourbugspublic2026-03-07 16:21
Reporterchrisoctane Assigned To 
PriorityurgentSeveritycrashReproducibilityalways
Status newResolutionopen 
PlatformOpenSUSEOSTumbleweedOS Versionrolling
Product Version9.2 
Summary0010235: SIGFPE crash on startup: double D-Bus device reservation for same ALSA card causes engine fail
DescriptionArdour 9.2.0 crashes with SIGFPE (Signal 8) on startup when using the ALSA backend with a full-duplex sound card while WirePlumber is running.

The ALSA backend stores the device config as separate input-device and output-device fields (with device="" empty). Because both resolve to the same ALSA card, Ardour spawns `ardour-request-device` twice for the same D-Bus reservation name (e.g. `org.freedesktop.ReserveDevice1.Audio3`). The first invocation succeeds, but the second fails with "Device or resource busy" because the first already holds the lock. Ardour treats this as an engine start failure.

With the audio engine unable to start, the sample rate is uninitialised (effectively 0). When the GUI processes a mouse motion event during a dialog response, `Editor::set_snapped_cursor_position()` performs a 128-bit integer division (`__divti3`) that divides by zero, producing SIGFPE.

The double-spawn was confirmed via strace:

```
PID 27811 execve("ardour-request-device", ["-P", "27783", "Audio3"]) -> succeeds
PID 27813 execve("ardour-request-device", ["-P", "27783", "Audio3"]) -> FAILS
```

Running `ardour-request-device Audio3` manually (single instance) works correctly — WirePlumber yields the reservation as expected.

Crash stack trace:

```
#0 __divti3 (libgcc_s.so.1)
0000001 Editor::set_snapped_cursor_position(Temporal::timepos_t const&)
#2 Editor::motion_handler(ArdourCanvas::Item*, _GdkEvent*, bool)
    ... GTK event dispatch ...
0000020 ARDOUR_UI::gui_idle_handler()
    ... signal/slot dispatch ...
0000025 ArdourDialog::on_response(int)
0000038 EngineControl::start_stop_button_clicked()
```

There appear to be two bugs:

1. Double device reservation request for the same ALSA card when input-device and output-device both point to the same card.
2. Missing guard against division by zero in `set_snapped_cursor_position()` when the audio engine is not running (sample rate is 0).
Steps To Reproduce1. Use openSUSE Tumbleweed (or any system with WirePlumber managing ALSA device reservations via D-Bus ReserveDevice1).
2. In Ardour's Audio/MIDI Setup, select the ALSA backend and choose a full-duplex card (e.g. RME RayDAT). Ardour stores this as separate input-device/output-device in `~/.config/ardour9/config`.
3. Close Ardour.
4. Restart Ardour.
5. Ardour crashes with SIGFPE during startup, or when clicking Start in the Audio/MIDI Setup dialog.

Workaround: stop WirePlumber before starting Ardour, then restart it after:

```bash
systemctl --user stop wireplumber
ardour9 &
sleep 3
systemctl --user start wireplumber
```
Additional Information- **Ardour version:** 9.2.0 (built with GCC 15.2.1 20260202)
- **OS:** openSUSE Tumbleweed, kernel 6.19.5-2-default
- **PipeWire:** 1.6.0
- **WirePlumber:** current Tumbleweed package
- **Sound card:** RME RayDAT (ALSA card 3, snd_hdspe driver, 36 channels)
- **CPU:** AMD Ryzen 9 5950X

The config that triggers the bug (normal state after selecting a full-duplex card):

```xml
<State backend="ALSA" device="" input-device="RME RayDAT_24068853"
       output-device="RME RayDAT_24068853" sample-rate="48000"
       buffer-size="128" n-periods="2" active="1" ...>
```

Multiple coredumps available, all with identical stack traces.
TagsNo tags attached.

Activities

chrisoctane

2026-03-07 16:21

reporter  

ardour-double-spawn.log (314 bytes)   
8371  execve("/usr/lib64/ardour9/ardour-request-device", ["/usr/lib64/ardour9/ardour-reques"..., "-P", "8341", "Audio0"], 0x56449a26eb90 /* 121 vars */) = 0
8378  execve("/usr/lib64/ardour9/ardour-request-device", ["/usr/lib64/ardour9/ardour-reques"..., "-P", "8341", "Audio0"], 0x55bbbc133b90 /* 121 vars */) = 0
ardour-double-spawn.log (314 bytes)   
ardour-strace.log (6,181 bytes)   
8339  execve("/usr/bin/timeout", ["timeout", "15", "ardour9"], 0x7fff76cb2f98 /* 114 vars */) = 0
8341  execve("/usr/bin/ardour9", ["ardour9"], 0x7fffb5ae82c8 /* 114 vars */) = 0
8342  +++ exited with 0 +++
8341  --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8342, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
8344  execve("/usr/bin/ldd", ["ldd", "/usr/lib64/ardour9/ardour-9.2.0"], 0x55cb42271e70 /* 116 vars */) = 0
8345  execve("/usr/bin/grep", ["grep", "glib-2.0"], 0x55cb42271e70 /* 116 vars */ <unfinished ...>
8346  execve("/usr/bin/sed", ["sed", "s/.*=> \\([^ ]*\\)/\\1/;s/ .*//"], 0x55cb42271e70 /* 116 vars */ <unfinished ...>
8345  <... execve resumed>)             = 0
8346  <... execve resumed>)             = 0
8347  execve("/lib64/ld-linux-x86-64.so.2", ["/lib64/ld-linux-x86-64.so.2", "--verify", "/usr/lib64/ardour9/ardour-9.2.0"], 0x55ba9a2e6d80 /* 116 vars */) = 0
8347  +++ exited with 0 +++
8344  --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8347, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
8350  execve("/lib64/ld-linux-x86-64.so.2", ["/lib64/ld-linux-x86-64.so.2", "/usr/lib64/ardour9/ardour-9.2.0"], 0x55ba9a2e87d0 /* 120 vars */) = 0
8350  +++ exited with 0 +++
8349  --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8350, si_uid=1000, si_status=0, si_utime=0, si_stime=1 /* 0.01 s */} ---
8349  +++ exited with 0 +++
8348  --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8349, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
8348  +++ exited with 0 +++
8344  --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8348, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
8344  +++ exited with 0 +++
8345  +++ exited with 0 +++
8346  +++ exited with 0 +++
8343  --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8344, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
8343  +++ exited with 0 +++
8341  --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8343, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
8352  execve("/usr/bin/nm", ["nm", "-D", "--radix=dec", "--defined-only", "-S", "/lib64/libglib-2.0.so.0"], 0x55cb42271e70 /* 116 vars */ <unfinished ...>
8353  execve("/usr/bin/grep", ["grep", "-w", "g_atomic_int_add"], 0x55cb42271e70 /* 116 vars */ <unfinished ...>
8352  <... execve resumed>)             = 0
8354  execve("/usr/bin/cut", ["cut", "-d", " ", "-f", "2"], 0x55cb42271e70 /* 116 vars */ <unfinished ...>
8353  <... execve resumed>)             = 0
8354  <... execve resumed>)             = 0
8352  +++ exited with 0 +++
8353  +++ exited with 0 +++
8354  +++ exited with 0 +++
8351  --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8352, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
8351  +++ exited with 0 +++
8341  --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8351, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
8355  execve("/usr/bin/basename", ["basename", "/usr/bin/ardour9"], 0x55cb42276fe0 /* 120 vars */) = 0
8355  +++ exited with 0 +++
8341  --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8355, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
8341  execve("/usr/lib64/ardour9/ardour-9.2.0", ["/usr/lib64/ardour9/ardour-9.2.0"], 0x55cb422778d0 /* 121 vars */) = 0
8361  +++ exited with 0 +++
8363  +++ exited with 0 +++
8368  +++ exited with 0 +++
8367  +++ exited with 0 +++
8371  execve("/usr/lib64/ardour9/ardour-exec-wrapper", ["/usr/lib64/ardour9/ardour-exec-w"..., "13", "14", "5", "10", "11", "12", "0", "0", "/usr/lib64/ardour9/ardour-reques"..., "-P", "8341", "Audio0"], 0x556d4ef76220 /* 121 vars */) = 0
8366  +++ exited with 0 +++
8378  execve("/usr/lib64/ardour9/ardour-exec-wrapper", ["/usr/lib64/ardour9/ardour-exec-w"..., "15", "16", "5", "12", "13", "14", "0", "0", "/usr/lib64/ardour9/ardour-reques"..., "-P", "8341", "Audio0"], 0x556d4ef79950 /* 121 vars */) = 0
8371  execve("/usr/lib64/ardour9/ardour-request-device", ["/usr/lib64/ardour9/ardour-reques"..., "-P", "8341", "Audio0"], 0x56449a26eb90 /* 121 vars */) = 0
8371  --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=8341, si_uid=1000} ---
8371  +++ exited with 0 +++
8341  --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8371, si_uid=1000, si_status=0, si_utime=0, si_stime=29 /* 0.29 s */} ---
8372  +++ exited with 0 +++
8378  execve("/usr/lib64/ardour9/ardour-request-device", ["/usr/lib64/ardour9/ardour-reques"..., "-P", "8341", "Audio0"], 0x55bbbc133b90 /* 121 vars */) = 0
8378  --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=8341, si_uid=1000} ---
8378  +++ exited with 0 +++
8341  --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8378, si_uid=1000, si_status=0, si_utime=0, si_stime=25 /* 0.25 s */} ---
8379  +++ exited with 0 +++
8423  execve("/usr/lib64/ardour9/ardour-exec-wrapper", ["/usr/lib64/ardour9/ardour-exec-w"..., "19", "20", "15", "16", "17", "18", "0", "0", "/usr/lib64/ardour9/ardour-reques"..., "-P", "8341", "Audio0"], 0x556d4f1ddc30 /* 121 vars */) = 0
8339  --- SIGALRM {si_signo=SIGALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_int=0, si_ptr=NULL} ---
8341  --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=8339, si_uid=1000} ---
8339  --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=8339, si_uid=1000} ---
8423  --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=8339, si_uid=1000} ---
8424  +++ killed by SIGTERM +++
8419  +++ killed by SIGTERM +++
8418  +++ killed by SIGTERM +++
8417  +++ killed by SIGTERM +++
8399  +++ killed by SIGTERM +++
8398  +++ killed by SIGTERM +++
8397  +++ killed by SIGTERM +++
8370  +++ killed by SIGTERM +++
8369  +++ killed by SIGTERM +++
8365  +++ killed by SIGTERM +++
8364  +++ killed by SIGTERM +++
8359  +++ killed by SIGTERM +++
8358  +++ killed by SIGTERM +++
8357  +++ killed by SIGTERM +++
8423  +++ killed by SIGTERM +++
8339  --- SIGCONT {si_signo=SIGCONT, si_code=SI_USER, si_pid=8339, si_uid=1000} ---
8356  +++ killed by SIGTERM +++
8341  +++ killed by SIGTERM +++
8339  --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=8341, si_uid=1000, si_status=SIGTERM, si_utime=99 /* 0.99 s */, si_stime=32 /* 0.32 s */} ---
8339  +++ exited with 124 +++
ardour-strace.log (6,181 bytes)   

Issue History

Date Modified Username Field Change
2026-03-07 16:21 chrisoctane New Issue
2026-03-07 16:21 chrisoctane File Added: ardour-double-spawn.log
2026-03-07 16:21 chrisoctane File Added: ardour-strace.log