Sad Smiley on boot (loop) (Pi2)

Hello guys,

I experience a sad smiley boot loop for a couple of days now. I have no clue what might have caused an error. The last thing I installed was the FirefoxSyncServer, but OSMC was running for days flawlessly (as far as I can tell).
With OSMC I installed: nginx, mysql, php5-fpm, firefoxSyncServer 1.5 (newest) and after receiving the smiley, I did update/dist-upgrade.

sudo journalctl | paste-log

paste-log .kodi/temp/kodi.log

I guess the line (jounralctl): "Oct 14 08:56:16 osmc mediacenter[889]: Kodi exited with return code 139 after 0 hours, 0 minutes and 2 seconds"
gives the reason, why kodi is crashing. But I am no professional and I have no clue what to do now.
Does anyone have hint, what to look for and what to try for my installation?


You changed nxinx’s default port or disabled the Kodi web server, right?


the kodi web server port was changed to 8080, if I remember correctly. Right now I can not remember if I disabled the kodi web server, but somehow I was forced to change the port to make my yatse work parallel to nginx.
And the nginx listens on port 80, [::]:80, 443 and [::]:443

that configuration worked for me for weeks with automated reboots every night.

Exit code 139 means that Kodi crashed with a segmentation fault - which unfortunately is just a very generic type of crash caused by an invalid memory access, typically by trying to dereference a null pointer. In other words a bug in Kodi.

Other than that there are no clues in your log what the cause might be, especially when kodi does not have debugging enabled. I would start by stopping any services like nginx that might be running a webserver to see if Kodi launches - if it does go into Kodi’s settings and change the port or disable the webserver.

If that doesn’t help you could try doing a forced reinstall of Kodi - in theory it should not be necessary but maybe you have suffered some file system corruption. For a Pi 2 it would be:

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

Then reboot. If that doesn’t help, try renaming your .kodi directory so a new one is created - if this helps then something is probably corrupt in your .kodi folder, whether it be one of the databases, configuration files etc, in which case you would need to find it through a process of trial and error. It is also possible to enable debug mode using advancedsettings.xml to gather more information in the Kodi log:

Thank you very much for your detailed answer, DBMandrake!
I will give your hints a try later on, when I have time to. I will give a report on how the different steps worked out.


Without nginx/php5-fpm running mediacenter won’t start as well.

I tryed sudo killall mediacenter and then sudo mediacenter.
it gives me

Can’t open device file: /dev/vcio (-1)
Try creating a device file with: sudo mknod /dev/vcio c 100 0

  • failed to open vchiq instance

and then trying sudo mknod /dev/vcio c 100 0 returns

mknod: '/dev/vcio': File exists

I have no clue what I am doing here :smiley: What it the vcio device? and shall I try to remove and rebuild it?

uname -a

Make sure your system is fully up to date too


uname -a

Linux osmc 4.2.3-2-osmc #1 SMP PREEMPT Mon Oct 12 01:58:40 UTC 2015 armv7l GNU/Linux

Seems like you are missing /dev/vchiq, but this should be created automatically…

You can try mknod that, but unsure how you lost it.

mknod /dev/vchiq c 252 0
udevadm trigger


mknod /dev/vcio c 100

mknod: '/dev/vcio': File exists

mknod /dev/vchiq c 252 0

mknod: '/dev/vchiq': File exists

May these files got corrupted somehow? May I delete these files in order to recreate them using the mknod command?

If they exist, but Kodi can’t access them, then udev is not applying the correct rules. You can confirm with

chown -R osmc:osmc /dev/vchiq /dev/vcsm /dev/vcio && chmod 664 /dev/vchiq /dev/vcsm /dev/vcio.

and then sudo systemctl restart mediacenter

Note: this is not a fix, just a test



That ownerships must have been changed somehow… I can not imagine how, but your tip with chown of the devices did the trick! I did not check the ownership before prompting the chown, so I can not tell if chown or chmod did the trick (or both) but the sad smiley has gone.

Great! Thank you!
I guess I should do a fast backup now :smiley:

This is not really a permanent fix. Run this command to fix it for good:

sudo apt-get update && sudo apt-get install --reinstall rbp-userland-osmc


Hum … Sadly it won’t work after reboot. I need to prompt

 chown -R osmc:osmc /dev/vchiq /dev/vcsm /dev/vcio && chmod 664 /dev/vchiq /dev/vcsm /dev/vcio


sudo systemctl restart mediacenter

everytime after rebooting.

I am getting afraid of having to reinstall the whole system Oo

Can you post a full debug log again ?

grab-logs -A

Even if you do have to re-install it would be nice to post mortem why and find out if it is a bug with OSMC or whether it is just a result of disk / filesystem corruption.

Hey DBMandrake,

sure I will post it. How do I get the debug mode?

sudo: grap-logs: command not found
-bash: grap-logs: command not found

grab not grap :wink:

omg… shame on me! Anyway :wink: There you go. I hope there is no sensitive data given :smile:

I get the same error.
Journalctl log:
Kodi log:

Tried to reinstall kodi, no success.

If I manually kill Kodi and then restart it, this comes up:

sudo mediacenter
Starting Kodi…
Can’t open device file: /dev/vcio (-1)
Try creating a device file with: sudo mknod /dev/vcio c 100 0

  • failed to open vchiq instance
    *** Error in `/usr/lib/kodi/kodi.bin’: free(): invalid pointer: 0x031a5cfc ***
    Kodi exited with return code 134 after 0 hours, 0 minutes and 1 seconds

Your filesystem has likely experienced corruption

Run sudo apt-get install --reinstall rbp-userland-osmc