Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: Update library hangs unpredictably while scanning SMB share on a Fritzbox router
#1
Hi all,

I just updated my RPi4 to 9.2.4 but the library update/regeneration hangs after some number number of tracks in the sense that the circle keeps spinning and no more files are added (but the system is not frozen). Using

Code:
moodeutl --mpdlog

I can see how far it got. It's not the same place every time (after restarting and re-creating the source). Thus the problem does not appear to be with the files themselves. I also have a Pi Zero with its most up-to-date version of moode and it loads the library just fine.
The source is a SMB share of a usb stick in my Fritz.box router.
I reformatted the sd card and checked for bad sectors on Windows by creating a Fat32 partition before imaging with the Pi imager but didn't find anything.
I don't see anything unusual in the log apart from some thumb gen errors for some files that the library update doesn't even reach. It's on my list to fix those.

Code:
pi@moode:~ $ moodeutl -l
20250206 222614 worker: --
20250206 222614 worker: -- Start moOde 9 series
20250206 222614 worker: --
20250206 222614 worker: Daemonize:     complete
20250206 222614 worker: Linux startup: complete
20250206 222614 worker: Boot config:   ok
20250206 222614 worker: Boot folder:   ok
20250206 222614 worker: Radio table:   ok
20250206 222615 worker: PHP session:   cleaned
20250206 222615 worker: PHP session:   loaded
20250206 222621 worker: Package locks: applied
20250206 222622 worker: File check:    complete
20250206 222622 worker: Log to RAM:    on
20250206 222622 worker: Debug logging: off
20250206 222622 worker: --
20250206 222622 worker: -- System
20250206 222622 worker: --
20250206 222623 worker: Host name:     moode
20250206 222623 worker: RPi model:     Pi-4B 1.1 2GB
20250206 222623 worker: moOde release: 9.2.4 2025-02-06
20250206 222623 worker: RaspiOS:       12.9 Bookworm 64-bit
20250206 222623 worker: Linux Kernel:  6.6.74 64-bit
20250206 222623 worker: MPD version:   0.23.14
20250206 222623 worker: User id:       pi
20250206 222623 worker: Home folder:   /home/pi
20250206 222623 worker: Time zone:     Europe/Paris
20250206 222623 worker: Kbd layout:    us
20250206 222623 worker: HDMI ports(s): on
20250206 222623 worker: HDMI-CEC:      off
20250206 222623 worker: Sys LED0:      on
20250206 222623 worker: Sys LED1:      on
20250206 222623 worker: Reduce power:  n/a
20250206 222623 worker: Fan control:   n/a
20250206 222623 worker: CPU governor:  ondemand
20250206 222623 worker: --
20250206 222623 worker: -- Network
20250206 222623 worker: --
20250206 222624 worker: WiFi SSID/PSK imported
20250206 222624 worker: Eth0
20250206 222624 worker: Ethernet: adapter exists
20250206 222624 worker: Ethernet: timeout off
20250206 222624 worker: Ethernet: address not assigned
20250206 222624 worker: Wlan0
20250206 222624 worker: Wireless: adapter exists
20250206 222624 worker: Wireless: country DE
20250206 222624 worker: Wireless: SSID    FRITZ!Box 5490 AO
20250206 222624 worker: Wireless: other   None
20250206 222624 worker: Wireless: timeout up to 90 secs
20250206 222624 worker: Wireless: connect to FRITZ!Box 5490 AO
20250206 222624 worker: Wireless: method  dhcp
20250206 222624 worker: Wireless: address 192.168.178.33
20250206 222624 worker: Wireless: netmask 255.255.255.0
20250206 222624 worker: Wireless: gateway 192.168.178.1
20250206 222624 worker: Wireless: pri DNS 192.168.178.1
20250206 222624 worker: Wireless: domain  fritz.box
20250206 222624 worker: mDNS
20250206 222624 worker: Discover: IPv4 and IPv6
20250206 222624 worker: --
20250206 222624 worker: -- File sharing
20250206 222624 worker: --
20250206 222624 worker: SMB file sharing:  off
20250206 222624 worker: SMB password:      none
20250206 222624 worker: NFS file sharing:  off
20250206 222624 worker: DLNA file sharing: off
20250206 222624 worker: --
20250206 222624 worker: -- Special configs
20250206 222624 worker: --
20250206 222624 worker: Plexamp:          not installed
20250206 222624 worker: RoonBridge:       not installed
20250206 222624 worker: Allo Boss 2:      not detected, OLED script ok
20250206 222624 worker: Allo Piano 2.1:   not detected
20250206 222624 worker: IQaudIO DigiAMP+: not detected
20250206 222624 worker: RPi DigiAMP+:     not detected
20250206 222624 worker: Bluetooth:        session vars created
20250206 222624 worker: --
20250206 222624 worker: -- ALSA debug
20250206 222624 worker: --
20250206 222624 worker: Cards:  0:vc4hdmi0        1:vc4hdmi1        2:sndrpihifiberry 3:empty
20250206 222624 worker:         4:empty           5:empty           6:empty           7:empty
20250206 222624 worker: Mixers: 0:none            1:none            2:(Digital)       3:none
20250206 222624 worker:         4:none            5:none            6:none            7:none
20250206 222624 worker: --
20250206 222624 worker: -- Audio configuration
20250206 222624 worker: --
20250206 222624 worker: Audio device:  0:Pi HDMI 1
20250206 222624 worker: ALSA card:     has not been reassigned
20250206 222625 worker: MPD config:    updated (iec958 device)
20250206 222625 worker: ALSA output:   HDMI
20250206 222625 worker: ALSA mode:     IEC958 (iec958)
20250206 222625 worker: ALSA mixer:    PCM
20250221 091839 worker: ALSA init:     no audio device was detected
20250221 091842 worker: ALSA volume:   controller not detected
20250221 091842 worker: ALSA maxvol:   100%
20250221 091842 worker: ALSA loopback: off
20250221 091842 worker: MPD mixer      Hardware
20250221 091842 worker: Integ audio:   vc4-kms-v3d
20250221 091842 worker: Audio formats: Alsacap was unable to detect formats
20250221 091842 worker: CamillaDSP:    off
20250221 091842 worker: CDSP volume:   0dB
20250221 091842 worker: CDSP volrange: 60dB
20250221 091842 worker: --
20250221 091842 worker: -- MPD startup
20250221 091842 worker: --
20250221 091842 worker: MPD service:        started
20250221 091842 worker: MPD port 6600:      accepting connections
20250221 091842 worker: MPD ALSA Default:   on
20250221 091842 worker: MPD ALSA Bluetooth: off
20250221 091842 worker: MPD HTTP Server:    off
20250221 091842 worker: MPD volume:         0
20250221 091842 worker: Saved MPD vol:      -1
20250221 091842 worker: Saved SRC vol:      0
20250221 091842 worker: MPD crossfade:      off
20250221 091842 worker: MPD ignore CUE:     no
20250221 091842 worker: MPD first boot:     SDCARD scanned
20250221 091843 worker: MPD first boot:     default playlist loaded
20250221 091843 worker: MPD CDSP volsync:   off
20250221 091843 worker: --
20250221 091843 worker: -- Music sources
20250221 091843 worker: --
20250221 091843 worker: USB drives:     none
20250221 091843 worker: NVMe drives:    none
20250221 091843 worker: SATA drives:    none
20250221 091843 worker: NAS sources:    none
20250221 091843 worker: --
20250221 091843 worker: -- Feature availability
20250221 091843 worker: --
20250221 091843 worker: Input select:    available, Source: MPD, Output: Pi HDMI 1
20250221 091843 worker: Bluetooth:       available, PIN: None, ALSA/CDSP maxvol: 100%/0dB, ALSA outmode: Standard
20250221 091843 worker: AirPlay:         available
20250221 091843 worker: Spotify Connect: available
20250221 091843 worker: Deezer Connect:  available
20250221 091843 worker: Squeezelite:     available
20250221 091843 worker: UPnP client:     available
20250221 091843 worker: Plexamp:         not installed, ALSA maxvol: 100%
20250221 091843 worker: RoonBridge:      not installed
20250221 091843 worker: Multiroom:       available
20250221 091843 worker: GPIO buttons:    available
20250221 091843 worker: Stream recorder: n/a
20250221 091843 worker: --
20250221 091843 worker: -- Security
20250221 091843 worker: --
20250221 091843 worker: Web SSH server:    off
20250221 091843 worker: XSS detection:     off
20250221 091843 worker: HTTPS mode:        available
20250221 091843 worker: --
20250221 091843 worker: -- Peripherals
20250221 091843 worker: --
20250221 091845 worker: Local display:   off
20250221 091845 worker: Chromium ver:    126.0.6478.164-rpt1
20250221 091845 worker: Chromium cfg:    directory ok
20250221 091845 worker: Screen blank     600
20250221 091845 worker: On-screen kbd:   on
20250221 091845 worker: Disable GPU:     off
20250221 091845 worker: HDMI orient:     landscape
20250221 091845 worker: HDMI 4K 60Hz:    off
20250221 091845 worker: DSI scn type:    none
20250221 091845 worker: DSI port:        1
20250221 091845 worker: DSI brightness:  255
20250221 091845 worker: DSI rotate:      0
20250221 091845 worker: Rotary encoder:  off
20250221 091845 worker: Triggerhappy:    off
20250221 091845 worker: LCD updater:     off
20250221 091845 worker: --
20250221 091845 worker: -- Miscellaneous
20250221 091845 worker: --
20250221 091845 worker: Software update:   Automatic check off
20250221 091845 worker: Auto-CoverView:    off
20250221 091845 worker: CoverView timeout: Never
20250221 091845 worker: Auto-shuffle:      off
20250221 091845 worker: Auto-play:         off
20250221 091845 worker: Maintenance task:  360 mins
20250221 091845 worker: Current view:      reset to Playback
20250221 091845 worker: Active flags:      all false
20250221 091845 worker: Reset flags:       skipped
20250221 091845 worker: Session check:     retry 1
20250221 091847 worker: Session check:     ok
20250221 091847 worker: --
20250221 091847 worker: -- Startup complete
20250221 091847 worker: --
20250221 091847 worker: Mount monitor:    started
20250221 091848 worker: Radio monitor:    off
20250221 091848 worker: Watchdog monitor: started
20250221 091848 worker: Responsiveness:   Default
20250221 091848 worker: Ready
20250221 092709 worker: Job nas_source_cfg
20250221 092750 worker: Job update_library
20250221 092750 mpdindex: Start
20250221 092750 mpdindex: Cmd (update)
20250221 092750 thumb-gen: Start
20250221 092750 thumb-gen: Scan opt: Default
20250221 092750 thumb-gen: Priority: Embedded cover
20250221 092750 thumb-gen: Res,Qual: 600px,60
20250221 092750 thumb-gen: Px ratio: 1
20250221 092750 thumb-gen: Th width: 600
20250221 092750 thumb-gen: Thm qual: 60
20250221 092750 thumb-gen: Scanning: NAS, NVME, SATA, SDCARD
20250221 093148 thumb-gen: Error: File does not contain ID3v2 tag: NAS/fritzbox/SanDisk-ExtremePro-01/mp3/John Coltrane/The Avant-Garde/05 - Bemsha Swing.mp3
20250221 093245 thumb-gen: Error: File does not contain ID3v2 tag of supported version: v2.2: NAS/fritzbox/SanDisk-ExtremePro-01/Philip Glass/Einstein on the Beach (1979)/Disc 1/1-03 Act I, Scene 2 Trial.mp3
20250221 093245 thumb-gen: Error: File does not contain ID3v2 tag of supported version: v2.2: NAS/fritzbox/SanDisk-ExtremePro-01/Philip Glass/Einstein on the Beach (1979)/Disc 2/2-07 Knee Play 3.mp3
20250221 093246 thumb-gen: Error: File does not contain ID3v2 tag of supported version: v2.2: NAS/fritzbox/SanDisk-ExtremePro-01/Philip Glass/Einstein on the Beach (1979)/Disc 3/3-10 Knee Play 4.mp3
20250221 093246 thumb-gen: Error: File does not contain ID3v2 tag of supported version: v2.2: NAS/fritzbox/SanDisk-ExtremePro-01/Philip Glass/Einstein on the Beach (1979)/Disc 4/4-14 Knee Play.mp3
20250221 093248 thumb-gen: Error: File does not contain ID3v2 tag: NAS/fritzbox/SanDisk-ExtremePro-01/Philip Glass/Joseph Conrad's The Secret Agent/16 - Secret agent ending.mp3
20250221 093251 thumb-gen: Error: File does not contain ID3v2 tag: NAS/fritzbox/SanDisk-ExtremePro-01/Philip Glass/North Star/10 - Montage.mp3
20250221 093256 thumb-gen: Error: File does not contain ID3v2 tag: NAS/fritzbox/SanDisk-ExtremePro-01/Philip Glass/Symphony No. 6 - Plutonian Ode/03 - Movement III.mp3
20250221 093256 thumb-gen: Error: File does not contain ID3v2 tag: NAS/fritzbox/SanDisk-ExtremePro-01/Philip Glass/Symphony No. 8/03 - Symphony 8 - 3rd Movement.mp3
20250221 093256 thumb-gen: Image file: Not a valid file path
20250221 093256 thumb-gen: Error: imagecreatefromstring() failed: NAS/fritzbox/SanDisk-ExtremePro-01/Philip Glass/The Hours/14 - The Hours.mp3
20250221 093258 thumb-gen: Done: 413 folders scanned, 412 thumbs created, 1 already in cache.

The library update stops much earlier. Most music is in mp3/ARTIST/ALBUM/.. (there is also 'Philip Glass'/ALBUM/.. that is searched afterwards) and it only got as far the 'C's. That's actually the furthest it has gotten.
Code:
pi@moode:~ $ moodeutl --mpdlog | tail
Feb 21 09:31 : update: added NAS/fritzbox/SanDisk-ExtremePro-01/mp3/Bothy Band/The Best of the Bothy Band/Bothy Band - The Best of the Bothy Band - 11 - The Death of Queen Jane.mp3
Feb 21 09:31 : update: added NAS/fritzbox/SanDisk-ExtremePro-01/mp3/Bothy Band/The Best of the Bothy Band/Bothy Band - The Best of the Bothy Band - 12 - Green Groves of Erin, The %2f Flowers of Red Hill.mp3
Feb 21 09:31 : update: added NAS/fritzbox/SanDisk-ExtremePro-01/mp3/Caustic Window/Compilation/Caustic Window - Compilation - 01 - JOYREX J4.mp3
Feb 21 09:31 : update: added NAS/fritzbox/SanDisk-ExtremePro-01/mp3/Caustic Window/Compilation/Caustic Window - Compilation - 02 - AFX 114.mp3
Feb 21 09:31 : update: added NAS/fritzbox/SanDisk-ExtremePro-01/mp3/Caustic Window/Compilation/Caustic Window - Compilation - 03 - CORDIALATRON.mp3
Feb 21 09:31 : update: added NAS/fritzbox/SanDisk-ExtremePro-01/mp3/Caustic Window/Compilation/Caustic Window - Compilation - 04 - Italic eyeball.mp3
Feb 21 09:31 : update: added NAS/fritzbox/SanDisk-ExtremePro-01/mp3/Caustic Window/Compilation/Caustic Window - Compilation - 05 - Pigeon Street.mp3
Feb 21 09:31 : update: added NAS/fritzbox/SanDisk-ExtremePro-01/mp3/Caustic Window/Compilation/Caustic Window - Compilation - 06 - ASTROBLASTER.mp3
Feb 21 09:31 : update: added NAS/fritzbox/SanDisk-ExtremePro-01/mp3/Caustic Window/Compilation/Caustic Window - Compilation - 07 - ON the Romance tip.mp3
Feb 21 09:31 : update: added NAS/fritzbox/SanDisk-ExtremePro-01/mp3/Caustic Window/Compilation/Caustic Window - Compilation - 08 - JOYREX J5.mp3


My best guess is that the sd card has problems but any suggestions would be very much appreciated.
Reply
#2
Very odd.

Some things to try:

1. Run a long ping test from the Pi to the NAS. When you examine the stats look for really high mdev (standard deviation), super long rtt's, lot of retries etc. This would indicate a network issue.

2. Install the tree command and check the permissions on the remote directory tree. MPD needs at least read access to the files and read+execute access to all containing directories.


Code:
sudo apt-get install tree

tree -p /path/

3. Check the permissions on the directory and files following the last directory indexed by MPD
Code:
ls -l /path/

4. Try a fresh 9 image on a new SD Card.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Hi Tim,


I just pinged it for 370s and got a low mean+/-dev =4.3+/-0.7. The slowest ping was 12ms.

The permissions also seem fine.

I also just confirmed the image SHA-256.

It must be the sd card. That's my second to fail on the same Pi. It's a Sandisk Ultra 16GB. I'll have a try another brand.
Reply
#4
(02-21-2025, 11:28 AM)s_mury Wrote: Hi Tim,


I just pinged it for 370s and got a low mean+/-dev =4.3+/-0.7. The slowest ping was 12ms.

The permissions also seem fine.

I also just confirmed the image SHA-256.

It must be the sd card. That's my second to fail on the same Pi. It's a Sandisk Ultra 16GB. I'll have a try another brand.

Try surveillance-grade cards. I've been using WD Purple QD101 cards for many years and no issues.
https://www.amazon.com/dp/B088CDTLFX?ref...tle_2&th=1
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
I've used Sandisk Ultra for my players for years with no fails. If you've had another card fail in that Pi, is it worth considering if the Pi might be at fault? Maybe the SD card slot is damaging the card?
----------------
Robert
Reply
#6
(02-21-2025, 11:28 AM)s_mury Wrote: Hi Tim,


I just pinged it for 370s and got a low mean+/-dev =4.3+/-0.7. The slowest ping was 12ms.

The permissions also seem fine.

I also just confirmed the image SHA-256.

It must be the sd card. That's my second to fail on the same Pi. It's a Sandisk Ultra 16GB. I'll have a try another brand.

I consider that a high failure rate for uSD cards. I’ve used SanDisk and Samsung cards for years and had only one fail for reasons other than my own stupidity.

Are your cards genuine SanDisk? Are you using an official RPi power supply? (Probably, but I have to ask Smile)

Unfortunately, MPD is a lousy debugging tool, since mostly it just reports the last file it succeeded with. In any case, it’s curious that your Pi Zero with its old release of moOde is reading the whole library.

Your might want to look at the system journal (journalctl with its various options) to see if there are any suggestive errors or warnings. (I’m away from my systems so can’t post any examples.)

BTW - you don’t have to use a uSD card to contain moOde. I prefer using stubby USB flash drives like the 16 GB SanDisk Ultra Fit. It’s only 7.50USD list, very robust, and easy to flash on any host at hand without searching for an available uSD-to-USB card reader (which always go missing just when I need one. I blame this on my cat.)

Regards,
Kent

PS - I see Robert beat me to it. Next time I won’t stop midway to brew a coffee!
Reply
#7
Thanks for the tips.

I am using the official RPi power supply and genuine Sandisk cards (from Amazon).

I just formatted it as Fat32 and ran h2testw, which writes and reads from every sector of the drive. It found no errors.
So I imaged again but the same thing happened as before.

I need to order a new drive (this time, I'll try usb) and test again.
Reply
#8
So the problem may have something to do with Samba and my router vs moode. I see these errors using journalctl

Code:
Feb 21 21:45:47 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:47 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:47 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:47 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:47 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:47 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:48 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:48 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:48 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:48 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:53 moode kernel: cifs_open_info_to_fattr: 9 callbacks suppressed
Feb 21 21:45:53 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:53 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:53 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:53 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:53 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:55 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:56 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:56 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:57 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:58 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:58 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:58 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:58 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:58 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:58 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:59 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:45:59 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:46:00 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:46:00 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:46:00 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:46:03 moode kernel: cifs_open_info_to_fattr: 9 callbacks suppressed
Feb 21 21:46:03 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:46:03 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:46:04 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:46:04 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:46:05 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:46:05 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:46:05 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:46:05 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:46:05 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:46:06 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:46:08 moode kernel: cifs_open_info_to_fattr: 7 callbacks suppressed
Feb 21 21:46:08 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:46:09 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:46:09 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:46:10 moode kernel: CIFS: VFS: bogus file nlink value 0
Feb 21 21:46:10 moode kernel: CIFS: VFS: \\FRITZ.BOX RFC 1002 unknown response type 0xaf

I'm google searching but haven't found out what's going on yet. Interesting the searching for "kernel: CIFS: VFS: bogus file nlink value 0" brings up people with Fritzboxes.

I previously had an issue that I needed to add noserverino in the mount settings to get samba version >=2 working
Reply
#9
“FritzBox” has come up a number of times in the forum but we in the USA have no experience with their products.

Even though some of my routers of old could provide SMB access to a drive I prefer setting up a separate server but that’s just me.

Good luck.

Regards,
Kent
Reply
#10
In Library Config > Remote NAS Source you can see the default Samba mount flags

Code:
ro,noserverino,cache=none,dir_mode=0777,file_mode=0777
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: