Posts by jahutchi

    I have now also tested using:

    8.2.2 official (i.e. kernel 4.11.12) with the Linus Torvalds patch installed, rather than reverting 4cd13c2: BEDD

    This also works perfectly - same results as per reverting 4cd13c2. I can watch live tv and record a further 3 programs at the same time without any breakups or continuity counter errors in tvheadend.

    Further proof that both reverting 4cd13c2 and using the Linus Torvalds patch appear to have the same positive effect.

    I'm afraid so. But unlike the softirq problem this does not affect the recorded stream, this is a playback-only issue. Also, I don't know when this started - I did not test kernels 4.10/4.11/4.12/4.13.

    As mentioned in my previous post, I'm currently running 4.11.12 (kernel shipped with 8.2.2 official generic build) with 4cd13c2 reverted. I've been running this build for the past week or so without any breakups, and have been testing today to double-check I can both record and watch at the same time. I had 3 programs recording and watching a fourth, without any breakups. So I would suggest this further regression has occurred since 4.11.12.

    Is anyone able to test #0108b on x86_64? jahutchi I think you have a Revo 3700 (Atom D525 quad core) - are you able to test this build


    Apologies that I've not been able to contribute as much as I would like over the last few days - work & family life getting in the way, but I have been following these threads with interest.

    I have been testing some builds...

    My testing suggests that both reverting 4cd13c2 and using the Linus Torvalds patch have the same positive effect, but that there has been a further regression in later kernels 4.14/4.15? as also suspected by smp - whereby I can no longer watch and record programs at the same time :(


    Millhouse build #0108b:

    SHAS

    With this build I can get a stable stream when watching live tv. However, if I watch and record at the same time then I get breakups.

    Millhouse build #0101z: JYUK

    Same as above - I get a stable stream when watching live tv. However, if I watch and record at the same time then I get breakups.

    8.2.2 official (i.e. kernel 4.11.12) with just 4cd13c21b207e80ddb1144c576500098f2d5f88 reverted: ANGH

    I can watch live tv and record a further 3 programs at the same time without any breakups

    I am currently building an equivalent 8.2.2 official image with the Linus Torvalds patch included, rather than reverting 4cd13c2 - to confirm for sure whether both patches do indeed have the exact same positive effect.

    Over the past couple of months I've been bisecting and debugging the kernel on my Acer Revo 3700 Generic x86_64 machine. This was quite a learning curve, as I haven't previously used git very much let alone bisect a kernel. However, I found there were plenty of guides around on the internet, so I was quickly able to get upto speed. I must also say that the build system for LibreELEC is extremely well put together and easy to follow.

    After approx 50 builds I believe I've found the answer....I've hit a few issues along the way - the main problem being that at several commit points in the 4.9 rc1 development the kernel would not compile due to breakages in the netfilter module, and this was preventing me from getting close to the troublesome commit. I therefore disabled netfilter in the kernel options, and from then it only took a couple of weeks to locate the troublesome commit.

    Here is my git bisect log:

    So this indicates the troublesome commit is: 4cd13c21b207e80ddb1144c576500098f2d5f882

    To test this theory, I've created some builds based on 8.2.2 with a kernel patch applied to revert the change made under 4cd13c21b207e80ddb1144c576500098f2d5f882.

    LibreELEC-Generic.x86_64-8.2.2-dvbfriendly-nomb.tar

    LibreELEC-Generic.x86_64-8.2.2-dvbfriendly-withmb.tar

    LibreELEC-RPi2.arm-8.2.2-dvbfriendly-nomb.tar

    LibreELEC-RPi2.arm-8.2.2-dvbfriendly-withmb.tar

    I've tested the Generic builds on my Revo 3700 which appear to work... no artefacts after running for a couple of days, whereas I'd normally see artefacts every 2-3 minutes with any of the 4.9+ kernel-based builds :)

    The Generic build also contains a further kernel patch to address the buffer overflow problem in timer.c as discussed on page 8 of this thread (Kernel 4.9.x drops USB data on Pi 2B (regression from 4.4.x) · Issue #2134 · raspberrypi/linux · GitHub). Since I found this also has impact but to a much lesser degree - without this you may get artefacts maybe 2-3 times per day depending on usage. The v4.9.59 kernel shipped with 8.2.2 for RPi2/3 did not require this patch as it's already fixed in that version.


    Maybe others could perform some testing on these builds (especially on the Pi2/3) to confirm whether this does indeed resolve the issue.

    In the longer term I have no idea on the best way to fix this - it looks like the commit was made to quite intentionally send all I/O traffic onto the ksoftirqd process queue rather than processing the request immediately. This seems to have consequences for lower-spec devices where you are trying to use DVB cards. My Revo 3700 machine has a quad core 1.8GHz processor and I have a fairly minimal LE build with only a handful of addons installed. It works perfectly with 4.8-based kernels, but suffers badly with artefacts on unpatched 4.9+ kernels, with picture breakups every 2-3 minutes, or even more often when put under heavier I/O load. This seems to fit with what others have reported in this thread - i.e. the problem surfaces when under heavier I/O load.

    I just tried the generic build to test whether it fixes the issue on my machine but get a blank screen and cant figure out why. Here is the output of my journalctl: NHSG

    I do not get a kodi log so dont think its getting that far. I tried wiping my .kodi directory too and that had no effect.

    Do these test builds support nvidia_legacy_340? My graphics card is an ION2. First time i've tried a millhouse build on this box.

    Meanwhile i've been bisecting the 4.9 kernel and was starting to narrow down the commits, so will pause my efforts and try merging this patch into my custom build to see if it improves things.

    Update: deleting my .config folder fixed that problem. Ive done some testing against the latest millhouse build (Milhouse-20171214210652-%231214-g9155531) but still have stream corruption im afraid :( back to my attempts to bisect the kernel i guess

    I just tried the generic build to test whether it fixes the issue on my machine but get a blank screen and cant figure out why. Here is the output of my journalctl: NHSG

    I do not get a kodi log so dont think its getting that far. I tried wiping my .kodi directory too and that had no effect.

    Do these test builds support nvidia_legacy_340? My graphics card is an ION2. First time i've tried a millhouse build on this box.

    Meanwhile i've been bisecting the 4.9 kernel and was starting to narrow down the commits, so will pause my efforts and try merging this patch into my custom build to see if it improves things.

    I've managed to run this problem to ground in Kodi Krypton.

    The problem is caused by the Now & Next Recording Widgets at the top of the PVR Section of the Home screen.

    I've worked around the issue by creating a copy of the default estuary skin, and editing Home.xml to remove those two widgets:

    I've been running a couple of weeks now with Kodi in the PVR section of the home screen.... and no crashes :)

    I occasionally get this same error and lockups on my generic X86_64 NVidia machine running LE 8.0.1 though I haven't been able to figure out a pattern.

    This morning I hit the error when launching a TV channel...

    It started with a few Invalid Handle errors.

    07:46:34.872 T:140562470610688 ERROR: (VDPAU) Error: An invalid handle value was provided.(3) at /home/a/http://LibreELEC.tv/build.LibreELEC-Generic.x86_64-8.0.1/kodi-fc1619b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.cpp:1041

    07:46:34.872 T:140562470610688 ERROR: Decode - avcodec_decode_video returned failure

    The TV channel seemed to play OK, but the whole thing froze when I hit exit to return to the Kodi Home screen (with video still playing in the background). At this point I see several occurrences of the following error in kodi.log

    07:46:44.635 T:140562470610688 ERROR: (VDPAU) Error: An invalid pointer was provided.(4) at /home/a/http://LibreELEC.tv/build.LibreELEC-Generic.x86_64-8.0.1/kodi-fc1619b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.cpp:1041

    I tried hitting stop a few times to come out of the video but the whole thing was locked up so I just restarted kodi via SSH -> 'systemctl restart kodi'

    I've attached the kodi logfile, but unfortunately don't have a debug log. (this only happens very occasionally, I cannot reproduce at will, and I don't leave debug logging in place, since I find this causes poor performance in other areas).

    However, here is a kodi logfile from my occurrence this morning.

    GgWK

    I am planning to upgrade when v8.2.0 has been released in the hope that maybe the NVidia driver bump could resolve it.

    In the meantime, I'm not sure whether anyone can comment as to where the problem may lie from the logfile, and indeed whether upgrading to 8.2.0 will fix it.

    If you run "bcmstat.sh ZDA d 30 y" do you see any entries in the "UFT" column before, during or after Kodi crashes? If so, please post them.

    I've been running most of the day with kodi in the PVR section of the Home screen.

    I have just had another crash and here is the crash log:

    BQCB

    In addition, here is the output of "bcmstat.sh ZDA d 30 y"

    DKPI

    As well as disabling LIRC I have now also added a 128MB swap file as you recommended in a previous post, though with the clean install this does not seem to be required in order for the crash log to complete.

    The lirc error shouldn't be related, but it is odd - is that with #0928b as I'm pretty sure that build is using lirc 0.10.0 not 0.9.4d. Try disabling lirc in LibreELEC Settings addon.


    Those errors were from LE 8.1.2, but also occurred in #0928b

    Code
    Oct 04 11:14:49 LibreELEC lircd_helper[400]: lircd-0.10.0[400]: Error: could not get file information for /dev/lirc0
    Oct 04 11:14:49 LibreELEC lircd_helper[400]: lircd-0.10.0[400]: default_init(): No such file or directory
    Oct 04 11:14:49 LibreELEC lircd-0.10.0[400]: Error: could not get file information for /dev/lirc0
    Oct 04 11:14:49 LibreELEC lircd-0.10.0[400]: default_init(): No such file or directory


    I've now disabled LIRC in the LE Settings and those messages have gone.

    jahutchi do you have any joysticks or other controller attached to the RPi? Can you post your complete dmesg from #0928b.

    I do not have any joysticks or controllers attached. The only device I have attached is the USB dongle for my Ortek MCE Remote.

    Here is the output of dmesg from #0928b

    ERIH

    One final thought for today. When I was running "journalctl -a" I was seeing the following 4 messages reported once per second:

    Oct 05 16:38:07 Kitchen lircd_helper[457]: lircd-0.9.4d[457]: Error: could not get file information for /dev/lirc0

    Oct 05 16:38:07 Kitchen lircd_helper[457]: lircd-0.9.4d[457]: default_init(): No such file or directory

    Oct 05 16:38:07 Kitchen lircd-0.9.4d[457]: Error: could not get file information for /dev/lirc0

    Oct 05 16:38:07 Kitchen lircd-0.9.4d[457]: default_init(): No such file or directory


    I've just checked and the same is true when I run LE v8.1.2.

    I didn't worry about these messages since my remote works just fine, but just wondering if this could be related in some way? Since the code you mention is in the area of Peripherals.

    The remote/usb dongle I'm using is the Ortek generic MCE USB such as the one here:

    8mO0Bcl

    #1 just seems like a random memory error, possibly due to insufficient power (you're not overclocked, so we can rule that out). If you run "bcmstat.sh ZDA d 30 y" do you see any entries in the "UFT" column before, during or after Kodi crashes? If so, please post them.

    I'm not over-clocked and am using a very standard RPi3 with official power supply and memory card as purchased here:

    9M9DlSB

    It's important to note that I only experience these crashes when I leave the machine Idle in the PVR section of the home screen. Therefore, I tend to simply not use the PVR section of the home screen thus side-stepping the issue (I have buttons mapped for TVGuide, TVRecordings, etc). As long as I don't use the PVR section of the home screen, then my Pi3 will run stable for days on end without any crash logs generated.

    I will run some further tests on my RPi3 early next week to generate more crash logs, and this time will run "bcmstat.sh ZDA d 30 y" and post the results as you suggest.

    I'll assume you would like me to use the same debug-enabled build #0928b as a basis for this testing... unless I hear otherwise.

    As before, I shall also remove my whole .kodi folder etc to give a "clean" build, and will only install the pvr.hts addon.

    In the meantime, I'm not sure if anyone else in this thread with the same problem is able to test your build and supply similar debug logs for purpose of comparison.....??????

    Finally, my debug crash log from LE 8.1.1 as posted earlier in this thread is still available here:

    BSCj

    => Not sure whether this also points at PERIPHERALS::CPeripheralAddon::ProcessEvents as being the cause?