# Grouped Zone Dropouts at Track Transitions — Bug Report

## Summary

Grouped zone playback consistently drops out at track transitions when 5 RAAT endpoints are grouped together. Individual playback to each endpoint is stable for hours. The issue is reproducible and occurs multiple times per listening session.

## Roon Core

- **Software:** Roon 2.60 (build 1629) production
- **OS:** Unraid 6.12.54 (Linux x86_64), running in Docker (host networking, `--init`)
- **CPU:** Intel i5-13600K (14 cores / 20 threads), ~5% utilization during playback
- **RAM:** 64 GB total, Roon container allocated 16 GB, using ~7 GB during playback
- **Storage:** Music library on Unraid array (spinning disks, spindown disabled). Roon database and cache on NVMe SSD (`/mnt/cache`).
- **Docker image:** elgeeko/roon-server:v1.1.0
- **Network:** Docker host networking mode (`--net=host`), Gigabit Ethernet to UniFi US-16-PoE switch, UXG Lite gateway

## Network

- UniFi UXG Lite gateway
- UniFi US-16-PoE 150W switch
- 3x UniFi APs (2 wired, 1 mesh)
- All RAAT endpoints on the same VLAN/subnet (10.0.0.0/16)
- IGMP Snooping enabled, mDNS enabled, Multicast to Unicast enabled on WiFi
- Mix of wired and WiFi endpoints (WiFi endpoints on dedicated 2.4 GHz SSID)

## Grouped Zone Configuration

Zone name: **Living Room + Kitchen + Patio + Den + Study**

Five RAAT endpoints, each running RoonBridge on Ubuntu-based Intel NUCs/mini PCs:

| Endpoint | DAC | Sample Rate Reported in Logs |
|----------|-----|------------------------------|
| Living Room | HDA Intel PCH → DENON AVR | 44100 / 96000 |
| Kitchen | AudioQuest DragonFly Red v1.0 | 22050 / 24000 |
| Patio | NuForce µDAC 2 USB Audio | 22050 / 24000 |
| Den | OPPO HA-2 USB Audio 2.0 DAC | 22050 / 24000 |
| Study | irDAC II | 44100 / 96000 |

No DSP, upsampling, or signal processing is enabled on any endpoint.

## Description of Issue

When playing music to the grouped zone (all 5 endpoints), playback drops out at track transitions. All endpoints fail simultaneously — every endpoint reports "Dropout" and Roon kills the stream with "Too many dropouts (>3s dropped out in the last 30s)" within the same second. This happens multiple times per listening session and is easily reproducible.

**Critical observation:** Playing separate, individual streams to each of the same 5 endpoints simultaneously runs for hours without any dropout. The issue occurs exclusively with grouped zone playback during track transitions.

## What I Have Ruled Out

- **CPU:** i5-13600K at ~5% utilization during playback. No CPU contention. (Previously had Roon pinned to 2 cores — removed pinning, issue persists.)
- **Disk I/O:** `iostat` during and after dropouts shows minimal disk activity. Disks are not a bottleneck. Spindown has been disabled to eliminate spinup delays.
- **Network:** All endpoints drop at the exact same millisecond, which rules out per-endpoint network issues. No network errors in logs around dropout times.
- **Docker networking:** Switched from bridge to host networking mode. Issue persists.
- **DSP/upsampling:** No DSP or signal processing is enabled on any endpoint in the group.
- **Roon database/cache location:** Database and cache are on NVMe SSD, not spinning disks.
- **UniFi network configuration changes:** Dropouts also occur when no network configuration changes are being made.

## Log Evidence

All dropouts follow the same pattern. Here is a representative example from February 27, 2026:

### Dropout at 16:54:40 — all 5 endpoints fail simultaneously

```
02/27 16:54:40 Trace: [HDA Intel PCH DENON-AVR] [raatclient] GOT [145] {"samples":96000,"status":"Dropout"}
02/27 16:54:40 Warn: [Living Room + Kitchen + Patio + Den + Study] [zoneplayer/raat] Too many dropouts (>3s dropped out in the last 30s). Killing stream

02/27 16:54:40 Trace: [AudioQuest DragonFly Red v1.0] [raatclient] GOT [543] {"samples":24000,"status":"Dropout"}
02/27 16:54:40 Warn: [Living Room + Kitchen + Patio + Den + Study] [zoneplayer/raat] Too many dropouts (>3s dropped out in the last 30s). Killing stream

02/27 16:54:40 Trace: [irDAC II] [raatclient] GOT [414] {"samples":96000,"status":"Dropout"}
02/27 16:54:40 Warn: [Living Room + Kitchen + Patio + Den + Study] [zoneplayer/raat] Too many dropouts (>3s dropped out in the last 30s). Killing stream

02/27 16:54:40 Trace: [NuForce µDAC 2 USB Audio] [raatclient] GOT [611] {"samples":24000,"status":"Dropout"}
02/27 16:54:40 Warn: [Living Room + Kitchen + Patio + Den + Study] [zoneplayer/raat] Too many dropouts (>3s dropped out in the last 30s). Killing stream

02/27 16:54:40 Trace: [OPPO HA-2 USB AUDIO 2.0 DAC] [raatclient] GOT [556] {"status":"Dropout","samples":24000}
02/27 16:54:40 Warn: [Living Room + Kitchen + Patio + Den + Study] [zoneplayer/raat] Too many dropouts (>3s dropped out in the last 30s). Killing stream
```

### Stack trace (consistent across all occurrences)

```
Critical: threadpoolsynchronizationcontext: System.InvalidOperationException: Attempted to Read() without access
   at Sooloos.Concurrency.SharedObject`2.Read[U](Func`2 getval)
   at Sooloos.Broker.Transport.RaatZonePlayer.ev_too_many_dropouts(Endpoint endpoint)
   at Sooloos.Broker.Transport.RaatZonePlayer.Endpoint.OnDropout(Int32 frames)
   at Sooloos.ThreadPoolSynchronizationContext.<>c__DisplayClass14_0.<_Dispatch>b__0(Object <p0>)
```

### Additional dropout instances (same session, same pattern)

- 14:52:28 — 3 endpoints reported (NuForce µDAC 2, OPPO HA-2, HDA Intel PCH DENON-AVR)
- 15:43:01 — 5 endpoints reported (all)
- 16:53:24 — 5 endpoints reported (all)
- 16:54:40 — 5 endpoints reported (all)

Every instance occurs at a track transition. Every instance shows the same `SharedObject.Read()` threading exception.

## Analysis

The `System.InvalidOperationException: Attempted to Read() without access` in `Sooloos.Concurrency.SharedObject` suggests a threading race condition in the RAAT zone player. During grouped playback track transitions, one thread appears to be attempting to read shared state while another thread is modifying it (likely coordinating the synchronized handoff to the next track across all endpoints).

This is consistent with the fact that:
1. Individual endpoint playback never triggers this exception
2. The exception only occurs during track transitions (when Roon must coordinate the next track across all grouped endpoints)
3. All endpoints fail simultaneously, indicating the failure is server-side in the zone player logic, not at individual endpoints

## Steps to Reproduce

1. Create a grouped zone with 5 RAAT endpoints (RoonBridge on Linux)
2. Play an album or playlist
3. Wait for a track transition
4. Dropout occurs — sometimes on the first transition, sometimes after several tracks, but reliably within a listening session

## Expected Behavior

Grouped zone playback should transition between tracks without dropping all streams.

## Workarounds Attempted

- Switched Docker networking from bridge to host — no improvement
- Removed CPU core pinning (was pinned to 2 cores) — no improvement
- Disabled disk spindown — no improvement
- Increased Docker memory allocation and I/O priority — no improvement
- Confirmed server resources are not constrained (CPU, RAM, disk, network all have ample headroom)
