philippe44 / AirConnect

Use AirPlay to stream to UPnP/Sonos & Chromecast devices
Other
3.5k stars 216 forks source link

Problem starting airupnp after update 0.2.26.0 with low-privileged user - core dumped #256

Closed eizedev closed 4 years ago

eizedev commented 4 years ago

Hi @philippe44

i have just updated the synology package for AirConnect release 0.2.26.0 with your newest binaries. I am using the airupnp and aircast binaries for arch x86-64 for testing.

If i start the package with a high-privileged user (such as root) i can start airupnp without any problems and it is running fine.
If i am trying to start airupnp with a low-privileged user, airupnp crashes directly after the start without an error but it generates a core dump and is throwing a seg faults in the messages log.
For the synology package i need to start the binaries as a low-privileged user.

2020-05-27T20:02:27+02:00 xx kernel: [76992.162360] airupnp[19007]: segfault at 0 ip 00007f5a8cb314bd sp 00007f5a87b69db0 error 4 in libc-2.20-2014.11.so[7f5a8cac7000+19b000]
2020-05-27T20:02:27+02:00 xx coredump: Process airupnp[18995] dumped core on signal [11].

I have used the same scripts, build steps, same low-privileged user etc. as of version 0.2.25.0. So it should be no problem with the synology package.
Version 0.2.25.0 is working fine for the moment.

Startup commands:

i am not using the config file in my tests (no file exists)

/volume1/@appstore/AirConnect/airupnp -b 192.168.1.x:49154 -l 1000:2000 -x "/volume1/@appstore/AirConnect/config.xml" -z -f "/var/log/airconnect.log" -d all=info  
/volume1/@appstore/AirConnect/aircast -b 192.168.1.x -l 1000:2000 -x "/volume1/@appstore/AirConnect/config-cast.xml" -z -f "/var/log/airconnect.log" -d all=info
Log `0.2.26.0` with low-privileged user - Not OK ```c# [2020-05-27 20:02:13] #### Start preinst... #### [20:02:13] Creating "airconnect" user. [2020-05-27 20:02:17] #### Done preinst #### [2020-05-27 20:02:18] #### Start postinst... #### [20:02:18] Securing existing "airconnect" user. [2020-05-27 20:02:22] #### Done postinst #### [20:02:27] Starting AirConnect ... [20:02:27] Starting airupnp on 192.168.1.x:49154 [20:02:27.568748] main:1378 Starting airupnp version: v0.2.26.0 (May 26 2020 @ 08:05:45) [20:02:27.568884] main:1386 no config file, using defaults [20:02:27.570227] Start:1103 Binding to 192.168.1.x:49154 [20:02:27] Starting aircast on 192.168.1.x [20:02:27.579455] main:951 Starting aircast version: v0.2.26.0 (May 26 2020 @ 08:04:46) [20:02:27.579590] main:959 no config file, using defaults [20:02:27.579967] Start:715 Binding to 192.168.1.x [20:02:27] Searching if renderer were added (for 10 seconds)... [20:02:27.615244] GetMaster:127 [0x6a9540]: Master not discovered yet, assigning to self [20:02:27.620687] AddMRDevice:989 [0x6a9540] skipping Sonos slave Bad [20:02:27.620754] AddMRDevice:1012 [0x6a9540]: cannot get mac Bad+, creating fake b2a68013 [20:02:27.861774] AddCastDevice:652 [0x68f3c0]: adding renderer (SHIELD) [20:02:27.861839] AddCastDevice:658 [0x68f3c0]: creating MAC 68f3ca [20:02:28] At least one renderer successfully discovered! [20:02:28] AirConnect successfully started on ip "192.168.1.x"! [20:02:29] Status: airupnp not running! [20:02:29] Status: airupnp not running! [20:02:30.083266] rtsp_thread:351 got RTSP connection 9 [20:02:30.083586] read_line:1191 disconnected on the other end 9 [20:02:30.083656] rtsp_thread:366 RTSP close 9 [20:02:33] Status: airupnp not running! ```
Log `0.2.25.0` - OK ```c# [2020-05-27 19:12:17] #### Start preinst... #### [19:12:17] Creating "airconnect" user. [2020-05-27 19:12:21] #### Done preinst #### [2020-05-27 19:12:22] #### Start postinst... #### [19:12:22] Securing existing "airconnect" user. [2020-05-27 19:12:26] #### Done postinst #### [19:12:30] Status: AirUpnp not running! [19:12:30] Starting AirConnect ... [19:12:31] Starting airupnp on 192.168.1.x:49154 [19:12:31.024366] main:1374 Starting airupnp version: v0.2.25.0 (May 3 2020 @ 17:42:14) [19:12:31.024525] main:1382 no config file, using defaults [19:12:31] Starting aircast on 192.168.1.x [19:12:31.027345] Start:1099 Binding to 192.168.1.x:49154 [19:12:31.034726] main:945 Starting aircast version: v0.2.25.0 (May 3 2020 @ 17:41:26) [19:12:31.034x8] main:953 no config file, using defaults [19:12:31.035224] Start:712 Binding to 192.168.1.x [19:12:31] Searching if renderer were added (for 10 seconds)... [19:12:31] At least one renderer successfully discovered! [19:12:31] AirConnect successfully started on ip "192.168.1.x"! [19:12:31.133891] GetMaster:127 [0x6a9540]: Master not discovered yet, assigning to self [19:12:31.145096] AddMRDevice:985 [0x6a9540] skipping Sonos slave 192.168.1.x - Sonos One SL [19:12:31.145177] AddMRDevice:1008 [0x6a9540]: cannot get mac 192.168.1.x - Sonos One SL+, creating fake a61685dd [19:12:31.149044] MasterHandler:657 [0x6a9540]: subscribe fail, re-trying 1 [19:12:31.152577] MasterHandler:657 [0x6a9540]: subscribe fail, re-trying 2 [19:12:31.157534] MasterHandler:657 [0x6a9540]: subscribe fail, re-trying 3 [19:12:31.161073] MasterHandler:661 [0x6a9540]: subscribe fail, volume feedback will not work [19:12:31.170984] AddMRDevice:987 [0x6ab9e8]: adding renderer (Fernsehzimmer) [19:12:31.171049] AddMRDevice:1008 [0x6ab9e8]: cannot get mac Fernsehzimmer+, creating fake 57175afd [19:12:31.176430] MasterHandler:655 [0x6ab9e8]: subscribe success [19:12:31.238987] AddMRDevice:987 [0x6ade90]: adding renderer (Flur) [19:12:31.239057] AddMRDevice:1008 [0x6ade90]: cannot get mac Flur+, creating fake 30a98145 [19:12:31.246315] MasterHandler:655 [0x6ade90]: subscribe success [19:12:31.282069] AddMRDevice:985 [0x6b0338] skipping Sonos slave 192.168.1.x - Sonos One SL [19:12:31.282165] AddMRDevice:1008 [0x6b0338]: cannot get mac 192.168.1.x - Sonos One SL+, creating fake f7bb13e0 [19:12:31.285509] MasterHandler:657 [0x6b0338]: subscribe fail, re-trying 1 [19:12:31.289285] MasterHandler:657 [0x6b0338]: subscribe fail, re-trying 2 [19:12:31.292891] MasterHandler:657 [0x6b0338]: subscribe fail, re-trying 3 [19:12:31.296670] MasterHandler:661 [0x6b0338]: subscribe fail, volume feedback will not work [19:12:31.528188] AddMRDevice:987 [0x6b27e0]: adding renderer (Esszimmer) [19:12:31.528266] AddMRDevice:1008 [0x6b27e0]: cannot get mac Esszimmer+, creating fake f739047a [19:12:31.534500] MasterHandler:655 [0x6b27e0]: subscribe success [19:12:32.651463] AddMRDevice:985 [0x6b4c88] skipping Sonos slave Küche [19:12:32.651545] AddMRDevice:1008 [0x6b4c88]: cannot get mac Küche+, creating fake 18ece22d [19:12:32.669365] MasterHandler:655 [0x6b4c88]: subscribe success [19:12:32.702767] AddMRDevice:985 [0x6b7130] skipping Sonos slave 192.168.1.x - Sonos Sub [19:12:32.702831] AddMRDevice:1008 [0x6b7130]: cannot get mac 192.168.1.x - Sonos Sub+, creating fake 5ea1dac [19:12:32.707024] MasterHandler:657 [0x6b7130]: subscribe fail, re-trying 1 [19:12:32.716680] MasterHandler:657 [0x6b7130]: subscribe fail, re-trying 2 [19:12:32.722167] MasterHandler:657 [0x6b7130]: subscribe fail, re-trying 3 [19:12:32.730071] MasterHandler:661 [0x6b7130]: subscribe fail, volume feedback will not work [19:12:32.754890] UpdateThread:792 [0x6a9540]: Sonos 192.168.1.x - Sonos One SL+ is now slave [19:12:32.827067] AddMRDevice:987 [0x6b95d8]: adding renderer (Schlafzimmer) [19:12:32.827132] AddMRDevice:1008 [0x6b95d8]: cannot get mac Schlafzimmer+, creating fake f19db70f [19:12:32.832924] MasterHandler:655 [0x6b95d8]: subscribe success [19:12:32.897721] AddMRDevice:987 [0x6bba80]: adding renderer (Büro) [19:12:32.897800] AddMRDevice:1008 [0x6bba80]: cannot get mac Büro+, creating fake 1553729b [19:12:32.910460] MasterHandler:655 [0x6bba80]: subscribe success [19:12:32.964252] AddMRDevice:985 [0x6bdf28] skipping Sonos slave 192.168.1.x - Sonos One SL [19:12:32.964338] AddMRDevice:1008 [0x6bdf28]: cannot get mac 192.168.1.x - Sonos One SL+, creating fake b2a68013 [19:12:32.971641] MasterHandler:655 [0x6bdf28]: subscribe success [19:12:33.019368] AddMRDevice:987 [0x6c03d0]: adding renderer (Kello_D4567C) [19:12:33.019448] AddMRDevice:1008 [0x6c03d0]: cannot get mac Kello_D4567C+, creating fake 1fe1e692 [19:12:33.031539] MasterHandler:655 [0x6c03d0]: subscribe success [19:12:34.513187] AddMRDevice:987 [0x6c2878]: adding renderer (SHIELD) [19:12:34.513259] AddMRDevice:1008 [0x6c2878]: cannot get mac SHIELD+, creating fake b108b09 [19:12:34.521053] MasterHandler:655 [0x6c2878]: subscribe success [19:12:37.037491] rtsp_thread:351 got RTSP connection 36 [19:12:37.037763] read_line:1191 disconnected on the other end 36 [19:12:37.037828] rtsp_thread:366 RTSP close 36 [19:12:37.03x10] rtsp_thread:351 got RTSP connection 34 [19:12:37.038847] read_line:1191 disconnected on the other end 34 [19:12:37.038911] rtsp_thread:366 RTSP close 34 [19:12:37.039696] rtsp_thread:351 got RTSP connection 30 [19:12:37.039926] read_line:1191 disconnected on the other end 30 [19:12:37.039989] rtsp_thread:366 RTSP close 30 [19:12:37.040769] rtsp_thread:351 got RTSP connection 27 [19:12:37.041011] read_line:1191 disconnected on the other end 27 [19:12:37.041076] rtsp_thread:366 RTSP close 27 [19:12:37.041843] rtsp_thread:351 got RTSP connection 21 [19:12:37.042071] read_line:1191 disconnected on the other end 21 [19:12:37.042134] rtsp_thread:366 RTSP close 21 [19:12:37.042921] rtsp_thread:351 got RTSP connection 18 [19:12:37.043160] read_line:1191 disconnected on the other end 18 [19:12:37.043222] rtsp_thread:366 RTSP close 18 [19:12:37.044007] rtsp_thread:351 got RTSP connection 14 [19:12:37.044255] read_line:1191 disconnected on the other end 14 [19:12:37.044318] rtsp_thread:366 RTSP close 14 [19:12:40.323102] AddCastDevice:649 [0x68f380]: adding renderer (SHIELD) [19:12:40.323188] AddCastDevice:655 [0x68f380]: creating MAC 68f38a [19:12:43.053113] rtsp_thread:351 got RTSP connection 9 [19:12:43.053434] read_line:1191 disconnected on the other end 9 [19:12:43.053524] rtsp_thread:366 RTSP close 9 [19:12:43.054316] rtsp_thread:351 got RTSP connection 35 [19:12:43.054580] read_line:1191 disconnected on the other end 35 [19:12:43.054673] rtsp_thread:366 RTSP close 35 [19:12:43.055441] rtsp_thread:351 got RTSP connection 34 [19:12:43.055668] read_line:1191 disconnected on the other end 34 [19:12:43.055749] rtsp_thread:366 RTSP close 34 [19:12:43.056601] rtsp_thread:351 got RTSP connection 30 [19:12:43.056906] read_line:1191 disconnected on the other end 30 [19:12:43.057007] rtsp_thread:366 RTSP close 30 [19:12:43.057811] rtsp_thread:351 got RTSP connection 27 [19:12:43.058045] read_line:1191 disconnected on the other end 27 [19:12:43.058112] rtsp_thread:366 RTSP close 27 [19:12:43.058923] rtsp_thread:351 got RTSP connection 21 [19:12:43.059163] read_line:1191 disconnected on the other end 21 [19:12:43.059271] rtsp_thread:366 RTSP close 21 [19:12:43.060092] rtsp_thread:351 got RTSP connection 18 [19:12:43.060324] read_line:1191 disconnected on the other end 18 [19:12:43.060427] rtsp_thread:366 RTSP close 18 [19:12:43.061334] rtsp_thread:351 got RTSP connection 14 [19:12:43.061580] read_line:1191 disconnected on the other end 14 [19:12:43.061658] rtsp_thread:366 RTSP close 14 [19:12:51.552298] UpdateThread:773 [0x6b4c88]: Device name change 192.168.1.x - Sonos Play:1 Küche ```
Log `0.2.26.0` with root user - OK ```c# [20:30:07] Status: airupnp not running! [20:30:21.095648] main:1378 Starting airupnp version: v0.2.26.0 (May 26 2020 @ 08:05:45) [20:30:21.095793] main:1386 no config file, using defaults [20:30:21.097897] Start:1103 Binding to 192.168.1.x:49154 [20:30:21.163485] AddMRDevice:991 [0x6a9540]: adding renderer (Fernsehzimmer) [20:30:21.163566] AddMRDevice:1012 [0x6a9540]: cannot get mac Fernsehzimmer+, creating fake 57175afd [20:30:21.165886] MasterHandler:655 [0x6a9540]: subscribe success [20:30:21.210244] AddMRDevice:989 [0x6ab9e8] skipping Sonos slave 192.168.1.x - Sonos One SL [20:30:21.210317] AddMRDevice:1012 [0x6ab9e8]: cannot get mac 192.168.1.x - Sonos One SL+, creating fake b2a68013 [20:30:21.217821] MasterHandler:655 [0x6ab9e8]: subscribe success [20:30:21.294186] AddMRDevice:991 [0x6ade90]: adding renderer (Büro) [20:30:21.294252] AddMRDevice:1012 [0x6ade90]: cannot get mac Büro+, creating fake 1553729b [20:30:21.302186] MasterHandler:655 [0x6ade90]: subscribe success [20:30:21.346101] AddMRDevice:989 [0x6b0338] skipping Sonos slave 192.168.1.x - Sonos Play:1 [20:30:21.346169] AddMRDevice:1012 [0x6b0338]: cannot get mac 192.168.1.x - Sonos Play:1+, creating fake 18ece22d [20:30:21.350493] MasterHandler:655 [0x6b0338]: subscribe success [20:30:21.406890] AddMRDevice:991 [0x6b27e0]: adding renderer (Flur) [20:30:21.406960] AddMRDevice:1012 [0x6b27e0]: cannot get mac Flur+, creating fake 30a98145 [20:30:21.429968] MasterHandler:655 [0x6b27e0]: subscribe success [20:30:21.474425] AddMRDevice:991 [0x6b4c88]: adding renderer (Schlafzimmer) [20:30:21.474488] AddMRDevice:1012 [0x6b4c88]: cannot get mac Schlafzimmer+, creating fake f19db70f [20:30:21.481477] MasterHandler:655 [0x6b4c88]: subscribe success [20:30:21.516005] AddMRDevice:989 [0x6b7130] skipping Sonos slave 192.168.1.x - Sonos One SL [20:30:21.516069] AddMRDevice:1012 [0x6b7130]: cannot get mac 192.168.1.x - Sonos One SL+, creating fake a61685dd [20:30:21.519791] MasterHandler:657 [0x6b7130]: subscribe fail, re-trying 1 [20:30:21.524486] MasterHandler:657 [0x6b7130]: subscribe fail, re-trying 2 [20:30:21.529647] MasterHandler:657 [0x6b7130]: subscribe fail, re-trying 3 [20:30:21.533638] MasterHandler:661 [0x6b7130]: subscribe fail, volume feedback will not work [20:30:21.563826] AddMRDevice:989 [0x6b95d8] skipping Sonos slave 192.168.1.x - Sonos Sub [20:30:21.563895] AddMRDevice:1012 [0x6b95d8]: cannot get mac 192.168.1.x - Sonos Sub+, creating fake 5ea1dac [20:30:21.568016] MasterHandler:657 [0x6b95d8]: subscribe fail, re-trying 1 [20:30:21.572352] MasterHandler:657 [0x6b95d8]: subscribe fail, re-trying 2 [20:30:21.576756] MasterHandler:657 [0x6b95d8]: subscribe fail, re-trying 3 [20:30:21.580788] MasterHandler:661 [0x6b95d8]: subscribe fail, volume feedback will not work [20:30:21.620560] AddMRDevice:989 [0x6bba80] skipping Sonos slave 192.168.1.x - Sonos One SL [20:30:21.620633] AddMRDevice:1012 [0x6bba80]: cannot get mac 192.168.1.x - Sonos One SL+, creating fake f7bb13e0 [20:30:21.623940] MasterHandler:657 [0x6bba80]: subscribe fail, re-trying 1 [20:30:21.627623] MasterHandler:657 [0x6bba80]: subscribe fail, re-trying 2 [20:30:21.630997] MasterHandler:657 [0x6bba80]: subscribe fail, re-trying 3 [20:30:21.635732] MasterHandler:661 [0x6bba80]: subscribe fail, volume feedback will not work [20:30:21.672999] AddMRDevice:991 [0x6bdf28]: adding renderer (Esszimmer) [20:30:21.673063] AddMRDevice:1012 [0x6bdf28]: cannot get mac Esszimmer+, creating fake f739047a [20:30:21.679796] MasterHandler:655 [0x6bdf28]: subscribe success [20:30:23.523521] AddMRDevice:991 [0x6c03d0]: adding renderer (SHIELD) [20:30:23.523596] AddMRDevice:1012 [0x6c03d0]: cannot get mac SHIELD+, creating fake b108b09 [20:30:23.530993] MasterHandler:655 [0x6c03d0]: subscribe success [20:30:23.653319] AddMRDevice:991 [0x6c2878]: adding renderer (Kello_D4567C) [20:30:23.653381] AddMRDevice:1012 [0x6c2878]: cannot get mac Kello_D4567C+, creating fake 1fe1e692 [20:30:23.664269] MasterHandler:655 [0x6c2878]: subscribe success [20:30:26.077035] rtsp_thread:351 got RTSP connection 36 [20:30:26.077285] read_line:1191 disconnected on the other end 36 [20:30:26.077345] rtsp_thread:366 RTSP close 36 [20:30:26.078222] rtsp_thread:351 got RTSP connection 33 [20:30:26.079452] rtsp_thread:351 got RTSP connection 31 [20:30:26.079475] read_line:1191 disconnected on the other end 33 [20:30:26.079629] rtsp_thread:366 RTSP close 33 [20:30:26.079732] read_line:1191 disconnected on the other end 31 [20:30:26.079788] rtsp_thread:366 RTSP close 31 [20:30:26.080660] rtsp_thread:351 got RTSP connection 24 [20:30:26.080903] read_line:1191 disconnected on the other end 24 [20:30:26.080968] rtsp_thread:366 RTSP close 24 [20:30:26.081747] rtsp_thread:351 got RTSP connection 22 [20:30:26.081975] read_line:1191 disconnected on the other end 22 [20:30:26.082040] rtsp_thread:366 RTSP close 22 [20:30:26.082852] rtsp_thread:351 got RTSP connection 17 [20:30:26.083077] read_line:1191 disconnected on the other end 17 [20:30:26.083137] rtsp_thread:366 RTSP close 17 [20:30:26.083959] rtsp_thread:351 got RTSP connection 14 [20:30:26.084218] read_line:1191 disconnected on the other end 14 [20:30:26.084282] rtsp_thread:366 RTSP close 14 [20:30:26.085100] rtsp_thread:351 got RTSP connection 9 [20:30:26.085311] read_line:1191 disconnected on the other end 9 [20:30:26.085370] rtsp_thread:366 RTSP close 9 ```

Thanks for your help, René

philippe44 commented 4 years ago

Corrected

eizedev commented 4 years ago

@philippe44 Thanks, airupnp is now working :) Fixed in AirConnect-Synology-0.2.26.1-20200528