flathub / tv.kodi.Kodi

https://flathub.org/apps/details/tv.kodi.Kodi
GNU Lesser General Public License v2.1
25 stars 24 forks source link

Kodi flatpak crashes with kernel 6.10 on Fedora 40 #292

Open i300220 opened 2 months ago

i300220 commented 2 months ago

Hi,

I reported this issue twice on the fedora discussion board and had no answer.

Every video I click in Kodi flatpak (any version) results in an immediate crash with linux kernel 6.10.x:

2024-09-14 10:54:21.708 T:7        info <general>: VideoPlayer::OpenFile: /home/shizuma/Videos/dark saison 2 episode 6.mp4
2024-09-14 10:54:21.708 T:91    warning <general>: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
2024-09-14 10:54:21.708 T:91       info <general>: Creating InputStream
2024-09-14 10:54:21.719 T:91       info <general>: Creating Demuxer
2024-09-14 10:54:21.784 T:91       info <general>: Opening stream: 0 source: 256
2024-09-14 10:54:21.784 T:91       info <general>: Creating video codec with codec id: 27
2024-09-14 10:54:21.784 T:91       info <general>: CDVDVideoCodecFFmpeg::Open() Using codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
2024-09-14 10:54:21.785 T:91       info <general>: Creating video thread
2024-09-14 10:54:21.785 T:93       info <general>: running thread: video_thread
2024-09-14 10:54:21.785 T:91       info <general>: Opening stream: 1 source: 256
2024-09-14 10:54:21.785 T:91       info <general>: Finding audio codec for: 86018
2024-09-14 10:54:21.786 T:91       info <general>: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac
2024-09-14 10:54:21.786 T:91       info <general>: OpenStream: Allowing max Out-Of-Sync Value of 50 ms
2024-09-14 10:54:21.786 T:91       info <general>: Creating audio thread
2024-09-14 10:54:21.786 T:94       info <general>: running thread: CVideoPlayerAudio::Process()
2024-09-14 10:54:21.841 T:103      info <general>: COutput::OnStartup: Output Thread created

Whereas any video is playing normally with kernel 6.8.7 and older:


2024-09-14 11:02:00.707 T:7        info <general>: VideoPlayer::OpenFile: /home/shizuma/Videos/dark saison 2 episode 6.mp4
2024-09-14 11:02:00.708 T:94       info <general>: Creating InputStream
2024-09-14 11:02:00.728 T:94       info <general>: Creating Demuxer
2024-09-14 11:02:00.806 T:94       info <general>: Opening stream: 0 source: 256
2024-09-14 11:02:00.806 T:94       info <general>: Creating video codec with codec id: 27
2024-09-14 11:02:00.806 T:94       info <general>: CDVDVideoCodecFFmpeg::Open() Using codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
2024-09-14 11:02:00.807 T:94       info <general>: Creating video thread
2024-09-14 11:02:00.807 T:96       info <general>: running thread: video_thread
2024-09-14 11:02:00.807 T:94       info <general>: Opening stream: 1 source: 256
2024-09-14 11:02:00.807 T:94       info <general>: Finding audio codec for: 86018
2024-09-14 11:02:00.808 T:94       info <general>: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac
2024-09-14 11:02:00.808 T:94       info <general>: OpenStream: Allowing max Out-Of-Sync Value of 50 ms
2024-09-14 11:02:00.808 T:94       info <general>: Creating audio thread
2024-09-14 11:02:00.808 T:97       info <general>: running thread: CVideoPlayerAudio::Process()
2024-09-14 11:02:00.861 T:105      info <general>: COutput::OnStartup: Output Thread created
2024-09-14 11:02:00.916 T:7        info <general>: GL: Selecting YUV 2 RGB shader
2024-09-14 11:02:00.917 T:7        info <general>: GL: Using GL_ARB_pixel_buffer_object
2024-09-14 11:02:00.917 T:7        info <general>: Using GL_TEXTURE_2D
2024-09-14 11:02:00.933 T:96       info <general>: CDVDVideoCodecFFmpeg::CDropControl: calculated diff time: 41666
2024-09-14 11:02:01.041 T:97       info <general>: Creating audio stream (codec id: 86018, channels: 2, sample rate: 44100, no pass-through)
2024-09-14 11:02:01.046 T:41       info <general>: CActiveAESink::OpenSink - initialize sink
2024-09-14 11:02:01.631 T:7        info <general>: GL: Selecting YUV 2 RGB shader
2024-09-14 11:02:01.632 T:7        info <general>: GL: Using GL_ARB_pixel_buffer_object
2024-09-14 11:02:01.644 T:7        info <general>: Loading skin file: VideoFullScreen.xml, load type: KEEP_IN_MEMORY

Untested with kernel 6.9: I had display issues with each and every 6.9.x.

razzeee commented 2 months ago

I don't think the kernel is your problem, I'm also running fedora and that kernel and can play videos in kodi fine

i300220 commented 2 months ago

Lucky you! I'd guess you have a nVidia card whereas I have a Radeon R7.

Like I said I had nothing but problems with every Fedora kernel after 6.8.7 and that crashing issue with Kodi is directly related with newer Fedora kernels. I tested several of them and the crash is perfectly repeatable for kernels 6.10.3 - 6.10.8. Glad it's working fine for others, but how would I debug that? Strace? How?

A strace diff revealed: +amdgpu: The CS has been rejected, see dmesg for more information (-22).

And dmesg showed: [drm:amdgpu_uvd_cs_pass2 [amdgpu]] *ERROR* msg/fb buffer ff00d0e000-ff00d10000 out of 256MB segment!

Seems to be a GL issue with those kernels. Mesa, Vulkan, OpenGL, whatever...

Workaround is to disable hardware acceleration VAAPI in Kodi settings, which, needless to say, I'd prefer to keep.

The crashlogs are useless, they are just copies of kodi.log.

For the record, I don't have this issue on a Debian 12 machine running 6.10.6-bpo and also a Radeon GPU.

razzeee commented 2 months ago

No, it's a amd gpu rx 6750xt. I think you can install the devel package and that should allow you to dig into it. Check the flatpak docs / the matrix channel

i300220 commented 2 months ago

You said matrix. Even though the current version is Omega?

Kernel issue confirmed:

https://gitlab.freedesktop.org/drm/amd/-/issues/3599

razzeee commented 2 months ago

Martrix chat, where there are flatpak and flathub channels