Osmc always crashing

Hi,

I installed the latest release of osmc on my raspberry pi3. But it is totally unstable. Every night it crashes which even results in the TV getting turned on.

System logs show this:

Okt 17 02:20:43 osmc mediacenter[415]: *** Error in /usr/lib/kodi/kodi.bin': corrupted double-linked list: 0x58a430b8 *** Okt 17 08:31:58 osmc mediacenter[415]: *** Error in /usr/lib/kodi/kodi.bin’: double free or corruption (!prev): 0x5e56bfe8 ***

kodi was just trying to scan my music library; apart from that it was idle. I wonder if I should use openelec or libreelec instead. Any recommendations?

My first would be to check your power supply and try a different SD card.

1 Like

That behavior you can disable in Settings → Input Devices → CEC

For the rest I would suggest the two suggestions from @ooZee and maybe also enable debug logging for one night and upload complete logs after the crash.

1 Like

Seems I can reproduce the problem quite easily. I just need to activate the database scan for my music library and wait. Eventually kodi will crash and I find these messages in the system log: stacktrace As other processes (such as journald and sshd) keep running just fine, I doubt it is a problem with the hardware.

Journald and sshd don’t touch the GPU:

Okt 17 19:58:23 osmc kernel: bcm2708_fb soc:fb: Failed to allocate GPU framebuffer (-22)

It might be a memory-related problem or (more likely) an issue with the SD card.

So far, you’ve only provided snippets of the log. In your first post you indicate that there was an error message:

Okt 17 02:20:43 osmc mediacenter[415]: *** Error in /usr/lib/kodi/kodi.bin': corrupted double-linked list: 0x58a430b8 *** 
Okt 17 08:31:58 osmc mediacenter[415]: *** Error in/usr/lib/kodi/kodi.bin’: double free or corruption (!prev): 0x5e56bfe8 ***

But in your second log snippet the first line isn’t included. Is that because it wasn’t there or did you not include it this time? A double-linked list might have been created in memory or on the SD card.

If you would like us to help, please provide proper logs.

The logs did not provide any useful information. I can judge as I have two instances of kodi running on some other machines. The good news: The problem is gone. The bad news is: I still do not know why. For unrelated reasons I powered everything down and up again. The system now has been running perfectly stable for more than two days. I even installed audio visualizations and tried every single one of the. No problem at all. Same for watching videos.

It’s a bit unsatisfying to not know the cause of the problems. But maybe it was as simple as a not correctly plugged-in the power. Or some alpha particle hitting the wrong bit causing the memory corruption. I do not think it makes sense to waste any more time trying to understand the issue.

Thanks for you help and sorry for the noise!

In my experience, things like this happen all the time. You reboot or power cycle and it’s gone, hopefully never to return.

And if the problem doesn’t return, you can always blame those damn cosmic rays.

Seems I was too fast. Meanwhile I replaced the raspberry by a vero 4k and still can observe crashes. And the same is true for both my desktop machine running kodi on a regular linux distribution as well as my htpc with libreelec.

Quote
On PC:
Nov 12 11:36:06 Terra kernel: Vaapi-Output[5437]: segfault at 1d1 ip 000000000095e3b1 sp 00007f06027fb850 error 4 in kodi.bin[400000+11d2000]
Nov 12 11:36:40 Terra systemd-coredump[5447]: Process 5271 (kodi.bin) of user 1000 dumped core.
On vero 4k:
Nov 13 00:18:43 vero kernel: kodi.bin[1058]: unhandled level 3 translation fault (11) at 0x08169038, esr 0x92000007
Nov 13 00:18:43 vero kernel: pgd = ffffffc05f7ab000
Nov 13 00:18:43 vero kernel: [08169038] *pgd=000000005de1f003, *pmd=000000005f997003, *pte=0000000000000000
Nov 13 00:18:43 vero kernel:
Nov 13 00:18:43 vero kernel: CPU: 0 PID: 1058 Comm: kodi.bin Not tainted 3.14.29-42-osmc #1
Nov 13 00:18:43 vero kernel: task: ffffffc05f0e8000 ti: ffffffc062798000 task.ti: ffffffc062798000
Nov 13 00:18:43 vero kernel: PC is at 0xf6304264
Nov 13 00:18:43 vero kernel: LR is at 0xf644a643
Nov 13 00:18:43 vero kernel: pc : [<00000000f6304264>] lr : [<00000000f644a643>] pstate: 28070010
Nov 13 00:18:43 vero kernel: sp : 00000000ffaed774
Nov 13 00:18:43 vero kernel: x12: 00000000c81b2d18
Nov 13 00:18:43 vero kernel: x11: 00000000ffaed83c x10: 00000000020c97d8
Nov 13 00:18:43 vero kernel: x9 : 0000000004e0f408 x8 : 0000000001757444
Nov 13 00:18:43 vero kernel: x7 : 00000000f646e000 x6 : 0000000000000000
Nov 13 00:18:43 vero kernel: x5 : 0000000004e0f408 x4 : 00000000ffaed7bc
Nov 13 00:18:43 vero kernel: x3 : 00000000676f6c2f x2 : 0000000004e0f404
Nov 13 00:18:43 vero kernel: x1 : 0000000008168f18 x0 : 00000000c4afb014
Nov 13 00:18:43 vero kernel:
Nov 13 00:18:44 vero sudo[1051]: pam_unix(sudo:session): session closed for user osmc
Nov 13 00:18:44 vero mediacenter[334]: Kodi exited with return code 139 after 29 hours, 57 minutes and 29 seconds

So I am seeing crashes on four different devices (Intel desktop, Intel HTPC, raspberry pi and vero 4k) with three different operating systems (openSUSE, libreelec and osmc). Seems kodi itself is still buggy. Note that the vero 4k was idle last night when it crashed.

I’m also having big problems when switching to SD channels on TV. Quite often I will only get some still picture and only hear the audio until finally everything freezes. Funnily this does never happen for HD channels. And while it is quite often on three of my systems, so far it never happened on the vero 4k. So the vero 4k currently is the least unstable platform for running kodi.

Good luck. Without a complete set of proper logs there is little anyone can do. Since this is quite likely an issue with Kodi itself, I’d suggest you provide them with proper logs.

I’ll reply with some thoughts on this shortly

Sam

Have you brought this up on the Kodi forums? As it’s happening on other OSs, it does not sound like a Kodi problem.

Are you using a shared MySQL library? Maybe rebuild your database.

I can say that I have 1 V4K and 2 Pi 2Bs running OSMC (shared MySQL) and do not have this problem.

I do not understand this argument!? Since it does happen on various hardware with different operating systems, I would expect this to be a kodi problem, as this is the component that is common on all the systems…

No, no shared database. Every system is self-contained. Of course the vero depends on the HTPC as vdr backend. On my desktop I would expect possible problems with manual modifications, but all the other three systems are running unmodified installations of osmc and libreelec respectively.

Yes, I know quite some people running kodi systems without problems. There are also some vero 4k and many raspberry users. But it seems I’m the only one trying to use live TV on such a system. I suspect some memory corruption happening that will get noticed only later on when the corrupted memory gets accessed.

I will re-setup the raspberry without PVR client and do some testing.

Obviously it was a typo, @bmillham meant “it does not sound like a OSMC problem” and therefore he pointed to Kodi Forum

“some” :thinking: I assume you mean “some” thousands

Well if you check osmc forum for tvheadend you would see many people use OSMC for Live TV

Hi,

From these two snippets (on Vero 4K and Pi), I think you are running out of memory.
The Vero 4K is probably more stable because it has more available memory (2GB) to spare.

I’d try a fresh install of OSMC with a minimal amount of add-ons. If you have a library – can you comment as to how large it is?

As always, a full debug log will help. See How to submit a useful support request - General - OSMC.

Cheers

Sam

As @fzinken pointed out, that was a typo on my part, I meant that it sounds like a Kodi problem. Bad proofreading on my part.

Ah, I see. Thanks for clarification!

By “some are using vero 4k” I meant to say “some of my friends” :slight_smile:

For historic reasons I’m using vdr as backend. It seems most people nowadays are using tvheadend and I will give it a try on the weekend. Currently this problem is not that urgent for me. So far I had only one single crash with the vero 4k. And the raspberry is running fine since some hours, but without any PVR client installed. I need to gather some more data before looking deeper into this issue.

root@vero:/home/osmc/.kodi/userdata/Database# l -h
total 55M
drwxr-xr-x 3 osmc osmc 4.0K Nov 14 19:06 .
drwxr-xr-x 9 osmc osmc 4.0K Nov 12 23:37 ..
-rw-r--r-- 1 osmc osmc  28K Jan  1  2015 ADSP0.db
-rw-r--r-- 1 osmc osmc 1.3M Nov 14 18:46 Addons27.db
drwxr-xr-x 2 osmc osmc 4.0K Jan  1  2015 CDDB
-rw-r--r-- 1 osmc osmc 3.4M Nov 14 19:06 Epg11.db
-rw-r--r-- 1 osmc osmc  47M Nov 12 02:40 MyMusic60.db
-rw-r--r-- 1 osmc osmc 408K Nov 14 18:04 MyVideos107.db
-rw-r--r-- 1 osmc osmc  32K Nov 14 18:46 TV29.db
-rw-r--r-- 1 osmc osmc 2.6M Nov 14 08:42 Textures13.db
-rw-r--r-- 1 osmc osmc  20K Nov 12 02:39 ViewModes6.db

Thanks for your ideas, but do not waste any more time on this right now. I will keep an eye on it for the next days and if the problem happens again, I will delete the database and try again. It is hard to investigate this sort of problems.

I think I finally know what is going on here. Apparently the DVB adapter on the PVR server is going to break. Last night I was watching TV with the vero and suddenly more and more stations would show artifacts and corrupted video. And this time also HD stations were affected. The dish is fine and there were no atmospheric problems since a different receiver was working quite fine at the same time.

So this would explain why I’m seeing all those problems on so many different devices. When thinking about it, I observed the crashes always only after having watched live TV. Of course crashing still would constitute some bug in the error handling of kodi, but I understand that this sort of problem is extremely hard to handle as it can hardly be reproduced. And the crashes never were immediately. Most of the time I would just see corrupted video or a frozen picture. And it seems the vero can cope much better with such situations than the other systems.

I will replace the DVB adapter and mark this thread as solved once I have tested it.

I’m still experiencing a segmentation fault on my vero4k every night:

root@vero:~# journalctl -x | grep "unhandled level 3 translation fault" -A 16
Nov 29 18:56:03 vero kernel: Announce[651]: unhandled level 3 translation fault (11) at 0x00000008, esr 0x92000007
Nov 29 18:56:03 vero kernel: pgd = ffffffc060302000
Nov 29 18:56:03 vero kernel: [00000008] *pgd=00000000608f5003, *pmd=0000000060985003, *pte=0000000000000000
Nov 29 18:56:03 vero kernel: 
Nov 29 18:56:03 vero kernel: CPU: 2 PID: 651 Comm: Announce Not tainted 3.14.29-42-osmc #1
Nov 29 18:56:03 vero kernel: task: ffffffc060187500 ti: ffffffc0627f8000 task.ti: ffffffc0627f8000
Nov 29 18:56:03 vero kernel: PC is at 0x1bd0164
Nov 29 18:56:03 vero kernel: LR is at 0x1bd01a9
Nov 29 18:56:03 vero kernel: pc : [<0000000001bd0164>] lr : [<0000000001bd01a9>] pstate: 600a0030
Nov 29 18:56:03 vero kernel: sp : 00000000f5202d80
Nov 29 18:56:03 vero kernel: x12: 0000000000000000 
Nov 29 18:56:03 vero kernel: x11: 00000000ff962404 x10: 00000000f5203624 
Nov 29 18:56:03 vero kernel: x9 : 0000000000000000 x8 : 000000000290ed88 
Nov 29 18:56:03 vero kernel: x7 : 00000000f5202d8c x6 : 00000000020c97d8 
Nov 29 18:56:03 vero kernel: x5 : 00000000f6424ea8 x4 : 0000000000000000 
Nov 29 18:56:03 vero kernel: x3 : 0000000000000000 x2 : 00000000d1c97e5c 
Nov 29 18:56:03 vero kernel: x1 : 0000000000000000 x0 : 000000000290ed88 
--
Nov 30 08:17:50 vero kernel: kodi.bin[6781]: unhandled level 3 translation fault (11) at 0x00000028, esr 0x83000007
Nov 30 08:17:50 vero kernel: pgd = ffffffc0555e6000
Nov 30 08:17:50 vero kernel: [00000028] *pgd=00000000564e1003, *pmd=000000005f531003, *pte=0000000000000000
Nov 30 08:17:50 vero kernel: 
Nov 30 08:17:50 vero kernel: CPU: 0 PID: 6781 Comm: kodi.bin Not tainted 3.14.29-42-osmc #1
Nov 30 08:17:50 vero kernel: task: ffffffc054c80000 ti: ffffffc0620a0000 task.ti: ffffffc0620a0000
Nov 30 08:17:50 vero kernel: PC is at 0x28
Nov 30 08:17:50 vero kernel: LR is at 0x4094f1
Nov 30 08:17:50 vero kernel: pc : [<0000000000000028>] lr : [<00000000004094f1>] pstate: 88030010
Nov 30 08:17:50 vero kernel: sp : 00000000ffa80928
Nov 30 08:17:50 vero kernel: x12: 00000000020cac0c 
Nov 30 08:17:50 vero kernel: x11: 00000000020c97d8 x10: 0000000002dd65d4 
Nov 30 08:17:50 vero kernel: x9 : 0000000002dd6600 x8 : 0000000002dd65d4 
Nov 30 08:17:50 vero kernel: x7 : 0000000000000000 x6 : 0000000002dd6598 
Nov 30 08:17:50 vero kernel: x5 : 000000000490d960 x4 : 00000000003fddad 
Nov 30 08:17:50 vero kernel: x3 : 00000000ffa8094c x2 : 00000000020943a0 
Nov 30 08:17:50 vero kernel: x1 : 0000000000000028 x0 : 0000000002dd6598 
--
Dez 01 01:57:01 vero kernel: kodi.bin[7564]: unhandled level 3 translation fault (11) at 0x00000000, esr 0x83000007
Dez 01 01:57:01 vero kernel: pgd = ffffffc0601b9000
Dez 01 01:57:01 vero kernel: [00000000] *pgd=000000006184e003, *pmd=0000000054f29003, *pte=0000000000000000
Dez 01 01:57:01 vero kernel: 
Dez 01 01:57:01 vero kernel: CPU: 2 PID: 7564 Comm: kodi.bin Not tainted 3.14.29-42-osmc #1
Dez 01 01:57:01 vero kernel: task: ffffffc05f7fca80 ti: ffffffc062318000 task.ti: ffffffc062318000
Dez 01 01:57:01 vero kernel: PC is at 0x0
Dez 01 01:57:01 vero kernel: LR is at 0x4094f1
Dez 01 01:57:01 vero kernel: pc : [<0000000000000000>] lr : [<00000000004094f1>] pstate: 88030010
Dez 01 01:57:01 vero kernel: sp : 00000000ff8ab218
Dez 01 01:57:01 vero kernel: x12: 00000000020cac0c 
Dez 01 01:57:01 vero kernel: x11: 00000000020c97d8 x10: 00000000030a55d4 
Dez 01 01:57:01 vero kernel: x9 : 00000000030a5600 x8 : 00000000030a55d4 
Dez 01 01:57:01 vero kernel: x7 : 0000000000000000 x6 : 00000000030a5598 
Dez 01 01:57:01 vero kernel: x5 : 0000000005002ae8 x4 : 00000000003fddad 
Dez 01 01:57:01 vero kernel: x3 : 00000000ff8ab23c x2 : 00000000020943a0 
Dez 01 01:57:01 vero kernel: x1 : 0000000000000000 x0 : 00000000030a5598 
--
Dez 02 07:04:14 vero kernel: kodi.bin[9294]: unhandled level 3 translation fault (11) at 0x00000028, esr 0x83000007
Dez 02 07:04:14 vero kernel: pgd = ffffffc056684000
Dez 02 07:04:14 vero kernel: [00000028] *pgd=000000005510a003, *pmd=0000000054925003, *pte=0000000000000000
Dez 02 07:04:14 vero kernel: 
Dez 02 07:04:14 vero kernel: CPU: 1 PID: 9294 Comm: kodi.bin Not tainted 3.14.29-42-osmc #1
Dez 02 07:04:14 vero kernel: task: ffffffc06132f500 ti: ffffffc0626d4000 task.ti: ffffffc0626d4000
Dez 02 07:04:14 vero kernel: PC is at 0x28
Dez 02 07:04:14 vero kernel: LR is at 0x4094f1
Dez 02 07:04:14 vero kernel: pc : [<0000000000000028>] lr : [<00000000004094f1>] pstate: 88030030
Dez 02 07:04:14 vero kernel: sp : 00000000ffd696c8
Dez 02 07:04:14 vero kernel: x12: 00000000020cac0c 
Dez 02 07:04:14 vero kernel: x11: 00000000020c97d8 x10: 00000000030795d4 
Dez 02 07:04:14 vero kernel: x9 : 0000000003079600 x8 : 00000000030795d4 
Dez 02 07:04:14 vero kernel: x7 : 0000000000000000 x6 : 0000000003079598 
Dez 02 07:04:14 vero kernel: x5 : 00000000046e6bb8 x4 : 00000000003fddad 
Dez 02 07:04:14 vero kernel: x3 : 00000000ffd696ec x2 : 00000000020943a0 
Dez 02 07:04:14 vero kernel: x1 : 0000000000000029 x0 : 0000000003079598 

As the timestamps indicate the system always is idle when this happens.

And we still have yet to see a complete set of logs…

1 Like