Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#45054 - [kodi] crashes randomly since gcc 5.1 update

Attached to Project: Community Packages
Opened by Dan Ziemba (zman0900) - Saturday, 23 May 2015, 01:34 GMT
Last edited by Ike Devolder (BlackEagle) - Tuesday, 26 May 2015, 20:59 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Ike Devolder (BlackEagle)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: After installing updates today which included the new gcc 5.1 and friends then rebooting, kodi crashes on startup most of the time. Occasionally it will start, but behaves strangely.

Running from a terminal shows random error message that seem to be related to glibc. Some examples:

*** Error in `/usr/lib/kodi/kodi.bin': malloc(): smallbin double linked list corrupted: 0x0000000005506380 ***

*** Error in `/usr/lib/kodi/kodi.bin': corrupted double-linked list: 0x0000000004265090 ***

*** Error in `/usr/lib/kodi/kodi.bin': corrupted double-linked list: 0x000000000429da20 ***

When this happens, the gui window is frozen and shows only the background image, no buttons or text. It must be killed with -9. I've tried attaching to the process with gdb to get a stack trace, but it is different every time. Although it does always seem to involve malloc. Example: http://pastebin.com/eD7KASUK

When kodi does start, it acts strange. The volume automatically lowers itself slowly and can't be turned back up from within the program. It tends to crash on its own after a few seconds or minutes, before library scanning is finished. It leaves nothing interesting in its log.

I thought maybe a rebuild with the gcc 5.1 would fix this, but that build fails. I ran the build in a clean chroot with `extra-x86_64-build` so the failure shouldn't be environment related. Here's the build output: http://pastebin.com/M7SQBJXc


Additional info:
* package version(s)
kodi 14.2-3
glibc 2.21-4
gcc-multilib 5.1.0-4
binutils 2.25-5

* config and/or log files etc.


Steps to reproduce:
Start kodi several times from a terminal. Observer the crashes and strange behavior.
This task depends upon

Closed by  Ike Devolder (BlackEagle)
Tuesday, 26 May 2015, 20:59 GMT
Reason for closing:  Fixed
Additional comments about closing:  thx for the gcc5 patches
Comment by Ike Devolder (BlackEagle) - Monday, 25 May 2015, 17:03 GMT
sorry tried several things and cannot reproduce the issue
Comment by Dan Ziemba (zman0900) - Monday, 25 May 2015, 20:31 GMT
I have a pretty large library that scans at startup, and the library is in a maria db running on another host. I thought maybe one of those could be the problem, so I moved my ~/.kodi directory, but it still crashes. Only without my .kodi directory, it crashes almost instantly with segfaults or aborts, both right after the gui window appears. I also tried uninstalling any extra kodi packages like kodi-audioencoder-* and kodi-pvr-addons, but that made no difference. Every crash is in a different function, in seemingly random libraries, like dbus, sdl, libc, pthread, libtinyxml, and others. Once, after deleting ~/.kodi then starting about 20 times in a row, I got one of the freezes caused by "corrupted double-linked list" like in the original report and had to kill it. I've attached a list of all my explicitly installed packages in case that is helpful.
Comment by Dan Ziemba (zman0900) - Monday, 25 May 2015, 22:21 GMT
I was able to get kodi to build with gcc 5.1, but that didn't solve the problem either.

This isn't really related to this bug, but you might find it useful so I have attached the changes I made to the PKGBUILD. I added 2 patches from fedora to fix the build error in rsxs with gcc 5 and a build error when using external ffmpeg. I replaced the invalid "--enable-external-libraries" with "--with-ffmpeg=shared" and added the dependency for ffmpeg. I also added some commands to build that JsonSchemaBuilder binary that the build otherwise complains is missing.
Comment by Dan Ziemba (zman0900) - Monday, 25 May 2015, 22:34 GMT
Well, this is stupid. I just figure out what the problem is here. I left a playstation 4 controller connected to my computer and forgot about it. Apparently whenever that is attached, kodi crashes. So this likely has nothing to do with the gcc 5.1 update. The crashes stop when the controller is unplugged, both with the current repo package and the new one I built with gcc 5.

So this bug should probably at least be renamed, but this is probably an upstream problem. I will report it there, so close this if you want.
Comment by Dan Ziemba (zman0900) - Monday, 25 May 2015, 23:46 GMT Comment by Ike Devolder (BlackEagle) - Tuesday, 26 May 2015, 07:14 GMT
thanks for the argp fixes, the JsonSchemaBuilder thing is not needed at all, but it is a fact it gives a warning during building because the check that it exists in the path fails all the time, but then there is a fallback to the 'internally' built JsonSchemaBuilder.

Are you sure it builds with external ffmpeg, since the possiblity to do that was removed when 14 was released
Comment by Dan Ziemba (zman0900) - Tuesday, 26 May 2015, 19:11 GMT
It does build with external ffmpeg. I think it was just the "--enable-external-libraries" option that was removed. With the package as it is now, you can see ffmpeg being built during the beginning parts of the build. If you just add "--with-ffmpeg=shared" and build in a clean chroot, the configure fails because ffmpeg is missing. Adding ffmpeg as a dependency fixes it and it goes straight into building kodi after configuring, but then fails in DVDDemuxFFmpeg.cpp. That is fixed by the fedora patch.

I got the JsonSchemaBuilder thing from here: http://kodi.wiki/view/HOW-TO:Compile_Kodi_on_Fedora/Red_Hat/CentOS#Build_JsonSchemaBuilder I've had problems with that in the past when building manually for other distros, so it was the first thing I tried. I guess it is no longer necessary.

Loading...