Posts: 14
Threads: 2
Joined: Oct 2023
Reputation:
0
(09-03-2024, 06:55 AM)the_bertrum Wrote: Maybe its time to post a startup log, just to rule out some stuff?
Probably a good idea. After a "semi-crash" I can no longer access the Systems menu to download logs, but perhaps there is a way to do it from SSH? (I guess providing startup logs from a fresh install is not very interesting)
Posts: 1,869
Threads: 43
Joined: Mar 2020
Reputation:
85
On the contrary, startup logs from the pre-crash system can tell us a great deal. The crash could only happen in the presence of some other setting you have chosen for example, and the startup logs will tell us everything you have configured to make it easier to replicate.
If you can ssh into the "crashed" system, then you can get the logs with the command moodeutl -l
----------------
Robert
Posts: 14
Threads: 2
Joined: Oct 2023
Reputation:
0
09-03-2024, 10:20 AM
(This post was last modified: 09-03-2024, 11:20 AM by Tim Curtis.
Edit Reason: place log in code box for readability
)
(09-03-2024, 08:43 AM)the_bertrum Wrote: On the contrary, startup logs from the pre-crash system can tell us a great deal. The crash could only happen in the presence of some other setting you have chosen for example, and the startup logs will tell us everything you have configured to make it easier to replicate.
If you can ssh into the "crashed" system, then you can get the logs with the command moodeutl -l
Thank you, here goes (system restarted after "semi-crash", still cannot access menus):
Code: Last login: Mon Sep 2 21:45:12 2024 from 192.168.1.166
pi@moode:~ $ moodeutl -l
20240902 220116 worker: --
20240902 220116 worker: -- Start moOde 9 series
20240902 220116 worker: --
20240902 220116 worker: Successfully daemonized
20240902 220116 worker: Wait for Linux startup
20240902 220116 worker: Linux startup complete
20240902 220116 worker: Boot config is ok
20240902 220117 worker: Session loaded
20240902 220121 worker: Package locks applied
20240902 220122 worker: File check complete
20240902 220122 worker: Debug logging off
20240902 220122 worker: --
20240902 220122 worker: -- System
20240902 220122 worker: --
20240902 220124 worker: Host name: moode
20240902 220124 worker: RPi model: Pi-3B 1.2 1GB
20240902 220124 worker: moOde release: 9.0.8 2024-08-21
20240902 220124 worker: RaspiOS: 12.6 Bookworm 64-bit
20240902 220124 worker: Linux Kernel: 6.6.31 64-bit
20240902 220124 worker: MPD version: 0.23.14
20240902 220124 worker: User id: pi
20240902 220124 worker: Home folder: /home/pi
20240902 220124 worker: Time zone: Europe/Stockholm
20240902 220124 worker: Kbd layout: se
20240902 220124 worker: HDMI ports(s): on
20240902 220124 worker: HDMI-CEC: off
20240902 220125 worker: Sys LED0: on
20240902 220125 worker: Sys LED1: on
20240902 220125 worker: Reduce power: n/a
20240902 220125 worker: CPU governor: ondemand
20240902 220125 worker: Integ audio: vc4-kms-v3d
20240902 220125 worker: --
20240902 220125 worker: -- Network
20240902 220125 worker: --
20240902 220125 worker: Eth0
20240902 220125 worker: Ethernet: adapter exists
20240902 220125 worker: Ethernet: timeout off
20240902 220125 worker: Ethernet: address not assigned
20240902 220125 worker: Wlan0
20240902 220125 worker: Wireless: adapter exists
20240902 220125 worker: Wireless: country SE
20240902 220125 worker: Wireless: SSID Dr. Sheldon Cooper 2.4
20240902 220125 worker: Wireless: other None
20240902 220125 worker: Wireless: timeout up to 90 secs
20240902 220125 worker: Wireless: connect to Dr. Sheldon Cooper 2.4
20240902 220125 worker: Wireless: method dhcp
20240902 220125 worker: Wireless: address 192.168.1.182
20240902 220125 worker: Wireless: netmask 255.255.255.0
20240902 220125 worker: Wireless: gateway 192.168.1.197
20240902 220125 worker: Wireless: pri DNS 192.168.1.197
20240902 220125 worker: Wireless: domain none found
20240902 220125 worker: --
20240902 220125 worker: -- File sharing
20240902 220125 worker: --
20240902 220125 worker: SMB file sharing: off
20240902 220125 worker: NFS file sharing: off
20240902 220125 worker: DLNA file sharing: off
20240902 220125 worker: --
20240902 220125 worker: -- Special configs
20240902 220125 worker: --
20240902 220125 worker: Plexamp: not installed
20240902 220125 worker: RoonBridge: not installed
20240902 220125 worker: Allo Piano 2.1: not detected
20240902 220125 worker: Allo Boss 2: not detected, OLED script ok
20240902 220125 worker: IQaudIO AMP*: not detected
20240902 220125 worker: --
20240902 220125 worker: -- ALSA debug
20240902 220125 worker: --
20240902 220125 worker: Cards: 0:vc4hdmi 1:empty 2:empty 3:empty
20240902 220125 worker: 4:empty 5:empty 6:empty 7:empty
20240902 220125 worker: Mixers: 0:none 1:none 2:none 3:none
20240902 220125 worker: 4:none 5:none 6:none 7:none
20240902 220125 worker: --
20240902 220125 worker: -- Audio configuration
20240902 220125 worker: --
20240902 220125 worker: Audio device: 0:D30
20240902 220126 worker: ALSA card: is empty, reconfigure to HDMI 1
pi@moode:~ $
Posts: 13,420
Threads: 304
Joined: Mar 2018
Reputation:
545
The log stops abruptly suggesting some sort of breakage. This typically indicates worker.php has crashed. You can test for this using the command pgrep worker.php. If it returns nothing then worker has crashed.
I've reformatted the lines to make it easier to read.
Code: 20240902 220125 worker: --
20240902 220125 worker: -- ALSA debug
20240902 220125 worker: --
20240902 220125 worker: Cards: 0:vc4hdmi 1:empty 2:empty 3:empty
20240902 220125 worker: 4:empty 5:empty 6:empty 7:empty
20240902 220125 worker: Mixers: 0:none 1:none 2:none 3:none
20240902 220125 worker: 4:none 5:none 6:none 7:none
20240902 220125 worker: --
20240902 220125 worker: -- Audio configuration
20240902 220125 worker: --
20240902 220125 worker: Audio device: 0:D30
20240902 220126 worker: ALSA card: is empty, reconfigure to HDMI 1
pi@moode:~ $
Apparently there was a USB audio device (D30) configured but when this log was generated it was either off or unplugged. Thats ok and the response during startup is to reconfigure to HDMI 1.
Here's the code block in worker.php that does that.
Code: } else if ($actualCardNum == ALSA_EMPTY_CARD) {
workerLog('worker: ALSA card: is empty, reconfigure to HDMI 1');
$hdmi1CardNum = getAlsaCardNumForDevice(PI_HDMI1);
$devCache = checkOutputDeviceCache(PI_HDMI1, $hdmi1CardNum);
// Update configuration
phpSession('write', 'adevname', PI_HDMI1);
phpSession('write', 'cardnum', $hdmi1CardNum);
sqlUpdate('cfg_mpd', $dbh, 'device', $hdmi1CardNum);
phpSession('write', 'alsa_output_mode', 'iec958');
phpSession('write', 'alsavolume_max', $devCache['alsa_max_volume']);
sqlUpdate('cfg_mpd', $dbh, 'mixer_type', $devCache['mpd_volume_type']);
updMpdConf();
sysCmd('systemctl restart mpd');
workerLog('worker: MPD config: updated');
I ran a quick test on a Pi that has a USB DAC and no issues after unplugging it and restarting. Audio was reconfigured to HDMI 1.
In order to debug your specific issue I would need to be able to reproduce it on my end.
Posts: 14
Threads: 2
Joined: Oct 2023
Reputation:
0
09-03-2024, 01:48 PM
(This post was last modified: 09-03-2024, 02:03 PM by i5rast.)
(09-03-2024, 12:38 PM)Tim Curtis Wrote: The log stops abruptly suggesting some sort of breakage. This typically indicates worker.php has crashed. You can test for this using the command pgrep worker.php. If it returns nothing then worker has crashed.
I've reformatted the lines to make it easier to read.
Code: 20240902 220125 worker: --
20240902 220125 worker: -- ALSA debug
20240902 220125 worker: --
20240902 220125 worker: Cards: 0:vc4hdmi 1:empty 2:empty 3:empty
20240902 220125 worker: 4:empty 5:empty 6:empty 7:empty
20240902 220125 worker: Mixers: 0:none 1:none 2:none 3:none
20240902 220125 worker: 4:none 5:none 6:none 7:none
20240902 220125 worker: --
20240902 220125 worker: -- Audio configuration
20240902 220125 worker: --
20240902 220125 worker: Audio device: 0:D30
20240902 220126 worker: ALSA card: is empty, reconfigure to HDMI 1
pi@moode:~ $
Apparently there was a USB audio device (D30) configured but when this log was generated it was either off or unplugged. Thats ok and the response during startup is to reconfigure to HDMI 1.
Here's the code block in worker.php that does that.
Code: } else if ($actualCardNum == ALSA_EMPTY_CARD) {
workerLog('worker: ALSA card: is empty, reconfigure to HDMI 1');
$hdmi1CardNum = getAlsaCardNumForDevice(PI_HDMI1);
$devCache = checkOutputDeviceCache(PI_HDMI1, $hdmi1CardNum);
// Update configuration
phpSession('write', 'adevname', PI_HDMI1);
phpSession('write', 'cardnum', $hdmi1CardNum);
sqlUpdate('cfg_mpd', $dbh, 'device', $hdmi1CardNum);
phpSession('write', 'alsa_output_mode', 'iec958');
phpSession('write', 'alsavolume_max', $devCache['alsa_max_volume']);
sqlUpdate('cfg_mpd', $dbh, 'mixer_type', $devCache['mpd_volume_type']);
updMpdConf();
sysCmd('systemctl restart mpd');
workerLog('worker: MPD config: updated');
I ran a quick test on a Pi that has a USB DAC and no issues after unplugging it and restarting. Audio was reconfigured to HDMI 1.
In order to debug your specific issue I would need to be able to reproduce it on my end.
Right. pgrep worker.php returned nothing (Putty SSH). Also correct that the D30 DAC was off during this startup. I understand that debugging is difficult without reproduction. Any other logs that I could provide perhaps? Did you attempt setting up a simple filter and config in CamillaDSP using my initially provided .wav IR file?
Posts: 13,420
Threads: 304
Joined: Mar 2018
Reputation:
545
The code block I posted shows two functions are called right after the log message is printed. Both functions access SQL tables and if for example the tables don't exist or the connection to the SQL database can't be made, breakage will occur.
Non existent tables or not being able to connect to the SQL database itself would suggest something external to moode software is causing the issue.
Posts: 14
Threads: 2
Joined: Oct 2023
Reputation:
0
(09-03-2024, 02:14 PM)Tim Curtis Wrote: The code block I posted shows two functions are called right after the log message is printed. Both functions access SQL tables and if for example the tables don't exist or the connection to the SQL database can't be made, breakage will occur.
Non existent tables or not being able to connect to the SQL database itself would suggest something external to moode software is causing the issue.
I now simply did this and it still "semi-crashed" just like before:
* Install 9.0.8 using Raspberry Pi Imager 1.8.5 and let it verify, went well
* Run it instead on a Rpi Zero 2 W
* It starts up fine. I make no changes/configs at all except:
* Activate CamilladDSP processing with one of the presets
* Make a New CDSP config
* Activate that (empty) config by selecting it in the menu on the top right next to the "m"
* Enter the CDSP pipeline GUI, make two conv filters with one of the already included wav coeffs (L and R) include those two filters as the only items in the pipeline. Save.
* Return home to Moode. Press play and it complains that it can not open sound device. Go to Audio and chose my D30 DAC instead of HDMI. There it crashes, one can tell by the spinning circle at the top right not wanting to stop. I can still return to main screen. However no menu buttons will work thereafter.
I did the above with as well as without the suggested commands from this thread yesterday, same outcome. I also tried with my own as well as already included wav files. Also I tried not pressing play but going to the output device selection directly, no difference.
Feels super odd, espcially when I did not upload a single one of my own IR files.
Should I have made some crucial settings in Moode first before starting with CDSP?
Posts: 13,420
Threads: 304
Joined: Mar 2018
Reputation:
545
09-03-2024, 07:56 PM
(This post was last modified: 09-03-2024, 09:37 PM by Tim Curtis.
Edit Reason: typo
)
Following those steps I am able to repro.
I'll investigate.
Posts: 14
Threads: 2
Joined: Oct 2023
Reputation:
0
I do not get the issue with 8.3.9, all is well there.
Posts: 13,420
Threads: 304
Joined: Mar 2018
Reputation:
545
The bug appears to be an unhandled empty test for certain elements in the config which may be empty for example when creating a new config with no mixers.
Try this latest commit and then reboot.
Code: sudo wget -q https://raw.githubusercontent.com/moode-player/moode/develop/www/inc/cdsp.php -O /var/www/inc/cdsp.php
|