Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add-on causing system freezes #648

Open
ghost opened this issue Apr 4, 2022 · 21 comments
Open

add-on causing system freezes #648

ghost opened this issue Apr 4, 2022 · 21 comments
Labels

Comments

@ghost
Copy link

ghost commented Apr 4, 2022

Context

Please provide any relevant information about your setup

  • Add-on Version: 2.6.0
  • Kodi Version: 19.4
  • Kodi GUI Language: english
  • Operating System: libreelec
  • Operating System Language: english

Expected Behavior

Please describe the behavior you are expecting.

add-on does not cause the system to freeze up periodically


Current Behavior

What is the current behavior?

periodically, i think when midroll ads are supposed to start the add on causes my pi4 to freeze. no inputs work and the only solution is hard rebooting the pi which is not sustainable. due to the freeze logging doesnt seem to happen either


Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. watch stream with midroll ads
  2. wait for an ad/periodic time
  3. observe system freeze

Log

Please include a complete debug log.

cannot capture due to freeze stopping logging


Additional Information

Please provide any additional information that may be helpful.


@ghost ghost added the bug label Apr 4, 2022
@ghost
Copy link
Author

ghost commented Apr 10, 2022

@anxdpanic any chance of this getting reviewed? it is making this addon pretty unusable for me. i even tried a fresh install of libreelec and this addon with no success

@Lucki
Copy link

Lucki commented Apr 11, 2022

Give this a try: #451 (comment)

@ghost
Copy link
Author

ghost commented Apr 11, 2022

@Lucki all i see is "allow hardware acceleration with drm prime" under settings > player > videos is that the setting #451 refers to?

@ghost
Copy link
Author

ghost commented Apr 11, 2022

ok the setting i found did not work. possibly it changed in newer kodi releases

@anxdpanic
Copy link
Owner

@portno12
Try using Quality -> Adaptive and InputStream Adaptive for playback, there really isn't anything I can do add-on side to resolve this.

@ghost
Copy link
Author

ghost commented Apr 12, 2022

Quality -> Adaptive resulted in an immediate freeze when starting a stream instead of when an ad should happen, maybe the prestream ad, but the content showed so not sure.

InputStream was disabled and i could not change it.

@anxdpanic
Copy link
Owner

The InputStream Adaptive is required and needs to be enabled for Adaptive quality to work.

@ghost
Copy link
Author

ghost commented Apr 12, 2022

makes sense, i just couldnt do anything with it. but adaptive caused an instant freeze on the stream i tried. did something change in kodi 19.x maybe with this?

@Azzurite
Copy link

I think I'm also getting this but it doesn't cause a complete system freeze, only causes kodi to freeze. I can still ssh into libreelec on my pi.

I'm also using inputstream adaptive and still getting this, I'm relatively sure at the exact moment when ads are being played. The only thing in the kodi logs right around that moment is

2022-05-20 13:02:05.674 T:18503 INFO <general>: CVideoPlayerAudio::Process - stream stalled

and then nothing.

But in `journalctl

May 20 13:02:08.341817 pi kernel: bcm2835-codec bcm2835-codec: bcm2835_codec_flush_buffers: Timeout waiting for buffers to be returned - -11 outstanding
May 20 13:02:08.365141 pi kernel: ------------[ cut here ]------------
May 20 13:02:08.365355 pi kernel: WARNING: CPU: 2 PID: 18502 at __vb2_queue_cancel+0x1d4/0x240 [videobuf2_common]
May 20 13:02:08.365465 pi kernel: Modules linked in: hci_uart btbcm bluetooth ecdh_generic ecc brcmfmac brcmutil cfg80211 bcm2835_isp(C) bcm2835_codec(C) rpivid_hevc(C) bcm2835_mmal_vchiq(C) videobuf2_dma_contig rfkill videobuf2_memops bcm2835_gpiomem v4l2_mem2mem videobuf2_v4l2 videobuf2_common videodev mc nvmem_rmem fuse
May 20 13:02:08.365570 pi kernel: CPU: 2 PID: 18502 Comm: VideoPlayer Tainted: G        WC        5.10.95 #1
May 20 13:02:08.365678 pi kernel: Hardware name: Raspberry Pi 4 Model B Rev 1.1 (DT)
May 20 13:02:08.365781 pi kernel: pstate: 80000005 (Nzcv daif -PAN -UAO -TCO BTYPE=--)
May 20 13:02:08.365877 pi kernel: pc : __vb2_queue_cancel+0x1d4/0x240 [videobuf2_common]
May 20 13:02:08.365972 pi kernel: lr : __vb2_queue_cancel+0x40/0x240 [videobuf2_common]
May 20 13:02:08.366097 pi kernel: sp : ffffffc0183bbab0
May 20 13:02:08.366195 pi kernel: x29: ffffffc0183bbab0 x28: ffffff80637d0000 
May 20 13:02:08.366292 pi kernel: x27: 0000000040045613 x26: ffffffc008da2aa8 
May 20 13:02:08.366386 pi kernel: x25: 0000000000000000 x24: ffffffc0183bbcd8 
May 20 13:02:08.366481 pi kernel: x23: ffffff804b00c630 x22: ffffff805bd23028 
May 20 13:02:08.366576 pi kernel: x21: 0000000000000009 x20: ffffff805bd23028 
May 20 13:02:08.366676 pi kernel: x19: ffffff805bd23028 x18: 0000000000000000 
May 20 13:02:08.366772 pi kernel: x17: 0000000000000000 x16: 0000000000000000 
May 20 13:02:08.366869 pi kernel: x15: 0000000000000004 x14: ffffff804c640030 
May 20 13:02:08.366965 pi kernel: x13: 0000000000000000 x12: ffffff805ec733a0 
May 20 13:02:08.367081 pi kernel: x11: ffffff805ec73230 x10: ffffff805ec73232 
May 20 13:02:08.367182 pi kernel: x9 : ffffffc008d6b844 x8 : ffffff805ec73258 
May 20 13:02:08.367279 pi kernel: x7 : 0000000000000001 x6 : 0000000000000000 
May 20 13:02:08.367378 pi kernel: x5 : ffffff804b00c81c x4 : 0000000000000000 
May 20 13:02:08.367475 pi kernel: x3 : ffffff804c640008 x2 : 0000000000000000 
May 20 13:02:08.367572 pi kernel: x1 : 00000000000055ac x0 : 0000000000000011 
May 20 13:02:08.367666 pi kernel: Call trace:
May 20 13:02:08.367760 pi kernel:  __vb2_queue_cancel+0x1d4/0x240 [videobuf2_common]
May 20 13:02:08.367855 pi kernel:  vb2_core_streamoff+0x30/0xd0 [videobuf2_common]
May 20 13:02:08.367970 pi kernel:  vb2_streamoff+0x28/0x80 [videobuf2_v4l2]
May 20 13:02:08.368103 pi kernel:  v4l2_m2m_streamoff+0x48/0x150 [v4l2_mem2mem]
May 20 13:02:08.368211 pi kernel:  v4l2_m2m_ioctl_streamoff+0x24/0x30 [v4l2_mem2mem]
May 20 13:02:08.368310 pi kernel:  v4l_streamoff+0x30/0x40 [videodev]
May 20 13:02:08.368407 pi kernel:  __video_do_ioctl+0x190/0x3f0 [videodev]
May 20 13:02:08.368578 pi kernel:  video_usercopy+0x1b0/0x530 [videodev]
May 20 13:02:08.368685 pi kernel:  video_ioctl2+0x24/0x50 [videodev]
May 20 13:02:08.368858 pi kernel:  v4l2_ioctl+0x4c/0x70 [videodev]
May 20 13:02:08.368968 pi kernel:  v4l2_compat_ioctl32+0x1c4/0x1ac0 [videodev]
May 20 13:02:08.369114 pi kernel:  __arm64_compat_sys_ioctl+0xb4/0x1bc
May 20 13:02:08.369212 pi kernel:  el0_svc_common.constprop.0+0x84/0x1e0
May 20 13:02:08.369310 pi kernel:  do_el0_svc_compat+0x28/0x60
May 20 13:02:08.369407 pi kernel:  el0_svc_compat+0x20/0x30
May 20 13:02:08.369503 pi kernel:  el0_sync_compat_handler+0x90/0x160
May 20 13:02:08.369600 pi kernel:  el0_sync_compat+0x184/0x1c0
May 20 13:02:08.369696 pi kernel: ---[ end trace 3cdcd24592ef91b4 ]---

this is repeating from that moment on.

Libreelec issue? it's only happening when ads from twitch on this addon start to play, nowhere else though.

@jasondaigo
Copy link

I needed to downgrade python on arch to not freeze with this version.

@ghost
Copy link
Author

ghost commented Jun 27, 2022

@anxdpanic ads have become much more prevalent on twitch making this addon harder to use. is there some way to compensate for it? i also noticed just screen transitions with no ads, like be right back montages on channels i subbed to, also seem to break things for me and i ended up hard rebooting the pi

seems another has an issue on libreelec. has anyone tried openelec? i cant since last i looked it cant (and wont per the dev) support the pi4.

@dlicois
Copy link

dlicois commented Jun 30, 2022

@portno12 Try using Quality -> Adaptive and InputStream Adaptive for playback, there really isn't anything I can do add-on side to resolve this.

This worked for me. 👍🏻
Before : preroll countdown screen, complete freeze when countdown reach zero
After : Stream starts correctly at the end of the preroll countdown screen

@ghost
Copy link
Author

ghost commented Jul 12, 2022

@jasondaigo libreelec doesnt have package management. i see python 3.8.9 though. which version worked for you and were you ever able to update?

@dlicois are you using libreelec? that setting wasnt changeable for me.

@jasondaigo
Copy link

i think it was 3.9.on arch, switched ro ubuntu flatpak and liveproxy meanwhile. cant investigate further

@dlicois
Copy link

dlicois commented Jul 13, 2022

@portno12 This is with add-on 2.6.1 on Kodi 19.4 in Ubuntu 22.04.

@ghost
Copy link
Author

ghost commented Jul 13, 2022

i did another test on this. and there is an actual issue with the addon too i think. i was subbed to a stream so there should have been no ads, yet i got one starting a stream and the same one then froze kodi in the middle for an "ad".

@FoxLee
Copy link

FoxLee commented Sep 26, 2022

I've been getting this on my RPi4 too, very consistently freezes after a few seconds of ad audio (some ad video occasionally loads too, but usually it freezes on the stream visual). An RPi3 in the other room has no such issues. Will check if using adaptive quality fixes it; I recall I had previously turned it off because it seemed to be causing audio/visual desync on the RPi3.

EDIT: Inputstream.adaptive didn't seem to make any difference, but the hardware acceleration workaround from #451 (comment) did.

@schanck
Copy link

schanck commented Feb 11, 2023

I was also getting this with the latest plugin version on Kodi 20.0, Lubuntu Kinetic Kudu. It made watching live streams impossible, since they start with a "commercial break" midroll countdown, followed by freezing. (I did get a live broadcast to work once, I have no idea what was different about that time.)

Fortunately, the Quality -> Adaptive workaround seems to have completely fixed the issue for me.
Perhaps using InputStream Adaptive should be made the new default setting?

@chris42
Copy link

chris42 commented Mar 4, 2023

I don't think the Quality -> Adaptive workaround works for Raspi4s. I need to disable hardware acceleration as well to prevent crashes. Which sends the CPU usage skyrocketing. Does anyone have a clue why the hardware acceleration with the Raspi still gets this error?

@the-isz
Copy link

the-isz commented Jun 23, 2023

I can also confirm that the settings

  • Video Quality -> Adaptive and
  • Use inputstream.adaptive -> true

alone don't fix/work around the issue because I have had them like this to begin with and basically can't watch Twitch on my rpi4 because ads have either kodi or my whole rpi freeze.

On the other hand, I can reliably watch Amazon Prime and Netflix without any issues and both are also using InputStream Adaptive (as far as I know).

@vwbusguy
Copy link

vwbusguy commented Jan 18, 2024

Just wanted to chime in to say that in the new version of kodi the option is now the disable hardware acceleration with Prime. You can leave deinterlacing with Prime enabled. Disabling prime hardware accel fixed it for me on Raspberry Pi4. I did not change the InputStream setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants