v15 Crash when updating MySQL (MariaDB 10.0.21) [SOLVED]
#1
Thumbs Down 
Hi all,

I've just update my OSMC to Kodi 15 on my Rpi1 and he crash all time since reboot.
I've made some research and here it is: Kodi crash when update my database.

Here, the last line of the crash file:
Code:
23:50:01  37.035194 T:3023913520  NOTICE: Running database version Addons19
23:50:01  37.035950 T:3023913520   DEBUG: Initialize, updating databases...
23:50:01  37.045544 T:3023913520  NOTICE: Running database version ViewModes6
23:50:01  37.054676 T:3023913520  NOTICE: Running database version Textures13
23:50:01  37.080715 T:3023913520  NOTICE: Running database version MyMusic52
23:50:01  37.145203 T:3023913520   ERROR: Unable to open database: kodi-videos93 [1049](Unknown database 'kodi-videos93')
23:50:01  37.151928 T:3023913520   ERROR: Unable to open database: kodi-videos92 [1049](Unknown database 'kodi-videos92')
23:50:01  37.158058 T:3023913520   ERROR: Unable to open database: kodi-videos91 [1049](Unknown database 'kodi-videos91')
23:50:01  37.167965 T:3023913520  NOTICE: Old database found - updating from version 90 to 93


############### END LOG FILE ################

############ END Kodi CRASH LOG #############
with on screen a nice "Segmentation Fault"

I've try everything I could, check my mysql user, check rights, delete a lot of time the new database.
Nothing work !

I've try to increase debug level, but nothing in it, last line is:
Code:
NOTICE: Old database found - updating from version 90 to 93

Second crash, I've got this:
Code:
00:37:42  53.549809 T:3024138800  NOTICE: Running database version Addons19
00:37:42  53.557438 T:3024138800  NOTICE: Running database version ViewModes6
00:37:42  53.563831 T:3024138800  NOTICE: Running database version Textures13
00:37:42  53.583508 T:3024138800  NOTICE: Running database version MyMusic52
00:37:42  53.612919 T:3024138800   ERROR: SQL: The table does not exist
                                            Query: SELECT idVersion FROM version
So, my new database was sucessfully created but someting wrong in it (maybe last crash when updating)

I know Kodi didn't support MariaDB, but I've no error before Insengard (v15).
Maybe is in OSMC build, but no one have this error so I've post here waiting for some answer.

Thanks all
Reply
#2
Hi

Unfortunately, we noticed in our testing that the database upgrade sometimes crashes.

00:37:42 53.612919 T:3024138800 ERROR: SQL: The table does not exist

I recommend you drop the 93 schema and let Kodi try and upgrade your database again.

Also upload output of mysql> show databases; and show processlist;

Sam
Reply
#3
(2015-08-13, 00:53)Sam.Nazarko Wrote: Unfortunately, we noticed in our testing that the database upgrade sometimes crashes.

00:37:42 53.612919 T:3024138800 ERROR: SQL: The table does not exist

I recommend you drop the 93 schema and let Kodi try and upgrade your database again.
I know, I read it in MySQL Upgrading FAQ
Unfortunately, it crash over and over again...

(2015-08-13, 00:53)Sam.Nazarko Wrote: Also upload output of mysql> show databases; and show processlist;

Code:
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| SBFspot            |
| information_schema |
| kodi-videos90      |
| kodi-videos93      |
| mysql              |
| performance_schema |
+--------------------+

And show processlist will show nothing because crash is very quick (try to launch Kodi via terminal after disable on boot)
Reply
#4
Unfortunately, I doubt this is OSMC related, and we may not be able to do much here. The best way of finding out would be to try and upgrade via a non-OSMC client, such as the Windows version of Kodi

Sam
Reply
#5
(2015-08-13, 03:01)Sam.Nazarko Wrote: Unfortunately, I doubt this is OSMC related, and we may not be able to do much here. The best way of finding out would be to try and upgrade via a non-OSMC client, such as the Windows version of Kodi
Ok, today I've taked time to make some test.

So, first I boot on a Linux Mint 17.2 because I don't want to corrupt my Debian. I'ved install Kodi via repository, push my sources.xml and my advancedsettings.xml and it crash again, with same message "Segmentation fault"
Here the log crop:
Code:
:10:18 T:139717754296256  NOTICE: Starting Kodi (15.0 Git:2f34a0c). Platform: Linux x86 64-bit
08:10:18 T:139717754296256  NOTICE: Using Release Kodi x64 build
08:10:18 T:139717754296256  NOTICE: Kodi compiled Jul 22 2015 by GCC 4.8.4 for Linux x86 64-bit version 3.13.11 (199947)
08:10:18 T:139717754296256  NOTICE: Running on Ubuntu 14.04.2 LTS, kernel: Linux x86 64-bit version 3.16.0-38-generic
...
08:10:18 T:139717754296256  NOTICE: Contents of special://profile/advancedsettings.xml are...
                                            <advancedsettings>
                                              <videodatabase>
                                                <type>mysql</type>
                                                <host>192.168.1.202</host>
                                                <port>3306</port>
                                                <user>kodi</user>
                                                <pass>X4TOd5H84exE</pass>
                                                <name>kodi-videos</name>
                                              </videodatabase>
                                              <videolibrary>
                                                <importwatchedstate>true</importwatchedstate>
                                                <importresumepoint>true</importresumepoint>
                                              </videolibrary>
                                            </advancedsettings>
08:10:18 T:139717754296256 WARNING: VIDEO database configuration is experimental.
...
08:10:18 T:139717754296256  NOTICE: Running database version Addons19
08:10:18 T:139717754296256  NOTICE: Running database version ViewModes6
08:10:18 T:139717754296256  NOTICE: Running database version Textures13
08:10:18 T:139717754296256  NOTICE: Running database version MyMusic52
08:10:18 T:139717754296256   ERROR: Unable to open database: kodi-videos93 [1049](Unknown database 'kodi-videos93')
08:10:18 T:139717754296256   ERROR: Unable to open database: kodi-videos92 [1049](Unknown database 'kodi-videos92')
08:10:18 T:139717754296256   ERROR: Unable to open database: kodi-videos91 [1049](Unknown database 'kodi-videos91')
08:10:18 T:139717754296256  NOTICE: Old database found - updating from version 90 to 93

So, I reboot my computer (later) again on Linux Mint 17.2 and I download sources of Kodi 15.1 RC1. After sucessfull compil I launch it and it work. Great. So I push my 2 previous config and relauch it and it crash again.
Here the crop log:
Code:
21:30:00 T:139685416880064  NOTICE: Starting Kodi (15.1-RC1 Git:2015-08-10-31c22e4). Platform: Linux x86 64-bit
21:30:00 T:139685416880064  NOTICE: Using Debug Kodi x64 build
21:30:00 T:139685416880064  NOTICE: Kodi compiled Aug 13 2015 by GCC 4.8.4 for Linux x86 64-bit version 3.13.11 (199947)
21:30:00 T:139685416880064  NOTICE: Running on Ubuntu 14.04.2 LTS, kernel: Linux x86 64-bit version 3.16.0-38-generic
...
21:30:00 T:139685416880064  NOTICE: Contents of special://profile/advancedsettings.xml are...
                                            <advancedsettings>
                                              <videodatabase>
                                                <type>mysql</type>
                                                <host>192.168.1.202</host>
                                                <port>3306</port>
                                                <user>kodi</user>
                                                <pass>X4TOd5H84exE</pass>
                                                <name>kodi-videos</name>
                                              </videodatabase>
                                              <videolibrary>
                                                <importwatchedstate>true</importwatchedstate>
                                                <importresumepoint>true</importresumepoint>
                                              </videolibrary>
                                            </advancedsettings>
21:30:00 T:139685416880064 WARNING: VIDEO database configuration is experimental.
...
21:30:00 T:139685416880064  NOTICE: Running database version Addons19
21:30:00 T:139685416880064   DEBUG: Initialize, updating databases...
21:30:00 T:139685416880064  NOTICE: Running database version ViewModes6
21:30:00 T:139685416880064  NOTICE: Running database version Textures13
21:30:00 T:139685416880064  NOTICE: Running database version MyMusic52
21:30:00 T:139685416880064   ERROR: Unable to open database: kodi-videos93 [1049](Unknown database 'kodi-videos93')
21:30:00 T:139685416880064   ERROR: Unable to open database: kodi-videos92 [1049](Unknown database 'kodi-videos92')
21:30:00 T:139685416880064   ERROR: Unable to open database: kodi-videos91 [1049](Unknown database 'kodi-videos91')
21:30:00 T:139685416880064  NOTICE: Old database found - updating from version 90 to 93

Second launch, I've got this:
Code:
21:31:18 T:139852220278720  NOTICE: Running database version Addons19
21:31:18 T:139852220278720   DEBUG: Initialize, updating databases...
21:31:18 T:139852220278720  NOTICE: Running database version ViewModes6
21:31:18 T:139852220278720  NOTICE: Running database version Textures13
21:31:18 T:139852220278720  NOTICE: Running database version MyMusic52
21:31:18 T:139852220278720   ERROR: SQL: The table does not exist
                                            Query: SELECT idVersion FROM version

So, any idea ??
Reply
#6
Just to be sure, I've make same test but with Helix 14.2 and it work !!!
I can view my library on my computer, update it with my last files and clean it just to be sure.
Close and relauch it, still working with my updated database.

Here some crop log:
Code:
22:52:23 T:140034705610688  NOTICE: Starting Kodi (14.2 Git:2015-08-13-7cc53a9-dirty). Platform: Linux x86 64-bit
22:52:23 T:140034705610688  NOTICE: Using Debug Kodi x64 build
22:52:23 T:140034705610688  NOTICE: Kodi compiled Aug 13 2015 by GCC 4.8.4 for Linux x86 64-bit version 3.13.11 (199947)
22:52:23 T:140034705610688  NOTICE: Running on Ubuntu 14.04.2 LTS, kernel: Linux x86 64-bit version 3.16.0-38-generic
...
22:52:23 T:140034705610688  NOTICE: Contents of special://profile/advancedsettings.xml are...
                                            <advancedsettings>
                                              <videodatabase>
                                                <type>mysql</type>
                                                <host>192.168.1.202</host>
                                                <port>3306</port>
                                                <user>kodi</user>
                                                <pass>X4TOd5H84exE</pass>
                                                <name>kodi-videos</name>
                                              </videodatabase>
                                              <videolibrary>
                                                <importwatchedstate>true</importwatchedstate>
                                                <importresumepoint>true</importresumepoint>
                                              </videolibrary>
                                            </advancedsettings>
22:52:23 T:140034705610688 WARNING: VIDEO database configuration is experimental.
...
0:52:23 T:140034705610688  NOTICE: Running database version Addons16
00:52:23 T:140034705610688   DEBUG: Initialize, updating databases...
00:52:23 T:140034705610688  NOTICE: Running database version ViewModes6
00:52:23 T:140034705610688  NOTICE: Running database version Textures13
00:52:23 T:140034705610688  NOTICE: Running database version MyMusic48
00:52:23 T:140034705610688  NOTICE: Running database version kodi-videos90
00:52:23 T:140034705610688  NOTICE: Running database version TV26
00:52:23 T:140034705610688  NOTICE: Running database version Epg8
00:52:23 T:140034705610688   DEBUG: Initialize, updating databases... DONE
00:52:23 T:140034705610688  NOTICE: start dvd mediatype detection
00:52:23 T:140034705569536  NOTICE: Thread DetectDVDMedia start, auto delete: false
00:52:23 T:140034705569536   DEBUG: Compiled with libcdio Version 0.83
00:52:23 T:140034705610688   DEBUG: DPMS: supported power-saving modes: SUSPEND OFF STANDBY
00:52:23 T:140034705610688   DEBUG: CAnnouncementManager - Announcement: OnClear from xbmc
00:52:23 T:140034705610688   DEBUG: GOT ANNOUNCEMENT, type: 2, from xbmc, message OnClear
...

OK, so it's working in 14.2, let's try in 15.1 RC1 => CRASH !

So, the problem I've got on my library is only on Isengard (v15) Confused
Reply
#7
it works with helix, cause it uses an older DB.

Try again with 15.1rc1.
- install gdb
- enable debugging
- Delete the broken v93 DBs and let it upgrade again.

if it still fails, provide the crashlog
Reply
#8
@mitch911: What is required is a usable crashlog, which you're not providing.

I'm not sure if there's a debug-enabled version of OSMC you can try, but if not and you're not sure how to generate a crashlog from your own build then (and I promise I'm not trying to convert you!) can you try installing this debug-enabled OpenELEC build on to a spare SD card as this build will automatically generate a detailed crashlog.

You'll need to create at least a 384MB FAT partition (see here for manual Linux install instructions) then:
  1. set gpu_mem=96 in config.txt in order that gdb has enough RAM to process the core dump
  2. create cmdline.txt:
    Code:
    boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 quiet ssh
  3. boot OpenELEC
  4. enable debug logging in Kodi GUI
  5. connect with ssh (username:root, password:openelec)
  6. in /storage/.kodi/userdata, configure advancedsettings.xml with your database settings
  7. restart kodi ("systemctl restart kodi", or reboot)
  8. wait for kodi to crash during the database migration, create crashlog and then automatically restart
  9. upload the latest crashlog to a pastebin site with the following command:
    Code:
    paste $(ls -1art /storage/.kodi/temp/kodi_crashlog* | tail -1)
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#9
(2015-08-14, 08:24)wsnipex Wrote: it works with helix, cause it uses an older DB.

Try again with 15.1rc1.
- install gdb
- enable debugging
- Delete the broken v93 DBs and let it upgrade again.

if it still fails, provide the crashlog

Job done, here it is:
Code:
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /mnt/tmp/kodi151/kodi.bin...done.
/home/mint/core.file: No such file or directory.
(gdb) thread apply all bt
(gdb) run
Starting program: /mnt/tmp/kodi151/kodi.bin
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py", line 63, in <module>
    from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named 'libstdcxx'
[New Thread 0x7fffdd6c1700 (LWP 19989)]
[Thread 0x7fffdd6c1700 (LWP 19989) exited]
[New Thread 0x7fffdd6c1700 (LWP 19990)]
[New Thread 0x7fffe16c2700 (LWP 19991)]
[New Thread 0x7fffe0ec1700 (LWP 19992)]
[New Thread 0x7fffe0282700 (LWP 19993)]
[New Thread 0x7fffdfa81700 (LWP 19994)]
[New Thread 0x7fffca390700 (LWP 19997)]
[Thread 0x7fffca390700 (LWP 19997) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff02cea03 in _IO_vfprintf_internal (s=s@entry=0x7fffffffa620,
    format=<optimized out>,
    format@entry=0x1a6f6a8 "Can't copy schema for table '%s'\nError: %s",
    ap=ap@entry=0x7fffffffa798) at vfprintf.c:1661
1661    vfprintf.c: No such file or directory.

@Milhouse

I know is not a complete crash log, but you will see nothing new. The file end when he want to update the database.
Nothing after. I've post the last line of the crash log. I'm not sure it's helpful because there is nothing useful...
http://pastebin.com/GEiwCFqw
And I reproduce the segmentation fault on my computer, so I will debug on it. Much easier
Reply
#10
Well part of the problem is that an integer is being handled as a string when displaying the error, which leads to the segfault:

https://github.com/xbmc/xbmc/blob/master...t.cpp#L280
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#11
(2015-08-14, 10:34)mitch911 Wrote:
(2015-08-14, 08:24)wsnipex Wrote: it works with helix, cause it uses an older DB.

Try again with 15.1rc1.
- install gdb
- enable debugging
- Delete the broken v93 DBs and let it upgrade again.

if it still fails, provide the crashlog

Job done, here it is:

What about enabling debugging, as the kodi.log would then include all the SQL statements leading up to the statement that fails. We now know the reason for the segfault (that's a straight up bug), but we still don't know which table can't be created.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#12
Just to be sincere:
Code:
MariaDB [(none)]> show grants for 'kodi'@'%';
+--------------------------------------------------------------------------------------------------------------+
| Grants for kodi@%                                                                                            |
+--------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'kodi'@'%' IDENTIFIED BY PASSWORD '*FAE53F8FFEF5EB8222496E10C050FFF76526FDE9' |
+--------------------------------------------------------------------------------------------------------------+
Reply
#13
Sorry guys, but also with debug there is no info: http://pastebin.com/raeLKb7g
Reply
#14
Then it must be the first SQL statement that fails.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#15
(2015-08-14, 10:52)Milhouse Wrote: Then it must be the first SQL statement that fails.

Sorry but no... I search it since the beginning but every time is missing
Reply

Logout Mark Read Team Forum Stats Members Help
Crash when updating MySQL (MariaDB 10.0.21) [SOLVED]0