Kodi segfaults

Hi all,

I applied the last update yesterday (apt-get update && apt-get dist-upgrade) and rebooted. Since then I get the sad face. Looking at the logs it says that kodi returned error with error 139. I have been looking for around and I can’t find anything that could generat this.

If I run manually /usr/lib/kodi/kodi.bin I get the same errors as in the system log, which are not descriptive at all:
$ /usr/lib/kodi/kodi.bin
unknown
unknown
Segfault

I have also tried reinstalling rbp2-mediacenter-osmc package with no luck.

I am running out of ideas - the other things installed in this raspberry seem to work ok.

Thanks

What are these other things? You may have made some changes to your device which are responsible for the crashes.

A full log will certainly be more descriptive. Please upload a full set of logs

Sorry for the shitty report, shame on me.

The other things are openmediavault - this includes samba, netatalk and I have also installed duplicati, but that is not a package and it is installed in /opt

I can’t tell anything else, and overall nothing that could be affecting kodi to the extent of segfaulting. I have a kodi plugin to watch IP TV, but my test moving out /home/osmc/.kodi didn’t work. That should have removed that plugin, shouldn’t that?

I can’t upload the full logs - it says the max size is exceeded - here is the output of grab-logs -XKvp Please tell me if you need more: http://paste.osmc.io/uconirezoz

Running gdb

Starting program: /usr/lib/kodi/kodi.bin
[Thread debugging using libthread_db enabled]
Using host libthread_db library “/lib/arm-linux-gnueabihf/libthread_db.so.1”.
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 4194394 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 2147483738 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 2115564 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 268435546 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 2147502133 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 1067220 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 1073741914 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 182498 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 536889609 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 2147502494 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 281076 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 536871002 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 536890057 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 16777306 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 67128273 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 541819 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 2097242 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 2116649 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 67128514 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 134217818 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 67109040 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 2147483738 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 33574794 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 268455853 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 2117684 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 53393 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 268456302 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 16798125 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 284162 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 134217818 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 153511 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 34625476 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 67131456 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 268458064 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 55415 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 4216991 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 2120023 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 67108864 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 67132820 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 56874 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 2121632 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 1073766376 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 286802 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 286864 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 680366 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 134242791 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 134242809 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 549388 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 16806435 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 8413811 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 33582900 >= 28907 for section .strtab' BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 1073770476 >= 28907 for section .strtab’
BFD: /usr/osmc/lib/libsqlite3.so.0: invalid string offset 29141 >= 28907 for section `.strtab’
Cannot access memory at address 0x0

Program received signal SIGILL, Illegal instruction.
0x76a4de68 in ?? () from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0

Can’t check logs, not enough data.

  • If overclocked, turn it off.
  • Also check PSU
  • Try move your .kodi/userdata/ SQLite database away and see if the issue persists

As I told, the logs were not very useful. Please tell me anything else I can provide.

About your comments:

  • not overclocked
  • PSU is original and all other programs seems to work ok
  • I will a try with other PSU. I haven’t seen any other failure, anyway.

By not enough data, I mean that I am on holiday, where I currently am getting about 14.4Kbps down, so can’t easily grab your logs.

The SQLite messages don’t look like a crash to me. You get SIGILL because we link Kodi against libcrypto, which tries to test for processor features and uses SIGILL to handle this, but you can ignore this with:

handle SIGILL nostop

Remember to pass full arguments to kodi.bin (check /usr/bin/mediacenter for argv) to reduce the number of variables.

Sam

Passing full arguments and ignoring SIGILL, I get the two “unknown” messages that get registered on the log, and this output in GDB (after all the sqlite messages)

Cannot access memory at address 0x0
 
Program received signal SIGILL, Illegal instruction.
[New Thread 0x74a983f0 (LWP 13676)]
unknown
unknown
[New Thread 0x740ff3f0 (LWP 13690)]
[New Thread 0x736ff3f0 (LWP 13691)]
[New Thread 0x72eff3f0 (LWP 13692)]
[New Thread 0x724ff3f0 (LWP 13693)]
[New Thread 0x71cff3f0 (LWP 13694)]
[New Thread 0x714ff3f0 (LWP 13695)]
[New Thread 0x70cff3f0 (LWP 13696)]
[New Thread 0x704ff3f0 (LWP 13697)]
[New Thread 0x6fcff3f0 (LWP 13698)]

Program received signal SIGSEGV, Segmentation fault.
0x0210a428 in ?? ()

Grab the backtrace (bt thread apply all)

sudo apt-get install rbp1/rbp2-mediacenter-debug-osmc for full symbols

This is with my curren kodi DB http://paste.osmc.io/mumowozosa.pas

Starting with a clean DB (moving .kodi out), it is the same: http://paste.osmc.io/xasugapuqo.vala

Some advance - after reinstalling armv7-libsqlite-osmc package the error was different:

terminate called after throwing an instance of 'dbiplus::DbErrors'

So I removed again the .kodi dir and now everything works! I think that something happened when installing that package when upgrading, and this made the db to get corrupt (or something).

In my (old) .kodi directory I have both a userdata/Database and userdata/db directories. The former has only one db and a CDDB folder. The userdata/db folder has the usual dbs - are some of them a copy of the others? I have been able to restore all my config just copying them over the Database directory.

Thanks

This sounds like you have some bad filesystem corruption. Check your SD card, power supply, and consider a reinstall. You will likely have some problems further down the line. You certainly shouldn’t have to reinstall any packages manually via APT.