Ticket #363 (closed defect: fixed)
pulseaudio exits when a remote peer closes a connection to module-simple-protocol-tcp.
| Reported by: | trustin | Owned by: | lennart |
|---|---|---|---|
| Milestone: | 0.9.13 | Component: | daemon |
| Keywords: | Cc: |
Description
I'm streaming audio from Windows to Linux PulseAudio server using Netcat. The pulseaudio process exits without log messages whenever I kill the nc.exe process. The following is the full command line on the server side:
pulseaudio -vvvvv --daemonize --high-priority --realtime --disallow-module-loading
--resample-method=src-sinc-best-quality --no-cpu-limit -n
-L "module-native-protocol-unix auth-anonymous=1"
-L "module-native-protocol-tcp auth-ip-acl=192.168.0.0/16;127.0.0.0/8"
-L "module-simple-protocol-tcp port=4712 rate=44100 format=s16le channels=2"
-L "module-rescue-streams"
-L "module-alsa-sink device=hw:1"
And here's the server startup log:
Sep 19 10:18:39 hermes pulseaudio[21270]: main.c: Page size is 4096 bytes Sep 19 10:18:39 hermes pulseaudio[21270]: main.c: Fresh high-resolution timers available! Bon appetit! Sep 19 10:18:39 hermes pulseaudio[21270]: protocol-native.c: loading cookie from disk. Sep 19 10:18:39 hermes pulseaudio[21270]: module.c: Loaded "module-native-protocol-unix" (index: #0; argument: "auth-anonymous=1"). Sep 19 10:18:39 hermes pulseaudio[21270]: protocol-native.c: using already loaded auth cookie. Sep 19 10:18:39 hermes pulseaudio[21270]: protocol-native.c: using already loaded auth cookie. Sep 19 10:18:39 hermes pulseaudio[21270]: module.c: Loaded "module-native-protocol-tcp" (index: #1; argument: "auth-ip-acl=192.168.0.0/16;127.0.0.0/8"). Sep 19 10:18:39 hermes pulseaudio[21270]: module.c: Loaded "module-simple-protocol-tcp" (index: #2; argument: "port=4712 rate=44100 format=s16le channels=2"). Sep 19 10:18:39 hermes pulseaudio[21270]: module.c: Loaded "module-rescue-streams" (index: #3; argument: ""). Sep 19 10:18:39 hermes ALSA sound/usb/usbaudio.c:1353: setting usb interface 1:1 Sep 19 10:18:39 hermes pulseaudio[21270]: module-alsa-sink.c: Successfully opened device hw:0. Sep 19 10:18:39 hermes pulseaudio[21270]: module-alsa-sink.c: Successfully enabled mmap() mode. Sep 19 10:18:39 hermes pulseaudio[21270]: alsa-util.c: Successfully attached to mixer 'hw:0' Sep 19 10:18:39 hermes pulseaudio[21270]: alsa-util.c: Cannot find mixer control "Master". Sep 19 10:18:39 hermes pulseaudio[21270]: alsa-util.c: Using mixer control "PCM". Sep 19 10:18:39 hermes pulseaudio[21270]: sink.c: Created sink 0 "alsa_output.hw_0" with sample spec "s16le 2ch 44100Hz" Sep 19 10:18:39 hermes pulseaudio[21270]: source.c: Created source 0 "alsa_output.hw_0.monitor" with sample spec "s16le 2ch 44100Hz" Sep 19 10:18:39 hermes pulseaudio[21270]: module-alsa-sink.c: Using 4 fragments of size 4408 bytes. Sep 19 10:18:39 hermes pulseaudio[21270]: alsa-util.c: All 2 channels can be mapped to mixer channels. Using hardware volume control. Sep 19 10:18:39 hermes pulseaudio[21270]: module-alsa-sink.c: Thread starting up Sep 19 10:18:39 hermes pulseaudio[21270]: core-util.c: Successfully enabled SCHED_FIFO scheduling for thread, with priority 5. Sep 19 10:18:39 hermes pulseaudio[21270]: rtpoll.c: Acquired POSIX realtime signal SIGRTMIN+29 Sep 19 10:18:39 hermes pulseaudio[21270]: module-alsa-sink.c: Starting playback. Sep 19 10:18:39 hermes pulseaudio[21270]: module.c: Loaded "module-alsa-sink" (index: #4; argument: "device=hw:0"). Sep 19 10:18:39 hermes pulseaudio[21270]: main.c: Daemon startup complete.
And then a new connection from nc.exe is accepted and then nc.exe is killed:
Sep 19 10:22:28 hermes pulseaudio[21270]: socket-server.c: TCP connection accepted by tcpwrap. Sep 19 10:22:28 hermes pulseaudio[21270]: client.c: Created 0 "TCP/IP client from 192.168.0.11:50248" Sep 19 10:22:28 hermes pulseaudio[21270]: sink-input.c: Created input 0 "TCP/IP client from 192.168.0.11:50248" on alsa_output.hw_0 with sample spec s16le 2ch 44100Hz and channel map front-left,front-right Sep 19 10:22:28 hermes pulseaudio[21270]: memblockq.c: memblockq requested: maxlength=88200, tlength=0, base=4, prebuf=18446744073709551615, minreq=8820 Sep 19 10:22:28 hermes pulseaudio[21270]: memblockq.c: memblockq sanitized: maxlength=88200, tlength=88200, base=4, prebuf=44100, minreq=8820 Sep 19 10:22:52 hermes pulseaudio[21270]: protocol-simple.c: read(): Connection reset by peer Sep 19 10:22:52 hermes pulseaudio[21270]: sink-input.c: Freeing output 0 "TCP/IP client from 192.168.0.11:50248" Sep 19 10:22:52 hermes pulseaudio[21270]: client.c: Freed 0 "TCP/IP client from 192.168.0.11:50248"
Everything looks just OK, but pulseaudio process exits without any further log message.
One the client side (i.e. Windows), I run the following command:
linco -B 16 -C 2 -R 44100 | nc 192.168.0.13 4712
linco.exe is at http://sourceforge.net/project/showfiles.php?group_id=99332&package_id=107331 nc.exe is at http://joncraton.org/files/nc111nt.zip
I am using PulseAudio 0.9.9 on Gentoo Linux.
