mirror of https://github.com/jetkvm/kvm.git
Root cause: ALSA assertion failure `snd_pcm_writei: Assertion 'pcm' failed` when pcm_playback_handle became NULL during concurrent write operations. The crash occurred because: 1. Thread A checks pcm_playback_handle != NULL (passes) 2. Thread B calls jetkvm_audio_playback_close(), sets handle = NULL 3. Thread A calls snd_pcm_writei(NULL, ...) → SIGABRT Solution: Added pthread mutexes to protect concurrent access: - playback_mutex protects pcm_playback_handle in decode_write and close - capture_mutex protects pcm_capture_handle in read_encode and close All critical sections now acquire mutex before accessing ALSA handles, preventing the NULL pointer from being passed to ALSA functions. |
||
|---|---|---|
| .. | ||
| c | ||
| cgo_source.go | ||
| cgo_source_stub.go | ||
| relay.go | ||
| source.go | ||