Sudden frown loop

OSMC was idling. I switched inputs on the TV to do something else, I switched back to the RPi to see a frown face, it holds about ten seconds, screen flashes black, then repeats.

Now I’ve had a lot of trouble with OSMC dying on me, so last time it happened, I rebuilt the system on two different SD cards, and got both up to the point of having the codecs authorized and the PVR client configured (I’m using OSMC mostly as a MythTV front end). So I pulled the plug on the RPi, switched to the backup SD card and restarted.

I get the OSMC splash screen, then the looping frown screen. Huh? Disconnected Ethernet and USB, no change. Using good power supply. Backup card had a working system on it when I shut it down last time.

Because this is happening on both the ‘production’ SD card and on the backup, it almost has to be a hardware issue. Any ideas? Since the frowning face isn’t exactly a useful error message…

Now to see if it’s possible to log into the system and get anything out of it (such as system logs)…

Got some system logs:

http://paste.osmc.io/agimotodab

And based on advice from another, similar thread, the system journal:

http://paste.osmc.io/kofoteduhi

Also based on that thread I checked the file systems, all seems OK there:

mount: http://paste.osmc.io/oxavelirem

osmc@osmc:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        362M     0  362M   0% /dev
tmpfs           367M  5.1M  362M   2% /run
/dev/mmcblk0p2   14G  1.4G   12G  11% /
tmpfs           367M     0  367M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           367M     0  367M   0% /sys/fs/cgroup
/dev/mmcblk0p1  240M  149M   91M  63% /boot
tmpfs            74M     0   74M   0% /run/user/1000

I would suspect a file corruption except that I got the same frown loop on my backup card, which I have not touched since I built it a month or two ago.

I wondered if it could be heat, so I shut the system down for a couple of hours, no change.
I’m watching on an NTSC television via composite video (NO HDMI at all), and I saw lots of errors in the log about CEC, so I added the line to the config.txt to ignore CEC completely.

Did you verify the backup at the time?

A fresh install will quickly let you see where the problem is

The sad face is usually caused by kodi crashing. There is no kodi log in your logs file (just an error).

This is the tell tale line from your log journalctl file

Sep 25 02:41:33 osmc mediacenter[284]: Kodi exited with return code 139 after 0 hours, 0 minutes and 0 seconds

which indicates kodi is crashing with a segmentation fault immediately it tries to start. Could be caused by corruption in the space kodi stores it’s files; try running mv /home/osmc/.kodi /home/osmc/.kodi.old and reboot and see what happens. If you still have a problem try the paste log again and see if a kodi log is produced.

I tried renaming the .kodi directory and that accomplished nothing. What is weird about this is that I had two working systems, both at the same version, the difference being that one was in daily use and the other hadn’t been in the system since I set it up (and so it also didn’t have any video add-ins configured yet) and the backup system crashed in precisely the same way.

I found another thread by searching for the “Kodi exited code 139” and per Sam’s instructions there I reinstalled Kodi and that fixed this version. I haven’t tested the backup yet. But it almost had to be something with the DVR handling or with the network or hardware that triggered this…how else could two different systems, one offline at the time of the crash, both get corrupted at the same time?!

It is very difficult to conceive of a way that both systems (including one which had been off-line since last known working) could be affected in the same way without the cause being external or hardware related in some way.

I don’t know though how something external could cause that response from kodi that wouldn’t also cause it in a new installation.

I’m out of my depth there, but if you ever find out I’d love to know what it was!

That is why I asked about it here :sunglasses:

Now that I have the production card working, I haven’t tried the backup yet. Wouldn’t it be crazy if that card, to which I have done nothing, now works?

Update: Things haven’t gotten any weirder. After installing Kodi on the production card using sudo apt-get install rbp2-mediacenter-osmc --reinstall my ‘production’ card is working again. Since this whole thing was so strange to begin with, I tried the ‘backup’ card.

I’m feeling better about the general order of the Universe today, because the backup card is still failing, while the fixed card is still working.

So now I guess I’ll just do a quick reinstall on the backup card and get them back in sync with each other.

It sounds like perhaps something was corrupt in your kodi installation. Do you use a shared library? Or shared media paths? Maybe the corruption occurred there and not on the card - which would explain it’s persistence once the card was swapped out.

Either that or have you by any chance run the command sudo apt-get upgrade on either card? That is a definite no-no in OSMC as it can cause many problems at a future unspecified date.

I suppose at least you have returned to service, hopefully the underlying cause has been eliminated.

We need to alias this, to stop it from being run.

There are some challenges in this: not breaking anything; working with sudo and su

Can it just be stated in motd at SSH login?

Yes – but do people actually read these things? We already outline not to do this in the Wiki, but no one seems to notice.

A user must seek the wiki page. The MOTD will be printed in front of their eyes upon SSH login.

That would save a good deal of problems for a lot of people who post on the forum if it can be done given the possible challenges of sudo/su etc.

It can be done, just haven’t had a chance to look at it yet.