philippe44 / AirConnect

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

Stopping with 11/SEGV #300

Closed AndreasPantle closed 3 years ago

AndreasPantle commented 3 years ago

I'm using airupnp-x86-64 as a service on a Debian machine. My service file is:

$ cat /etc/systemd/system/airupnp.service
[Unit]
Description=AirUPnP bridge
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/opt/airconnect/airupnp -l 1000:2000 -Z -x /etc/airconnect/airupnp.xml
Restart=on-failure
RestartSec=30

[Install]
WantedBy=multi-user.target

It seems that if I connect to the Sonos player from mac or ios device the service stops with:

Nov 18 06:39:54 DebianServer systemd[1]: airupnp.service: Main process exited, code=killed, status=11/SEGV
Nov 18 06:39:54 DebianServer systemd[1]: airupnp.service: Failed with result 'signal'.
Nov 18 06:40:24 DebianServer systemd[1]: airupnp.service: Service RestartSec=30s expired, scheduling restart.
Nov 18 06:40:24 DebianServer systemd[1]: airupnp.service: Scheduled restart job, restart counter is at 6.
Nov 18 06:40:24 DebianServer systemd[1]: Stopped AirUPnP bridge.
Nov 18 06:40:24 DebianServer systemd[1]: Started AirUPnP bridge.
Nov 18 06:40:24 DebianServer airupnp[10342]: [06:40:24.153993] main:1390 Starting airupnp version: v0.2.28.2 (Oct 24 2020 @ 13:37:34)
Nov 18 06:40:24 DebianServer airupnp[10342]: [06:40:24.206535] Start:1108 Binding to 192.168.xxx.10:49152
Nov 18 06:40:24 DebianServer airupnp[10342]: [06:40:24.258452] AddMRDevice:992 [0xxxxx]: adding renderer (Name1)
Nov 18 06:40:24 DebianServer airupnp[10342]: [06:40:24.262702] MasterHandler:656 [0xxxxx]: subscribe success
Nov 18 06:40:24 DebianServer airupnp[10342]: [06:40:24.471472] AddMRDevice:992 [0xxxxx]: adding renderer (Name2)
Nov 18 06:40:24 DebianServer airupnp[10342]: [06:40:24.481487] MasterHandler:656 [0xxxxx]: subscribe success
Nov 18 06:41:31 DebianServer airupnp[10342]: [06:41:31.049228] rtsp_thread:351 got RTSP connection 12
Nov 18 06:48:43 DebianServer airupnp[10342]: [06:48:43.397640] handle_rtsp:399 [0xxxxx]: challenge r4H8ijZaf2PLoOIn8L2CCA==
Nov 18 06:48:43 DebianServer airupnp[10342]: [06:48:43.419136] handle_rtsp:392 [0xxxxx]: received ANNOUNCE
Nov 18 06:48:43 DebianServer airupnp[10342]: [06:48:43.434192] handle_rtsp:591 [0xxxxx]: responding:
Nov 18 06:48:43 DebianServer airupnp[10342]: RTSP/1.0 200 OK
Nov 18 06:48:43 DebianServer airupnp[10342]: Audio-Jack-Status: connected; type=analog
Nov 18 06:48:43 DebianServer airupnp[10342]: CSeq: 3
Nov 18 06:48:43 DebianServer airupnp[10342]: [1B blob data]
Nov 18 06:48:43 DebianServer airupnp[10342]: [06:48:43.437750] handle_rtsp:392 [0xxxxx]: received SETUP
Nov 18 06:48:43 DebianServer airupnp[10342]: [06:48:43.441906] handle_rtsp:591 [0xxxxx]: responding:
Nov 18 06:48:43 DebianServer airupnp[10342]: RTSP/1.0 200 OK
Nov 18 06:48:43 DebianServer airupnp[10342]: Transport: RTP/AVP/UDP;unicast;mode=record;control_port=41584;timing_port=52984;server_port=53080
Nov 18 06:48:43 DebianServer airupnp[10342]: Session: DEADBEEF
Nov 18 06:48:43 DebianServer airupnp[10342]: Audio-Jack-Status: connected; type=analog
Nov 18 06:48:43 DebianServer airupnp[10342]: CSeq: 4
Nov 18 06:48:43 DebianServer airupnp[10342]: [1B blob data]
Nov 18 06:48:43 DebianServer airupnp[10342]: [06:48:43.446405] handle_rtsp:392 [0xxxxx]: received RECORD
Nov 18 06:48:43 DebianServer systemd[1]: airupnp.service: Main process exited, code=killed, status=11/SEGV
Nov 18 06:48:43 DebianServer systemd[1]: airupnp.service: Failed with result 'signal'.
Nov 18 06:49:13 DebianServer systemd[1]: airupnp.service: Service RestartSec=30s expired, scheduling restart.
Nov 18 06:49:13 DebianServer systemd[1]: airupnp.service: Scheduled restart job, restart counter is at 7.
Nov 18 06:49:13 DebianServer systemd[1]: Stopped AirUPnP bridge.
Nov 18 06:49:13 DebianServer systemd[1]: Started AirUPnP bridge.

Do someone have the same problem?

-->

Nov 18 06:48:43 DebianServer systemd[1]: airupnp.service: Main process exited, code=killed, status=11/SEGV

I like to know where comes the problem with 11/SEGV. It seems that this could be an memory problem?

philippe44 commented 3 years ago

Does it happen all the time?

AndreasPantle commented 3 years ago

Yes even if I do not use a service:

[09:03:55.147091] rtsp_thread:351 got RTSP connection 20
[09:04:15.101425] handle_rtsp:399 [0xAAAAA]: challenge /lfzdp4dDP/tUiiBGr82Pw==
[09:04:15.207025] handle_rtsp:392 [0xAAAAA]: received ANNOUNCE
[09:04:15.223021] handle_rtsp:591 [0xAAAAA]: responding:
RTSP/1.0 200 OK
Audio-Jack-Status: connected; type=analog
CSeq: 3

[09:04:15.226182] handle_rtsp:392 [0xAAAAA]: received SETUP
[09:04:15.230351] handle_rtsp:591 [0xAAAAA]: responding:
RTSP/1.0 200 OK
Transport: RTP/AVP/UDP;unicast;mode=record;control_port=34219;timing_port=42702;server_port=59848
Session: DEADBEEF
Audio-Jack-Status: connected; type=analog
CSeq: 4

[09:04:15.233429] handle_rtsp:392 [0xAAAAA]: received RECORD
Speicherzugriffsfehler

I can connect but as soon as I play it stops...

AndreasPantle commented 3 years ago

If it helps, I did a test with tag 0.2.27.1 and it works...

philippe44 commented 3 years ago

I mean, no streaming is possible at all or does this happen with a few track or randomly? If I build a version with debug symbols (I think I've stripped them out from current version), can you use gdb? https://www.dropbox.com/s/njszczp1ys64qqv/airupnp-x86-64?dl=0

AndreasPantle commented 3 years ago

I like to show you. Can I send you a private message with the stuff? A connection is possible but as soon as I try to stream (content from ios music lib / macOS music lib, both local and not streamed) it stops with with 11.

philippe44 commented 3 years ago

Can you try to run the version above under gdb?

AndreasPantle commented 3 years ago

This version is working. Do you need the log?

philippe44 commented 3 years ago

That is super-weird. Where did you take the previous version from and can you try this one https://www.dropbox.com/s/nhtbkrgmfs63kwf/airupnp-x86-64?dl=0 This is binary-identical to what should be the version you were using and the only difference with the other dropbox link are the symbols

AndreasPantle commented 3 years ago

I'm sorry for this. I did:

$ git clone https://github.com/philippe44/AirConnect.git
$ cd AirConnect
$ git checkout tags/0.2.28.3
$ cd bin
~/AirConnect/bin$ chmod +x air*
~/AirConnect/bin$ ./airupnp-x86-64

This fails with error 11.

Than:

$ git clone https://github.com/philippe44/AirConnect.git AirConnectTeschder
$ cd AirConnectTeschder
$ git checkout tags/0.2.27.1
$ cd bin
~/AirConnectTeschder/bin$ chmod +x air*
~/AirConnectTeschder/bin$ ./airupnp-x86-64

This version is working.

Now you gave me a version from dropbox, which are running too.

AndreasPantle commented 3 years ago

The first and the second dropbox version is working too. It shows me:

[10:35:55.296046] main:1389 Starting airupnp version: v0.2.28.5 (Nov 14 2020 @ 13:42:26)

Ähhh??? I don't know maybe I have a missunderstanding of github. In the tags overview it shows me the latest tag is: 0.2.28.3. The master is in 0.2.28.5. Normally I'm using the tags. The master is usually in an development state...

Now I switch back to the master branch and this is working too. Sorry for the inconvenience. Please close this issue.

philippe44 commented 3 years ago

Well, I share a large part of the problem as I did not tag the latest version knowing that I think I had issue with one of the build