Solved kodi-gbm (2:18.0+git20181023.1820-beta4) crash [ needed to modify kodi.service ]
#1
I'm using kodi-gbm unstable ppa on ubuntu cosmic amd64. Updated to 18.0 beta 4 earlier today and I'm getting a crash which keeps me from getting to the display at all. (GBM has worked beautifully for me for months.) Kodi Beta 3 from the unstable PPA didn't have an issue.

Here's the last bit in the kodi log. (The OpenGL line is always the last line.):

10:40:23.155 T:140481374878336   DEBUG: Selected UDev as storage provider
10:40:23.155 T:140481374878336    INFO: RetroPlayer[PROCESS]: Registering process control for GBM
10:40:23.155 T:140481374878336    INFO: RetroPlayer[RENDER]: Registering renderer factory for OpenGL

Here's what I see from dmesg:

[   50.959542] kodi-gbm[4960]: segfault at 0 ip 00007fa45f8eef11 sp 00007fffa52c6a58 error 4 in libc-2.28.so[7fa45f78d000+171000]
[   50.959546] Code: 84 00 00 00 00 00 0f 1f 00 31 c0 c5 f8 77 c3 66 2e 0f 1f 84 00 00 00 00 00 89 f9 48 89 fa c5 f9 ef c0 83 e1 3f 83 f9 20 77 1f <c5> fd 74 0f c5 fd d7 c1 85 c0 0f 85 df 00 00 00 48 83 c7 20 83 e1

Logs:
Advanced kodi log: https://paste.ubuntu.com/p/pk5HRt2zGN/
Ubuntu logs: https://paste.ubuntu.com/p/2BX2J6gcdF/
GDB: https://paste.kodi.tv/posavoxubo
Reply
#2
Confirmed that kodi-gbm starts fine with a self-compiled kodi 18 beta 3 install.

I guess the next step is a git bisect?
Reply
#3
yes, bisect would be great
Reply
#4
just to make sure, are you trying to start via SSH?
That's known to be broken and is being worked on
Reply
#5
I'm using "systemctl start kodi" after installing the deb packages my build produces. (I'm using the debian folder inside the build from the current ppa builds.)

It clearly did work for beta 3, but not for beta 4. Bisecting, but it might be a couple days before I find the relevant commit.
Reply
#6
can you start it manually from the console? If yes https://github.com/xbmc/xbmc/pull/14689 should help
Reply
#7
(2018-10-24, 22:21)wsnipex Wrote: can you start it manually from the console? If yes https://github.com/xbmc/xbmc/pull/14689 should help

This is what I get from the console:

/usr/lib/x86_64-linux-gnu/kodi/kodi-gbm -fs --standalone --tty=/dev/tty1
ERROR: failed to open tty: /dev/tty1
ERROR: Unable to create GUI. Exiting

It isn't too much of a problem for me to go to console if necessary instead of SSHing in to start kodi. But since the systemd service stopped working, it's pretty easy for me to just use that as a metric of whether this is working on this bisection process.
Reply
#8
(2018-10-24, 22:21)wsnipex Wrote: can you start it manually from the console? If yes https://github.com/xbmc/xbmc/pull/14689 should help
 So the funny thing is that particular commit seems closely related to the problematic commit.

Here's what git bisect is telling me:

git bisect bad
913a5fa6bf90ac7effbbd2cbb0d4c2ee3f7efa62 is the first bad commit
commit 913a5fa6bf90ac7effbbd2cbb0d4c2ee3f7efa62
Author: Lukas Rusak <[email protected]>
Date:   Mon Oct 15 22:08:31 2018 -0700

    windowing/gbm: add VT handler

:040000 040000 0b95594346c3b092de6913a2ef93d917307fecfa bf90c2c4889ab754986649e8a387375bcf804015 M      xbmc

So that's this here: https://github.com/xbmc/xbmc/pull/14627
Reply
#9
Here's the entire git bisect log:

git bisect start
# bad: [9d3a68a7cbcfeb7b68a32e8fbbb3511256cd89a0] Merge pull request #14585 from tylerszabo/xspf_playlist
git bisect bad 9d3a68a7cbcfeb7b68a32e8fbbb3511256cd89a0
# good: [c2e1b316f5679540f68ea37cba84d1bc2046b71b] Merge pull request #14502 from garbear/fix-ignore-input
git bisect good c2e1b316f5679540f68ea37cba84d1bc2046b71b
# good: [556f85e617b9619cf14eb076a992daf890de3ad6] [windows] pass ADDONS_TO_BUILD only if give as argument
git bisect good 556f85e617b9619cf14eb076a992daf890de3ad6
# good: [47805fab26e66050d4698518145f218b7df57842] [playlist] Cleanup includes.
git bisect good 47805fab26e66050d4698518145f218b7df57842
# bad: [ab2abe5745350e3270ac82af909e32af75e94bec] Merge pull request #14586 from lobermann/curfile_exists_get_fallback
git bisect bad ab2abe5745350e3270ac82af909e32af75e94bec
# bad: [a3f5e1e73bde74192cb1a793a81c1172ecbae369] Merge pull request #14625 from lrusak/clean-shutdown
git bisect bad a3f5e1e73bde74192cb1a793a81c1172ecbae369
# bad: [a6c1a4f483f37808ed2e31cf36b36288396ade5c] Merge pull request #14627 from lrusak/vt-handler
git bisect bad a6c1a4f483f37808ed2e31cf36b36288396ade5c
# good: [d6218df4e15186fe83b8e2d4d42784fce89a4d50] Merge pull request #14638 from notspiff/cyears
git bisect good d6218df4e15186fe83b8e2d4d42784fce89a4d50
# good: [69abe46287cfd9f8b7498c9bb4249187eccf7b54] Merge pull request #14646 from Rechi/cmake/addons
git bisect good 69abe46287cfd9f8b7498c9bb4249187eccf7b54
# bad: [913a5fa6bf90ac7effbbd2cbb0d4c2ee3f7efa62] windowing/gbm: add VT handler
git bisect bad 913a5fa6bf90ac7effbbd2cbb0d4c2ee3f7efa62
# first bad commit: [913a5fa6bf90ac7effbbd2cbb0d4c2ee3f7efa62] windowing/gbm: add VT handler
Reply
#10
I have only tested this with PR 14689 applied, but it should also work without it.
try with this systemd service(adjust user/group if needed):
Code:
[Unit]
Description = kodi-standalone using gbm
Requires = dbus.service
After = systemd-user-sessions.service network.target sound.target network-online.target

[Service]
User = kodi
Group = kodi
Type = simple
SupplementaryGroups = video audio plugdev input cdrom
PAMName=login
#ExecStart = /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi -- --windowing gbm --tty=/dev/tty3 --standalone
ExecStart = /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi -- --windowing gbm --standalone
StandardInput=tty-force
TTYPath=/dev/tty3
Restart = on-abort

[Install]
WantedBy = multi-user.target
Reply
#11
Well THAT works!

FYI the prior kodi.service had 
ExecStart = /usr/bin/kodi-standalone

I forget if I did anything else special to get gbm working aside from making sure no xinit lines were commented out and installing kodi-gbm, so maybe this is just a documentation issue since gbm wasn't there before.
Reply

Logout Mark Read Team Forum Stats Members Help
kodi-gbm (2:18.0+git20181023.1820-beta4) crash [ needed to modify kodi.service ]0