Open skyslasher opened 2 years ago
This issue appears to be difficult to repeat reliably (at least on my system (Ubuntu 22.04, snapserver v0.27 snapclient v0.27) Initially I tried the following which worked. Add a stream: {"id":8,"jsonrpc":"2.0","method":"Stream.AddStream","params":{"streamUri":"pipe:///tmp/snapfifo?name=stream 2"}} Working - steam added correctly {"id":8,"jsonrpc":"2.0","result":{"id":"stream 2"}} Response OK
-and remove a stream: {"id":8,"jsonrpc":"2.0","method":"Stream.RemoveStream","params":{"id":"stream 2"}} also works {"id":8,"jsonrpc":"2.0","result":{"id":"stream 2"}} Response OK
However, subsequent attempts to add similar streams, e.g.: {"id":10,"jsonrpc":"2.0","method":"Stream.AddStream","params":{"streamUri":"pipe:///tmp/snapfifo?name=pulse&mode=read&sampleformat=48000:16:2&PULSE_LATENCY_MSEC=60"}}
fail in the way described by skyslasher. The snapserver hangs and must be killed with pkill -9.
I have have tried different length URIs in case there is evidence of a buffer size limit. The results are variable. I have also tried deleting and recreating a fresh fifo file as the stream input. This has no effect. Similarly, I have added the parameter "mode=read" to the AddStream call. Again without effect. I'll try the "nightly build" version of snapserver to see if the problem still exists.
Describe the bug Snapserver hangs after using the JSON RPC Control API to add a stream that spawns an external process (e.g. shairport-sync). Creating an alsa stream works in the same environment.
Steps to Reproduce
snapserver --logging.filter debug
, snapserver cannot be terminated with CTRL-C on the console.Environment details
Logfile Generated with
snapserver --logging.filter debug
:Log stops here, process hangs.