Repository navigation
Description
Describe the bug
During a FluidMeeting recording, FluidVoice's memory grows without bound — ~24 GB physical footprint and ~90 GB of swap after ~15 minutes, until the Mac is starved of memory.
Two defects combine:
Writer error storm when a chunk can't begin. The microphone track (captured via ScreenCaptureKit, default input is a USB webcam mic — Insta360 Link 2) never produces a chunk: every buffer fails MeetingPCMFormatContract with MeetingPCMFormatContractError.unsupported (presumably "native Float32 LPCM required"). In MeetingAudioChunkWriter.swift (~L515–540) the catch block only retires a chunk if activeChunk != nil. When beginChunk itself throws, there is no active chunk, so retiredChunk == false and an .interrupted(kind: .writerFailure, …) event is emitted for every buffer — exactly the storm the comment above that block says it prevents.
Unbounded persistence queue. Each event reaches MeetingSessionCoordinator.handle… → enqueuePersistence(session) (~L1857), which chains a new Task capturing a full copy of MeetingSession and awaits the previous one before store.save(session). Each save re-encodes the whole (growing) session JSON, so saves get slower as events accumulate; at ~94 events/s the chain never drains and every pending task pins its own copy of events. Memory growth is roughly quadratic in recording time.
Evidence (from the live process, heap / footprint)
Physical footprint: 24.2G (Malloc Small 19 GB, Malloc Large 5.2 GB)
COUNT BYTES AVG CLASS_NAME
24826 45244612608 1822468.9 Swift._ContiguousArrayStorage<FluidVoice.MeetingSessionEvent>
25965 26588416 1024.0 Task stack
25895 8286976 320.0 Task stack
Session manifest (~/Library/Application Support/FluidVoice/Meetings//session.json):
state: recordingDegraded
7,043 events in 75 seconds, all identical: writerFailure — "The operation couldn’t be completed. (FluidVoice.MeetingPCMFormatContractError error 0.)", trackID = microphone track
Tracks: applicationAudio / screenCaptureKit / healthy / 1 chunk, microphone / screenCaptureKit / waiting / 0 chunks
Newest event persisted was ~5 minutes older than the file's mtime, i.e. the save queue was minutes behind and still growing.
Reproduction steps
- macOS 27, FluidVoice 1.6.10-beta.7, default input = a USB webcam microphone (Insta360 Link 2, mono), Microsoft Teams call running.
- Start a FluidMeeting recording.
- Watch FluidVoice's memory in Activity Monitor / footprint — it grows by tens of MB per second.
Expected behavior
An unsupported mic format degrades the mic track once (single event, throttled), or the buffer is converted to Float32 LPCM. Memory stays flat during recording.
Actual behavior
Actual behavior
~94 writerFailure events/s; each spawns a persistence task holding a full session copy; footprint reaches 24 GB+ and swap ~90 GB within 15 minutes.
Suggested fixes
In the chunk writer catch path, when no chunk was active, emit the degraded/writerFailure event only on state transition (or throttle it), and/or convert non-Float32 input to the required contract instead of rejecting it.
Coalesce enqueuePersistence: keep a single in-flight save plus a "latest pending session" slot (last-write-wins) instead of chaining one task per event.
Consider deduplicating/capping repeated identical session.events.
App Version
1.6.10-beta.7 (26)
macOS Version
macOS 27.0
Architecture
Apple Silicon
Logs or crash report
No crash (memory exhaustion, not a crash). Captured from the live process:
$ footprint <pid>
Physical footprint: 24.2G
19 GB Malloc Small (7612 regions)
5230 MB Malloc Large (3212 regions)
$ heap --sortBySize <pid>
COUNT BYTES AVG CLASS_NAME
24826 45244612608 1822468.9 Swift._ContiguousArrayStorage<FluidVoice.MeetingSessionEvent>
25965 26588416 1024.0 Task stack
25895 8286976 320.0 Task stack
57562 21237712 369.0 Closure context
session.json (Meetings/<id>/):
state: recordingDegraded
events: 7043 in 75 s (08:56:35Z → 08:57:50Z), all identical:
kind: writerFailure, track: microphone
detail: "The operation couldn’t be completed. (FluidVoice.MeetingPCMFormatContractError error 0.)"
audioTracks:
applicationAudio / screenCaptureKit / healthy / 1 chunk
microphone / screenCaptureKit / waiting / 0 chunks
session.json mtime ~5 min later than newest persisted event (save queue backlog)
System swap at time of capture: 9.2 GB used / 9.2 GB total (Activity Monitor showed ~90 GB peak)
Screenshots or screen recording
No response
Activity
github-actions commentedon Sep 30, 2026
This issue has been marked stale because it has had no activity for 5 days. It will be closed in 2 days if there is no further activity. Add the
keep-openorpinnedlabel to prevent automatic closure.