Solved: squeezelite quitting on RPi Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
francolargo
Posts: 5
Joined: Thu Mar 26, 2020 3:36 pm

Solved: squeezelite quitting on RPi

Post by francolargo »

I found that the problem described below could be easily cured simply by uninstalling the current squeezelite version built into DietPi 6.33.3 and replacing it with the most recent version from GitHub. That version - v1.9.7-1283 - is built with these options:

LINUX ALSA EVENTFD RESAMPLE ALAC OPUS VISEXPORT IR GPIO RPI DSD SSL LINKALL

Again, this difference applies to an RPi 3B+ and prevents frequent random crashes.

...hope the supported DietPi version squeezelite will be updated soon so others don't have to dink with this...

Best,

Frank
____________________________________________________________________________________________________________________________
Original post:

Greetings,

I would greatly appreciate any suggestions to solve problems with squeezelite on a new rig with DietPi version 6.33.3 running on a RPi 3B+, and LMS on a RPi 4.1. Never any problems with the same LMS working into other older squeezelite versions, but the current 1.9.7-1260 is acting up. I need to restore it using 'service squeezelite restart' every few minutes.

Process: 883 ExecStart=/usr/bin/squeezelite -a 4096:1024:32:0 -n Largo Audio (code=killed, signal=ABRT)

Here is the current setup:
State : [failed]
Mode : [DietPi controlled]
Include/Exclude : [included]
CPU Affinity : [3]
CPU Scheduling Policy : [fifo]
CPU Scheduling Priority : [80]
I/O Scheduling Class : [realtime]
I/O Scheduling Priority : [0]

Here are top entries from the service.d log:
Nov 18 06:23:13 DietPi squeezelite[883]: [06:23:13.185530] ff_decode:408 avcodec_decode_audio4 error: -22 Invalid argument
Nov 18 06:23:13 DietPi squeezelite[883]: [06:23:13.188280] ff_decode:408 avcodec_decode_audio4 error: -22 Invalid argument
Nov 18 06:23:13 DietPi squeezelite[883]: [06:23:13.290993] ff_decode:408 avcodec_decode_audio4 error: -22 Invalid argument
Nov 18 06:23:13 DietPi squeezelite[883]: [06:23:13.393756] ff_decode:408 avcodec_decode_audio4 error: -22 Invalid argument
Nov 18 06:23:13 DietPi squeezelite[883]: [06:23:13.496912] ff_decode:408 avcodec_decode_audio4 error: -22 Invalid argument
Nov 18 06:23:13 DietPi squeezelite[883]: [06:23:13.597109] ffmpeg: Invalid return value 0 for stream protocol
Nov 18 06:23:13 DietPi squeezelite[883]: [06:23:13.597259] ffmpeg: Invalid return value 0 for stream protocol
Nov 18 06:23:13 DietPi squeezelite[883]: double free or corruption (fasttop)
Nov 18 06:23:13 DietPi systemd[1]: squeezelite.service: Main process exited, code=killed, status=6/ABRT
Nov 18 06:23:13 DietPi systemd[1]: squeezelite.service: Failed with result 'signal'.

Thanks for any and all help!

Frank
Last edited by francolargo on Wed Nov 18, 2020 10:26 pm, edited 2 times in total.
francolargo
Posts: 5
Joined: Thu Mar 26, 2020 3:36 pm

Re: squeezelite quitting

Post by francolargo »

A bit more info -

Sourcing a second LMS server with very good throughput, the same errors occur. They don't seem dependent on midia file type. They can happen at any time, but often seem to coincide with when the end of a media file is reached or with any action that terminates media transfer to begin transfer of a different file. They seem to happen with equal probability regardless of the network settings and CPU priority. However, limiting output to 16 bits does seem to keep the crashes farther apart in time.

I see on the piCore site that they use a build option called RPi - anybody know what that's about? Ralph Irving's GitHub makefile documentation for RPi (15 months old) does specifically include an option named '-DRPI'.
https://github.com/ralph-irving/squeeze ... kefile.rpi
I wonder why that is not used in the DietPi version...

Again, all insights greatly appreciated...

Frank
User avatar
Joulinar
Posts: 2597
Joined: Sat Nov 16, 2019 12:49 am

Re: Solved: squeezelite quitting on RPi

Post by Joulinar »

Many thanks for sharing your solution. DietP is using own compiled packages for Squeezelite and they are from mid of this year. I guess they are created by @MichaIng. Maybe he can give some inside what options are used.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 2423
Joined: Sat Nov 18, 2017 6:21 pm

Re: Solved: squeezelite quitting on RPi

Post by MichaIng »

The "RPI" built option enables some GPIO feature only, i.e. those two files are built and included:
- https://github.com/ralph-irving/squeeze ... ter/gpio.c
- https://github.com/ralph-irving/squeeze ... mal_gpio.c

We don't build it with GPIO support currently, until someone explicitly asks for, since it would complicate the build and ship procedure when we need to spit device-specific builds instead of, as currently, only arch-specific builds ;).

So at least that flag has nothing to do with the error you face, but probably another change upstream chance since our build is related. I'll rebuild it. Here the options I use btw: OPTS='-DDSD -DFFMPEG -DRESAMPLE -DVISEXPORT -DLINKALL -DIR -DUSE_SSL'
I.e. FFmpeg can handle OPUS and ALAC instead of adding their standalone libraries. When using dedicated OPUS and ALAC support, you needed to install libopus-dev for sure, but did ALAC work OOTB? I've just seen this discussion in the quite recent implementation of those and though that staying with previous FFmpeg would be safer for now: https://github.com/ralph-irving/squeezelite/issues/104
User avatar
MichaIng
Site Admin
Posts: 2423
Joined: Sat Nov 18, 2017 6:21 pm

Re: Solved: squeezelite quitting on RPi

Post by MichaIng »

@francolargo
Could you test the new build:

Code: Select all

cd /tmp
wget https://dietpi.com/downloads/binaries/buster/squeezelite_armv7l.deb
apt install ./squeezelite_armv7l.deb
rm squeezelite_armv7l.deb
Post Reply