I have a MacBook Pro running macOS 10.15.6. I've encountered numerous instances where macOS music unexpectedly quits when connected to a Raspberry Pi 3 Model B fitted with an Allo Boss 1.2 DAC. Shairport-sync is 3.3.7rc2-OpenSSL-Avahi-ALSA-soxr-metadata-mqtt-sysconfdir:/usr/local/etc.
The MacBook and the Pi are using WiFi. Have nailed the router channels and bandwidth frequencies down to no effect. Have also run the Pi with both built-in wifi and a USB dongle all with the same outcome.
Interestingly, Music does not have to be playing for it to suddenly quit. It looks to be an entirely random event. This only occurs when attached to the shairport-sync service. macOS Music will run indefinitely when playing to internal speakers or when connected to another Airplay device.
I've spoken to Apple at length. Reset the MacBook. Reinstalled the OS. Run macOS in safe mode. Run Music in safe mode. Played music stored on the primary drive, a secondary drive and a network drive.
Whilst I haven't yet entirely ruled out a networking issue, I am able to play music without issue using iOS Music on both iPhone and iPad. This would, to me, suggest that the network may not be the primary suspect.
I was wondering if anyone has encountered a similar problem or may be able to shed any light on what the problem is.
Here's a rather lengthy log I captured today. I hope this is of use.
Thanks in advance.
-- Adrian
Thanks for the post. I’ll take a look over the new things few days.
Just a quick thing — I notice some apparent network dropouts and so on — missing timing returns and missing DACP enquiries. Would it be possible to run a similar test, but at verbosity 2 and with statistics enabled? It might give us a slightly better view of the situation.
Just a quick thing — I notice some apparent network dropouts and so on — missing timing returns and missing DACP enquiries. Would it be possible to run a similar test, but at verbosity 2 and with statistics enabled? It might give us a slightly better view of the situation.
Will do. Thanks for picking this up. Will upload the results tomorrow.
Hi Mike,
Here's the latest with '-vv --statistics'. Crashed just as it was changing track. But like I've said, it doesn't even have to be playing. I'll try to capture that event next.
Ooh - just realised that shairport-sync also crashed at the same time. That, I think is a first for me.
Thanks -- let me have a look.
Hi Mike,
Was messing (or should I say experimenting) with various wifi settings today and managed to end up with a system that would crash macOS Music within a few minutes. Am now fairly certain that the problems I'm experiencing are due to my network. Perhaps should have mentioned that my network includes wifi-enabled powerline adaptors. The MacBook attaches to the router's wifi; the shairport-sync Pi connects via a wifi-enabled powerline adaptor.
The next logical step, for me, is to connect the Pi via ethernet using another powerline adaptor and eliminate wifi on the client side.
Whilst I'd appreciate any feedback, I wouldn't want you to waste any time with regards this issue at this current moment in time. More than happy to keep you updated via this thread. Otherwise, feel free to close it.
Many thanks -- Adrian
Thanks for the update, Adrian. However, I think you might be on to something. Really, neither the Music app nor Shairport Sync should crash, even in the presence of network problems -- not working is okay, crashing is not. If you do manage to crash Music at will, I'd be very interested.
I think I've narrowed the problem down. IPv6 is disabled on my router. Was about to transition from using wifi to ethernet on the Pi (running dietpi) and noticed an option to disable IPv6. Disabled it. Rebooted. Voila. 18hrs, 39 mins and counting.
Grew up in the age where rubber chicken voodoo (and the occasional blood sacrifice) was often required to get SCSI working as intended. Thought those days were long gone. Perhaps not.
Having a small party to celebrate. Just me, the dog, the ghost of the SCSI rubber chicken and sweet, sweet tunes being streamed via shairport-sync.
Will keep you posted. -- Adrian
Re-enabled IPv6 on the router and the Pi running shairport-sync. Rebooted. Looks stable.
Hi Mike,
Way fewer network issues since re-enabling IPv6. Just one macOS Music crash when nothing was playing but whilst connected to the shairport-sync service. And another just now; macOS Music crashed mid-playback this morning. Interestingly, shairport-sync went down at the same time. Running the most recent release. Time to rerun with '-vv --statistics' methinks.
(BTW, MQTT is working okay, despite the initial warning on startup.)
● shairport-sync.service - Shairport Sync - AirPlay Audio Receiver
Loaded: loaded (/lib/systemd/system/shairport-sync.service; enabled; vendor preset: enabled)
Active: failed (Result: signal) since Thu 2020-10-08 11:02:48 BST; 53min ago
Process: 353 ExecStart=/usr/local/bin/shairport-sync (code=killed, signal=ABRT)
Main PID: 353 (code=killed, signal=ABRT)
Oct 03 05:54:47 hifipi systemd[1]: Started Shairport Sync - AirPlay Audio Receiver.
Oct 03 05:54:53 hifipi shairport-sync[353]: [MQTT]: Could not establish a mqtt connection
Oct 08 11:02:48 hifipi shairport-sync[353]: double free or corruption (out)
Oct 08 11:02:48 hifipi systemd[1]: shairport-sync.service: Main process exited, code=killed, status=6/ABRT
Oct 08 11:02:48 hifipi systemd[1]: shairport-sync.service: Failed with result 'signal'.
Thanks for the update. It's frustrating!
Hi Mike,
Left macOS music playing a playlist on repeat (with the sound muted) overnight. Woke up to find an error I'd never seen before. Here's a log for your felicification...
debug03.log.gz
Thanks again, Adrian. Again, it seems as if macOS Music quite without warning and left Shairport Sync to try to clean itself up after timing out. Yeats actually wrote "Too long a _sacrifice_ Can make a stone of the heart". I think the crashes experienced by Shairport Sync happen when it is trying to clean itself up -- the double free, for example -- in an unforeseen situation. With apologies to another Irish poet, I'll keep digging.
Thanks again, Adrian. Again, it seems as if macOS Music quite without warning and left Shairport Sync to try to clean itself up after timing out. Yeats actually wrote "Too long a _sacrifice_ Can make a stone of the heart". I think the crashes experienced by Shairport Sync happen when it is trying to clean itself up -- the double free, for example -- in an unforeseen situation. With apologies to another Irish poet, I'll keep digging.
Forgot to mention that macOS Music hadn't crashed in this instance, it had just stopped playing, almost as if it had been paused.
Hi Mike,
I think I've cracked it. Bit the bullet and bought a new WiFi adapter for the Pi 3B. The previous adaptor didn't have an external antenna unlike the new one. Having already experienced problems with the Pi's built-in WiFi, it never crossed my mind that my go-to USB adapter (a Panda Wireless PAU05) wouldn't be up to the job as well.
Was rereading the TROUBLESHOOTING.md and the WiFi section rang too many bells.
I know feel like a complete fool.
The new adapter is a TP-LINK AC1300 dual band MU-MIMO. RTL8812BU driver needed building for Linux support. No big issue there.
I think it's safe to close this thread now.
Many thanks for all of your help and advise.
Happy to close it, Adrian. But neither macOS music nor Shairport Sync should crash. However, it’s going to be quite a long process trying to get it to happen reliably and getting a fix. Many thinks for your contribution.
Most helpful comment
I think I've narrowed the problem down. IPv6 is disabled on my router. Was about to transition from using wifi to ethernet on the Pi (running dietpi) and noticed an option to disable IPv6. Disabled it. Rebooted. Voila. 18hrs, 39 mins and counting.
Grew up in the age where rubber chicken voodoo (and the occasional blood sacrifice) was often required to get SCSI working as intended. Thought those days were long gone. Perhaps not.
Having a small party to celebrate. Just me, the dog, the ghost of the SCSI rubber chicken and sweet, sweet tunes being streamed via shairport-sync.
Will keep you posted. -- Adrian