-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Music Assistant Server crashes when using the Sonos provider #2142
Comments
It is not clear what you have been doing as you use the term INTEGRATION yet you supply the ADDON server version. You indicate you are using HAOS but not the integration? You mention removing folders yet that is not possible if you are talking about the addon which resides in its own docker container. You even mention MAOS at one point which isn’t a thing? So please try again to explain exactly what you are doing. |
Thank you OzGav and sorry for my confusion, it's a fact. Please help me to understand. |
Ok the integration (because you are running HAOS) will install the ADDON. So navigate to HA SETTINGS>>ADDONS>> MUSIC ASSISTANT and see if the ADDON is running. If it isn’t then try and remove it, restart HA and reinstall it. |
Thank you @OzGav for clarifications. |
Edit: I see you are running this in a VM. Please edit your initial post and ATTACH the whole log. You have pasted the start of the log and then it looks like you have attached part of the log? |
I edited the initial post to make it clear for everyone. 2024-04-20 22:12:18.892 INFO (MainThread) [music_assistant] Starting Music Assistant Server (62c090fc13b449f1923f28a1ed6f15c6) version 2.0.0b139 - HA add-on: True If you can help me to provide a more detailed log I will post it. |
After launching and after auto stopping I went into SYSTEM>>ADDONS>>MUSIC ASSISTANT>>LOG and I found this: The only strange thing that I notice is that servers are started with strange IPs: HA IP is the last (192.168.1.47). I've dug deep for hours but I cannot find a real issue in the logs. |
Also please advise what hardware this is running on? There is this report as well #2110 |
As I said HA is running in a Linux VM. The report you indicated is interesting because last line of the log is the same (soco.data_structures_entry imported) so, as @marcelveldt said "at least its partially starting and then crashes". Another report that I found interesting because similar is this one: #1144 I'm available for any test. |
I installed last version of addon 2.0.0b140 and here you are the new log with a new WARNING: |
As you can read in my follow-up on #2110 I have added a safe mode to further diagnose this option. |
OK, released a new version (b141) which also included the safe mode toggle on the add-on |
I just tried, everything is fine! |
I am experiencing exactly the same problem as @igorvita. It stopped starting a few weeks ago after some update. Since then I installed every update and checked the logs. I also tried to delete and reinstall MA and the integration, that did not change anything. My setup is the recommended HAOS setup on a dedicated (old) laptop (as described in https://www.home-assistant.io/installation/generic-x86-64). OS Version: Home Assistant OS 11.4 Please let me know if I can do anything to identify the problem and thanks for Music assitant! |
So, when MA starts with safe mode on, its actually loaded without any provider loaded (what we call integration in the HA world). Now go to Settings --> Providers and click the 3 dots next to a provider and hit reload. That will actually load it. Do that one by one until you find the one that is crashing the entire container. |
It's the SONOS player that is crashing |
OK thanks for letting us know, so indeed the soco package then. I will have a look at changes in both that package and our implementation side of things |
I confirm what @JochenDiekenbrock said: it's sonos player crashing. 2024-04-23.22-19-11.mp4 |
Are you also running Home Assistant on this same machine ? |
I'm afraid to try... Is there a risk that HA will not boot anymore after installing Sonos integration? |
Yes, there is - so be sure to have a backup. |
I tried to add the Sonos integration, but that did not complete because I don't have Sonos devices. Sorry. |
this should be fixed in beta 142 - but please test! |
@igorvita please confirm if this has been fixed |
I just updated to beta 143, MA is still crashing as soon as I add the Sonos Player. |
I update HA core to 2024.4.4 and MA to beta 143. |
OK, looks like we have 2 issues then. There was also a segfault introduced in orjson 3.10.1 I had a quick peek at the soco library and that one is a whole beast on its own, including dependencies on some aging xml libraries. So like 999 different ways a hard crash could be induced. Soco also got updated recently so maybe we start with reverting that as well but it may also just be one of its dependencies. I suspect a side effect from one of the xml libraries. I intend to switch to the newer sonos api's anyways (as the UPNP api is going to be phased out) so maybe this is reason to do that sooner. Do both of you really use the Sonos provider ? |
I don't, for me, everything is fine now. I just try to help. Thank you for your effort! |
I don't use Sonos, neither. |
To sum up this issue. The Music Assistant container (or HA add-on) crashes on some older generation (Intel?) hardware when using the Sonos provider (which in turn uses the Soco python library), most likely due to some dependency (like one of the xml libraries) using CPU instructions not available on older gen x86 CPU's. The crash seems to already happen as soon as the soco library is imported but we're not 100% sure about that. Its really hard for us to exactly track what's going on without actual access to such hardware and the specific conditions. So workaround for now: Do not use the Sonos provider in MA when you run into this issue. |
What version of Music Assistant has the issue?
2.0.0b139
What version of the Home Assistant Integration have you got installed?
2024.4.0
Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?
The problem
MA addon stops few seconds after starting.
Whatchdog try to restart but at every start addon stops and I cannot interact with the UI.
This happen for sure with 2.0.0b139, 2.0.0b138, 2.0.0b137 and 2.0.0b136.
Older versions used to work but at the moment I cannot say wich version worked because I didn't use it for months.
How to reproduce
Just start the addon
Music Providers
I have no access to MA so I cannot neither try to use music providers
Player Providers
I have no access to MA so I cannot neither try to use player providers
Full log output
This is the few lines I downloaded in the few seconds before crash:
2024-04-19 23:53:20.579 INFO (MainThread) [music_assistant] Starting Music Assistant Server (2a755ddc32514389927fd71783cae30f) version 2.0.0b138 - HA add-on: True
2024-04-19 23:53:20.634 INFO (MainThread) [music_assistant.cache] Initializing cache controller...
2024-04-19 23:53:20.734 INFO (MainThread) [music_assistant.webserver] Starting server on 172.30.32.1:8095 - base url: http://172.30.32.1:8095
2024-04-19 23:53:20.935 INFO (MainThread) [music_assistant.music] Using a sync interval of 180 minutes.
2024-04-19 23:53:21.811 WARNING (MainThread) [music_assistant.webserver] Invalid command: players/all
2024-04-19 23:53:21.880 WARNING (MainThread) [music_assistant.webserver] Invalid command: music/recently_played_items
2024-04-19 23:53:22.797 WARNING (MainThread) [music_assistant.webserver] Invalid command: config/providers
2024-04-19 23:53:23.660 WARNING (MainThread) [music_assistant.webserver] Invalid command: config/core
2024-04-19 23:53:23.692 WARNING (MainThread) [music_assistant.webserver] Invalid command: players/all
2024-04-19 23:53:23.707 INFO (MainThread) [music_assistant.streams] Detected ffmpeg version 6.0.1 with libsoxr support
2024-04-19 23:53:23.708 INFO (MainThread) [music_assistant.streams] Starting server on 0.0.0.0:8097 - base url: http://192.168.1.47:8097
This is a more detailed log from HA core log:
log.txt
Additional information
I installed HA OS into a VM with 4GB of dedicated RAM and 2 virtual cpus with execution cap set on 100% (VirtualBox v. 5.1.18 (114002) installed on a server based on NAS4Free).
Everything works fine but this.
Older versions of MA on older version of MA core worked flawlessly.
I tried everything, I reinstalled many times integration deleting manually old folders but nothing worked.
My last chance is install everything from scratch but I'm trying to find a fix.
What version of Home Assistant Core are your running
2024.4.3
What type of installation are you running?
Home Assistant OS in a VM
On what type of hardware are you running?
VM Linux based
The text was updated successfully, but these errors were encountered: