Sad face loop after update

Aug 30 13:36:21 osmc mediacenter[310]: ERROR: Unable to create application. Exiting
Aug 30 13:36:21 osmc mediacenter[310]: *** Error in `/usr/lib/kodi/kodi.bin': free(): invalid pointer: 0x02362ef8 ***

Typically this is caused by either a read only file system (due to corruption) or you have run out of disk space, so please provide the output of these two commands:

df -h
mount

If you have problems like this after every update it suggests an underlying hardware issue such as a problem with the SD card.

osmc@osmc:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 15G 2.0G 12G 14% /
devtmpfs 363M 0 363M 0% /dev
tmpfs 367M 0 367M 0% /dev/shm
tmpfs 367M 5.0M 362M 2% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 367M 0 367M 0% /sys/fs/cgroup
/dev/mmcblk0p1 240M 33M 208M 14% /boot
tmpfs 74M 0 74M 0% /run/user/1000


/dev/sda1 on / type ext4 (rw,noatime,stripe=1024,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=371420k,nr_inodes=92855,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/mmcblk0p1 on /boot type vfat (rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=75148k,mode=700,uid=1000,gid=1000)
sysfs on /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq type sysfs (rw,nosuid,nodev,noexec,relatime)


I’d buy the corruption issue as the Pi1 in the other room usually updates fine.

12GB free and the root file system is read write, so it’s not that.

I notice you have a USB install though - the other system that doesn’t give you problems, is that also USB or is it SD ?

Is your USB drive a thumb drive or spinning drive ?

Did you get any error messages during the update or did the updates complete successfully but then it started crashing ?

At the moment my suspicion is file system corruption but we don’t have enough to go on at the moment.

Can you paste the following logs ?

paste-log /home/osmc/.kodi/temp/kodi.log
paste-log /var/log/apt/term.log
dmesg | paste-log

Yeah, same conclusion on read/write and space.

No, both are USB installs, thumb drive. Transcend jet flash 16GB

No messages during the update (this time), it appeared to update successfully. It gave the sad face just after the OSMC flash screen.

edit: I did run a shutdown command after, to try a fresh reboot. So I don’t know if you might need kodi.old.log

http://paste.osmc.io/cofugimosu


http://paste.osmc.io/ahotatusaj


http://paste.osmc.io/ajisusipuf

Your logs show what the problem is - a corrupt file, belonging to the rbp2-mediacenter-osmc (Kodi) package:

14:19:52 730.952209 T:1956401152   ERROR: Unable to load /usr/lib/kodi/system/libcpluff-arm.so, reason: /usr/lib/kodi/system/libcpluff-arm.so: invalid ELF header
14:19:52 730.955322 T:1956401152   ERROR: ADDONS: Fatal Error, could not load libcpluff
14:19:52 730.955505 T:1956401152   FATAL: CApplication::Create: Unable to start CAddonMgr

Reinstalling the mediacenter package over the top will probably fix this:

sudo apt-get install rbp2-mediacenter-osmc --reinstall

However my concern is that you almost certainly have an underlying hardware instability issue that has caused this. APT does full MD5 integrity tests when extracting files and there are no errors in your term.log during the upgrade process that you would expect to see if the downloaded package was corrupt or if it was unable to write the files to disk correctly, and yet after a reboot a binary file is corrupt.

This can only really be a hardware issue. Something such as a faulty power supply, too much overclock making your Pi unstable, faulty USB thumb drive, or you have too many USB devices connected drawing too much power. (which can cause USB devices to intermittently drop the connection, which would potentially corrupt data that was not yet fully written to the disk on a USB install since your root file system is connected over USB)

OK, running reinstall package now.

Power, possible (who can argue that), but I am running a 2 amp supply, so IDK.

Faulty thumbdrive… Possible, I did have another transcend stick that stopped working and even gparted couldn’t save.

Thumbdrive is the only USB plugged in and GPIO ir receiver is the only item on pins.

Reinstall stopped at 83%, try one last time before I pull the card and reinstall.

The manual package install stopped at 83% ? What do you mean by stopped ? Do you mean it completely hung ? Or were you able to cancel with CTRL-C ?

If even re-installing that package manually hung part way through I fear you might be wasting your time doing a fresh install - you will very likely have problems again if you don’t find the underlying cause.

I would start by trying a different USB drive, or if your SD card is big enough, do an SD only install and test that for a while to see how stable it is.

My mistake, 83% was just the last info registered on my terminal. It went to 83% and went back to promt. After a reboot command it came back up fine.

I may just drop the USB, my SD is 8GB so should be enough to handle the 2GB worth of texture caches etc.

So Kodi is running now ?

Ok, that proves the corrupt file was the cause of the crashing, but it doesn’t answer the question of how it got corrupted. My money is still on a hardware instability issue so I would keep an eye on things as you are likely to have problems again at some point.

Yes, running fine now.

Will do, and thank you for your help DBMandrake. :wink:

edit: I use a rotating/cycling fanart on my home screen movies section, I wonder if the constant reads cause some corruption over time. Will try some changes on the next issue I have.

This should be a red flag on its own. I quickly glanced your post history but couldn’t find another report of this issue.

Go back to a fairly ‘vanilla’ setup. Use an SD card, check your power supply and see if things are still problematic.

In the future, please let us know at the earliest opportunity if you are experiencing problems

Sam

Will do Sam. I don’t always report things that happen to me because I customize things beyond what the “vanilla” user would do. But when something happens repeatedly like this issue it does throw that red flag, and that’s why I asked for help.

I wasn’t sure what caused it all the other times, but corruption does seem like it fits the bill. Sometimes I lose everything just out of the blue, not just from an update. I’ll try to participate a little more to make sure any bugs might be found, but I didn’t want to go crying wolf, lolz.

There is some problem with USB installs because I had them after every update when using USB HDD for system as I wrote in this topic:

Thanks for sharing that. I’m not sure thats what’s happening though. As I said, the Pi in the other room (other than being a Pi1) has had no issues and is very stable. It’s just this one unit that’s giving problems. As DBMandrake said, it’s probably a USB or power issue causing my corruption…

I’m going to wait it out till it happens again, then move to an SD install and lose my USB thumb drive. If it still happens then i’ll look into power issues. But without ever once seeing a colored square in the top corner, I have my doubts there.

I’ve also got it down to a system reinstalling and setting up my Nox skin and other add ons, so not too bad there.

Update: So I just replaced the Pi1 in the main room with a new Pi2, and decided to try a SD install. After getting everything setup the way I liked, I attempted to run texture cache utility on it and cache all the artwork (like I always do).

It took me a while to figure out why caching images was going so slow. I tried resetting network all over the house, wiggling wires, etc. Finally it dawned on me that the SD card can’t handle the read/writes at all. So I scrapped the SD install and went back to a USB install.

Read/writes are now blazing fast. So I hope it stays stable on that unit. :confused:

Ok, so i’m back again. That was quick. First off, did OSMC ditch the monthly updates and go back to pushing more frequent ones? If not, that’s an issue here too.

Pi2 ran an automatic update, and came back with error installing (unknown package). Tried to do some apt-get update and dist-upgrade, but I just seem to be running in circles. Here are some logs again if someone wouldn’t mind taking a look.

kodi log
http://paste.osmc.io/anevicivuq

term log
http://paste.osmc.io/ocigemizuv

dmesg
http://paste.osmc.io/kabanayiva

Bump, still getting multiple updates available every day. Fails when dpkg runs… Sub-process /usr/bin/dpkg returned an error code (2)

dpkg: unrecoverable fatal error, aborting:
 files list file for package 'fonts-dejavu-core' is missing final newline
Log ended: 2015-09-06  13:48:19

This is a problem with the debian package fonts-dejavu-core - either it’s corrupt on the Debian servers or your local copy has been corrupted somehow.

Try

sudo apt-get clean

Which will clear the download cache. Then try updating again. If it’s still not working it’s probably an upstream issue with the Debian mirrors that will be resolved in a few days. (Out of our control)

Thank you for the reply DBMandrake, I’ll bookmark your suggestion if it happens again.

I went ahead and started a fresh install. Tried another cable incase my corruption was from that, but got rainbow box, so swapped cables back.

Tried installing ftp server but it failed, probably because of corruption when installing with the bad power cable.

Wow! ok, back again. Still not sure why updates are trying to install so often, thought they got pushed to once monthly. Anyway, now it’s giving another error.

dpkg: unrecoverable fatal error, aborting: too-long line or missing newline in '/var/lib/dpkg/diversions'

followed by

An error occurred while installing the following package: (unknown package)

Never had issues this frequent before. I still haven’t replaced the thumb drive or power cord/supply, but will do it soon. Logs if anyone would care to take a look.

kodi log

http://paste.osmc.io/fiyapovare

term log

http://paste.osmc.io/ikenajowoy

dmesg

http://paste.osmc.io/zubiruhilu

This is on a 2 day old fresh install!

edit: ordered a new power supply and sd card :wink:

OK, so I replaced the power supply and SD card and problems appear to have gone away. It’s been running for 2 days now with no sad face reboots. Not sure if the problem was power supply (which never gave me any rainbow box warnings) or the USB install that was running. But it is stable once again.

I did accidentally get a UHS class 3 SD card instead of class 1, so we’ll see if that turns out to be a problem. So far the Pi2 seems to be handling the writes with amazing efficiency. Example: when I run Texturecache Maintenance Utility, my whole library can now be cached in less than 30 minutes, whereas it used to take 1 hour and 25 minutes on the USB install.

Thanks @DBMandrake for helping me troubleshoot the logs and narrow things down.

1 Like