System freezes after Aug Update

Since the update, I come back to TV and its att he home page but its totally unresponsive

no SMB, SSH, Web Interface

looking at the logs i see this

2024-08-29 20:02:37.827 T:5546 info : CActiveAESink::OpenSink - initialize sink
2024-08-29 20:02:42.545 T:5546 info : CAESinkALSA::Initialize - Requested layout FL, FR
2024-08-29 20:02:43.390 T:5546 info : CAESinkALSA::Initialize - set digital codec 0
2024-08-29 20:02:45.337 T:5546 info : CAESinkALSA::Initialize - Attempting to open device “default”
2024-08-29 20:03:35.744 T:5546 info : CAESinkALSA::Initialize - Opened device “default”
2024-08-29 20:03:37.400 T:5546 info : CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2024-08-29 20:03:38.344 T:5546 info : CAESinkALSA::InitializeHW - Using data format AE_FMT_S24NE4
2024-08-29 20:03:40.592 T:5546 info : CAESinkALSA::Initialize - speaker layout 0
2024-08-29 20:03:50.457 T:5546 error : CAESinkALSA - snd_pcm_writei(-32) Broken pipe - trying to recover
2024-08-29 20:04:10.750 T:5546 error : Skipped 3 duplicate messages…
2024-08-29 20:04:03.842 T:5546 error : CAESinkALSA - snd_pcm_writei(-32) Broken pipe - trying to recover
2024-08-29 20:04:16.106 T:5546 error : CAESinkALSA - snd_pcm_writei(-32) Broken pipe - trying to recover
2024-08-29 20:04:27.709 T:5546 error : Skipped 2 duplicate messages…
2024-08-29 20:04:27.184 T:5546 error : CAESinkALSA - snd_pcm_writei(-32) Broken pipe - trying to recover
2024-08-29 20:04:58.093 T:8626 info : Skipped 1 duplicate messages…
2024-08-29 20:04:57.745 T:8626 info : weather.metoffice: Fetching Daily Forecast for ‘Wakefield (324229)’ from the Met Office…
2024-08-29 20:05:13.080 T:5546 error : CAESinkALSA - snd_pcm_writei(-32) Broken pipe - trying to recover
2024-08-29 20:05:28.222 T:5546 error : Skipped 2 duplicate messages…

this repeats on till

2024-08-29 20:17:47.692 T:5546 error : Skipped 2 duplicate messages…
2024-08-29 20:17:47.016 T:5546 error : CAESinkALSA - snd_pcm_writei(-32) Broken pipe - trying to recover

then end of file

Hi

It’s hard to tell the issue with partial logs. Please try checking for updates again and make sure your device is fully up to date.

If the issue persists please provide some full logs via My OSMC.

Sam

Cheers Sam

Do I need to turn logs on? And can it not show all data on screen

There’s been no further updates to system just checked

To get a better understanding of the problem you are experiencing we need more information from you. The best way to get this information is for you to upload logs that demonstrate your problem. You can learn more about how to submit a useful support request here.

Depending on the used skin you have to set the settings-level to standard or higher, in summary:

  • enable debug logging at settings->system->logging

  • reboot the OSMC device twice(!)

  • reproduce the issue

  • upload the log set (all configs and logs!) either using the Log Uploader method within the My OSMC menu in the GUI or the ssh method invoking command grab-logs -A

  • publish the provided URL from the log set upload, here

Thanks for your understanding. We hope that we can help you get up and running again shortly.

OSMC skin screenshot:

1 Like

cheers I know how to do that, but when I enable this, top left shows

Log output file
Mem usage
CPU usage

this is fine when the issue can be replicated straight away, this could be 24hrs later and dont want to watch tv with them in corner all time

Then put <loglevel>1</loglevel> into .kodi/userdata/advancedsettings.xml

Changed this in log went to reboot and system locked up

login as: osmc
osmc@192.168.0.222’s password:
Linux osmcCAH1982 4.9.269-60-osmc #1 SMP PREEMPT Wed Aug 28 00:45:28 UTC 2024 a arch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Aug 31 14:05:02 2024 from 192.168.0.108
osmc@osmcCAH1982:~$ grab-logs -A
Grabbing log UNAME …
Grabbing log cmdline …
Grabbing log Debian version …
Grabbing log OSMC Build Information …
An error occurred while grabbing OSMC Build Information:
FileNotFoundError: [Errno 2] No such file or directory: ‘/etc/osmc_build_info’
Grabbing log GUI Settings (abridged) …
Grabbing log guisettings.xml …
Masking private information …
Grabbing log advancedsettings.xml …
Masking private information …
Grabbing log sources.xml …
Masking private information …
Grabbing log fstab …
Masking private information …
Grabbing log mounts …
Grabbing log OSMC Packages …
Grabbing log All Other Packages …
Grabbing log APT term.log …
Grabbing log APT history.log …
Grabbing log APT sources.list …
Grabbing log APT apt.conf.d …
Grabbing log APT preferences.d …
Grabbing log APT sources.list.d …
Grabbing log System Journal …
Grabbing log lircd.conf …
Grabbing log init.d …
Grabbing log systemd …
Grabbing log Kernel Message Log …
Grabbing log Memory …
Grabbing log Diskspace …
Grabbing log /boot Contents …
Grabbing log Display Cap CTA …
Grabbing log Display Cap VESA …
Grabbing log Display Cap 3D …
Grabbing log User Display Overrides …
Grabbing log Display Mode …
Grabbing log EDID …
Grabbing log Audio Cap …
Grabbing log edid-decode …
Grabbing log ifconfig …
Grabbing log Kodi Log …
Masking private information …
Grabbing log Kodi Old Log …
Masking private information …
Writing logs to temp file …
Dispatching logs …
Exception Details:

Traceback (most recent call last):
File “/usr/bin/grab-logs”, line 1051, in dispatch_logs
raise Exception(‘Log file too large for upload’)
Exception: Log file too large for upload

Failed to upload log files, copying to /boot instead. (Unable to verify)

think ive got the file is 10.7mb, but on here says I cant upload txt

OK so I had any system freezes in 10 days, so turned the logging off

Came to system last night and its unresponsive, web page interface loads but it slow and doesnt do much, SSH logged in again really slow, remote did nothing

As i was busy I left it and after 20 seconds or so, got the unhappy face and system restarted

Can someone advise best way to diagnose, log files seem too big to upload

You could upload the larger log files to something like MEGA or Dropbox.

Do I need to enable any log in the advanced settings?. Not in the menu as that shows details on screen

Debug logging would be useful.

Hi Sam, so got home

remote doesnt really move, or you hear clicks but everything is sluggish, like waiting minutes to move, then its just shown time only, no content or menus

Web interface loads up but then goes to waiting to load content

SSH let me log on, soon as you type password wait for minutes, then could finally run TOP

I can add this if needed for next time

Then put <loglevel>1</loglevel> into .kodi/userdata/advancedsettings.xml

waited for 15 mins, still not done anything so have to switch it off / on at mains, then run the grab logs

https://paste.osmc.tv/ucihatamew

let me know if you need anything else, happy to test

Logs show:

2024-09-15 07:25:38.439 T:4455  warning <general>: Process directory '/mnt/NAS-Media/TV Shows/Richard Hammond's Workshop/' does not exist - skipping scan.
2024-09-15 07:25:38.440 T:4455     info <general>: VideoInfoScanner: Finished scan. Scanning for video info took 29547 ms

(and many other directories). Do these actually exist on the NAS?
Then there are MySQL errors in your log.

So it’s either that there is a problem scraping directories that don’t exist or with the MySQL issue you have a networking problem.

Hi Sam

No the directories/files wont exist, I wish OSMC/kodi if it didnt exist it removed them, I generally watch a TV program then delete it from NAS, as i was only using the OSMC through web interface.

So once a week i`d then remove that program off kodi through the interface

I can start to delete through kodi if that will make a difference?

The MySQL server is always on

Rebuilt the video library, so doesnt have them repeats for shows that dont exist

but… how often should this run

2024-09-16 18:43:16.311 T:3018 info : VideoInfoScanner: Starting scan …
2024-09-16 18:43:30.648 T:3018 info : VideoInfoScanner: Finished scan. Scanning for video info took 14363 ms
2024-09-16 18:43:31.754 T:3017 info : VideoInfoScanner: Starting scan …
2024-09-16 18:43:46.189 T:3017 info : VideoInfoScanner: Finished scan. Scanning for video info took 14467 ms
2024-09-16 18:43:47.335 T:3042 info : VideoInfoScanner: Starting scan …
2024-09-16 18:44:01.680 T:3042 info : VideoInfoScanner: Finished scan. Scanning for video info took 14383 ms
2024-09-16 18:44:01.878 T:3062 info : VideoInfoScanner: Starting scan …
2024-09-16 18:44:19.169 T:3062 info : VideoInfoScanner: Finished scan. Scanning for video info took 17318 ms
2024-09-16 18:44:20.358 T:3018 info : VideoInfoScanner: Starting scan …

I have auto library update addon, but thats only set to run once a day, uninstalled update and reconfigured now seems fine (previously not changed setting for years)

XBMC backup, also started to show a error, seems config file changed how times set. (same with this havent updated it in years)

So think its all working ok now, thanks

does that look normal for osmc when just sat at home screen?

This has been known to cause problems in the past.
There is a ‘Clean Library’ function to delete items that are not detected / available.

You could try ‘Update library on startup’; this should clean your library automatically. When you want to retrigger a scan or have finished/deleted watching some TV; go to Power → Exit. Kodi will restart after a few seconds and perform this operation.

cheers Sam

yeah in Auto Update, its set to clean after everyscan, but tbh Kodi does a weird thing

Like lets say you have “Simpsons” folder and you remove a episode after the scan it disapears from Kodi next day as expected (update runs in night)

but then say you delter the full Folder, next day it shows no episodes, but on Kodi it still shows it in TV Show listing as empty, So had to manually delete them, I did have a addon that auto removed them but that become obsolete a few updates ago.

Jellyfin etc, if it knows the show doesnt exist on disk no more removes it from interface

Auto update definetly has issues, its set only to run scan at 7.00 videos and 8.00 for music

the Videos it seems to get stuck in a loop, not just doing one scan but many for about 20 mins

Solution I have done is custom code

#!/bin/bash

LOG_FILE="/home/osmc/.kodi/temp/kodi.log"

# Function to wait for the video scan to finish
wait_for_video_scan_to_finish() {
  echo "Video library update started."
  START_TIME=$(date +%s)

  tail -F -n0 "$LOG_FILE" | while read LOG_LINE; do
    if echo "$LOG_LINE" | grep -q "VideoInfoScanner: Starting scan"; then
      echo "Video scan detected, waiting for it to finish..."
      break
    fi
  done

  tail -F -n0 "$LOG_FILE" | while read LOG_LINE; do
    LOG_TIME_STR=$(echo "$LOG_LINE" | grep -oP '\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}')
    if [ -n "$LOG_TIME_STR" ]; then
      LOG_TIME=$(date -d "$LOG_TIME_STR" +%s)
      if [ "$LOG_TIME" -ge "$START_TIME" ]; then
        if echo "$LOG_LINE" | grep -q "VideoInfoScanner: Finished scan"; then
          echo "Video scan finished."
          break
        fi
      fi
    fi
  done
}

# Function to wait for the music scan
wait_for_music_scan_to_finish() {
  echo "Music library update started."
  START_TIME=$(date +%s)

  tail -F -n0 "$LOG_FILE" | while read LOG_LINE; do
    LOG_TIME_STR=$(echo "$LOG_LINE" | grep -oP '\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}')
    if [ -n "$LOG_TIME_STR" ]; then
      LOG_TIME=$(date -d "$LOG_TIME_STR" +%s)
      if [ "$LOG_TIME" -ge "$START_TIME" ]; then
        if echo "$LOG_LINE" | grep -q "My Music: Scanning for music info using worker thread"; then
          echo "Music scan finished."
          break
        fi
      fi
    fi
  done
}

# Trigger the video library update
kodi-send --action="UpdateLibrary(video)"
wait_for_video_scan_to_finish

# Run the video cleanup directly with kodi-send
kodi-send --action="CleanLibrary(video)" &>/dev/null &

# Trigger the music library update
kodi-send --action="UpdateLibrary(music)"
wait_for_music_scan_to_finish

# Run the music cleanup directly with kodi-send
kodi-send --action="CleanLibrary(music)" &>/dev/null &

then execute in cron at a set time and it only runs once

So in the error logs the only ones left are these

2024-09-22 17:16:37.806 T:2986     info <general>: Selected Logind/UPower as PowerSyscall
2024-09-22 17:16:37.807 T:2986    error <general>: DBus error: org.freedesktop.DBus.Error.ServiceUnknown - The name org.freedesktop.UPower was not provided by any .service files
2024-09-22 17:16:37.807 T:2986     info <general>: LogindUPowerSyscall - UPower not found, battery information will not be available
2024-09-22 17:16:37.950 T:2986     info <general>: UDisks: Added /media/SDCard
2024-09-22 17:16:37.996 T:2986     info <general>: CKeyboardLayoutManager: loading keyboard layouts from special://xbmc/system/keyboardlayouts...
2024-09-22 17:16:38.130 T:2986    error <general>: [xkb] couldn't find a Compose file for locale "C"
                                                   
2024-09-22 17:16:38.130 T:2986  warning <general>: CLibInputKeyboard: Failed to compile localized compose table, composed key support will be disabled
2024-09-22 17:16:38.149 T:2986    error <general>: AML: no rw on /sys/module/amlvideodri/parameters/freerun_mode
2024-09-22 17:16:38.150 T:2986    error <general>: AML: no rw on /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
2024-09-22 17:16:38.150 T:2986    error <general>: AML: no rw on /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
2024-09-22 17:16:38.150 T:2986    error <general>: AML: no rw on /sys/module/di/parameters/bypass_prog

These aren’t really errors.

Is there still a problem?