You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"vc4-drm gpu: [drm] ERROR Failed to allocate DLIST entry: -28" after running for some period #5674
PR updated to add a debugfs entry to print out the allocations. You should be able to do sudo cat /sys/kernel/debug/dri/1/hvs_dlist_allocs to print out the allocations. For me with a triple-head Wayfire session running I get
0x20 is the scaling kernel. Entries that are 0x11 bytes long have a primary and a cursor plane, whilst those 0x9 bytes long only have a primary plane. This can also be confirmed via sudo cat /sys/kernel/debug/dri/1/hvs_dlists to list those which currently active.
Knowing what it thinks are allocated vs active when it goes wrong would be very useful.
Sorry I think I wrote something misleading. I was not meaning that I had the issue after applying your patch. The kernel dump I provided is before before applying it.
Now I applied your patch and all seems OK.
Thank you and sorry for the confusion I have generated.
Sorry I think I wrote something misleading. I was not meaning that I had the issue after applying your patch. The kernel dump I provided is before before applying it. Now I applied your patch and all seems OK. Thank you and sorry for the confusion I have generated.
OK, you had me quite confused that we still appeared to have a leak. Having the debugfs hook to dump out the allocations doesn't hurt anyway.
If anyone else is able to test and confirm that they aren't seeing the error anymore, that would be awesome.
I am the one that initially reported the issue on Ubuntu 23.10 in the forum thread. Since there's no easy way of applying the fix in Ubuntu (right?), I have applied it to a Raspberry Pi OS installation instead and so far so good. However, I don't think I've been able to reproduce the issue on RPi OS before the fix, so the fact that it works may not mean that much. I'll continue using the fix and let you know if I run into any issues.
I have a guy on our forums keeps having this issue so I compiled the 6.1.58 kernel with your commits using commit 36ed2f9. He only had time for a short test but he appears to still be having the issue. He is using Gnome with Wayland. I do not seem to have the issue here on XFCE. I get no related output in journalctl while playing like he does.
@Dark-Sky That log doesn't include the ERROR Failed to allocate DLIST entry: -28
error that this issue is about.
swiotlb buffer is full is a little worrying as I wouldn't expect there to need to be swiotlb usage under most situations. linux,cma: alloc failed is a totally different error.
@Dark-Sky That log doesn't include the ERROR Failed to allocate DLIST entry: -28 error that this issue is about.
I had questioned him about that earlier and he said he was getting the same error when he succeeded to open a TTY. Most of the time his system would just lock up was his response later on.
Our forum member had some more time to test today and reported this:
I think that “vc4-drm gpu: swiotlb buffer is full” is a different problem than
in a tty :
vc4-drm gpu: [drm] ERROR Failed to allocate DLIST entry: -28
or in journalctl
Page flip failed: drmModeAtomicCommit: No space available on the device
who make the freezes.
For the moment no more problems with pull/5684. I will continue to report.
For the moment no more problems with pull/5684. I will continue to report.
So does that mean it is working?
If not, what kernel version are they actually running? And what client software?
Some of the reports providing the WARN backtrace including drm_mode_rmfb_work_fn is weird. drm_mode_rmfb is generally called due to drmModeRmFB in userspace, which is destroying a FB mapping of a bo or DMABUF. This isn't something that I would expect to be happening that often, as you generally addFB during init, and destroy at exit. drm_framebuffer_remove is then doing a commit if the FB was active when removed.
I'm wondering if this is on some app being killed, hence cleanup coming in and freeing all resources in one hit, thereby generating many commits. Even so, if not directly driving DRM to add lots of planes, then I wouldn't expect there to be lots of active FBs needing actually removing, but the accounting may not be that finely grained.
I asked again today and this was his response still testing the using the kernel I compiled with your commits you had done above:
I have enabled a maximum of gnome-shell extension and apart from vc4-drm gpu: swiotlb buffer is full, I didn’t have any crash. But I think it takes a few days to be sure.
I think we may have a read-modify-write issue between setting the DSPEISLUR and EOF enables - I'm seeing both bits 7 (0x80) and 9 (0x200) being enabled and disabled in SCALER_DISPCTRL via /sys/kernel/debug/dri/1/hvs_regs over updates, and they're done from different contexts.
I've created #5891 as a test which disables the underrun interrupt, so it should remove the race condition. It's a hack, but it would be useful if people could test to see if it does solve their issues. Once CI has completed, sudo rpi-update pulls/5891 should get the 6.1 kernel with that patch.
Right now uptime is 5 days after the 'sudo rpi-update pulls/5891' and a reboot.
Linux testTerminal 6.1.74-v8+ #1 SMP PREEMPT Wed Jan 24 17:15:21 UTC 2024 aarch64 GNU/Linux
No issues found, everything works ok.
Thanks for testing - I was beginning to think no one had tested it.
I'll have a think about a clean way of implementing both underrun and EOF interrupt handling. It's tempting to just enable EOF permanently, but it adds some overhead triggering interrupts at 60Hz for each HVS channel.
Thanks @WilkuAgresor, @TRyan84 and @anyc.
With the three of you confirming that the hack to drop underrun logging works, it gives me confidence that we have identified the cause, and just need to sort the proper fix.
I don't need any other confirmations that it works now.
I've dropped underrun detection via #5935 which was merged 7:52PM Fri 8th Feb.
The last rpi-update bump was 3:41PM Fri 8th Feb, so hasn't picked it up yet.
AIUI using sudo rpi-update rpi-6.6.y should pick up the latest CI build from that branch, which should include it.
I update the System with sudo rpi-update rpi-6.6.y
Now I get this error:
[ 16.264098] alsactl[701]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
[ 16.873391] vc4_dsi 3f700000.dsi: transfer interrupt wait timeout
[ 16.873407] vc4_dsi 3f700000.dsi: instat: 0x00000000
[ 16.873425] [drm:vc4_dsi_host_transfer [vc4]] _ERROR_ DSI transfer failed, resetting: -110
[ 17.113409] tc358762 3f700000.dsi.0: error initializing bridge (-110)
[ 17.115153] Console: switching to colour frame buffer device 100x30
[ 17.129595] vc4-drm soc:gpu: [drm] fb0: vc4drmfb frame buffer device
And the Display is kind of fuzzy...
What DSI display are you using? Presumably the Pi 7" DSI panel as it's loading tc358762.
If a clone of the Pi display, then I largely don't care.
Nothing significant has changed with regard that driver or the DSI host controller.
Activity
6by9 commentedon Oct 26, 2023
For anyone watching this issue, #5684 addresses a couple of issues but I haven't been able to reproduce exhausting the DLIST memory.
If anyone wants to test, then
sudo rpi-update pulls/5684should get the CI build once complete.WeirdAnalyst commentedon Oct 26, 2023
Same for me. See below:
Oct 27 00:29:54 kernel: vc4-drm gpu: [drm] ERROR Failed to allocate DLIST entry: -28
Oct 27 00:29:54 mymachine last message buffered 2 times
Oct 27 00:29:54 mymachine kernel: ------------[ cut here ]------------
Oct 27 00:29:54 mymachine kernel: atomic remove_fb failed with -28
Oct 27 00:29:54 mymachine kernel: WARNING: CPU: 2 PID: 6471 at drivers/gpu/drm/drm_framebuffer.c:1130 drm_framebuffer_remove+0x4b8/0x510 [drm]
Oct 27 00:29:54 mymachine kernel: Modules linked in: uinput rfcomm fuse 8021q garp stp llc xt_tcpudp xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_filter ip_tables x_ta
Oct 27 00:29:54 mymachine kernel: CPU: 2 PID: 6471 Comm: kworker/2:3 Tainted: G C 6.1.58-v8 #1
Oct 27 00:29:54 mymachine kernel: Hardware name: Raspberry Pi 4 Model B Rev 1.4 (DT)
Oct 27 00:29:54 mymachine kernel: Workqueue: events drm_mode_rmfb_work_fn [drm]
Oct 27 00:29:54 mymachine kernel: pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
Oct 27 00:29:54 mymachine kernel: pc : drm_framebuffer_remove+0x4b8/0x510 [drm]
Oct 27 00:29:54 mymachine kernel: lr : drm_framebuffer_remove+0x4b8/0x510 [drm]
Oct 27 00:29:54 mymachine kernel: sp : ffffffc00b643cb0
Oct 27 00:29:54 mymachine kernel: x29: ffffffc00b643cb0 x28: ffffff804214f000 x27: ffffff81079a12b8
Oct 27 00:29:54 mymachine kernel: x26: ffffffd95606a460 x25: 0000000000000000 x24: 0000000000000010
Oct 27 00:29:54 mymachine kernel: x23: 00000000ffffffe4 x22: ffffff81079a12c0 x21: ffffff81079a1000
Oct 27 00:29:54 mymachine kernel: x20: ffffff8089b76800 x19: ffffff80ea473000 x18: 00000000fffffffe
Oct 27 00:29:54 mymachine kernel: x17: 0000000000000000 x16: ffffffd9c02884c0 x15: ffffffc00b643890
Oct 27 00:29:54 mymachine kernel: x14: 0000000000000000 x13: 38322d2068746977 x12: 2064656c69616620
Oct 27 00:29:54 mymachine kernel: x11: fffffffffffe0000 x10: ffffffd9c18947c0 x9 : ffffffd9c02face4
Oct 27 00:29:54 mymachine kernel: x8 : 00000000ffffefff x7 : ffffffd9c18947c0 x6 : 80000000fffff000
Oct 27 00:29:54 mymachine kernel: x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000027
Oct 27 00:29:54 mymachine kernel: x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffffff81d6c4dd00
Oct 27 00:29:54 mymachine kernel: Call trace:
Oct 27 00:29:54 mymachine kernel: drm_framebuffer_remove+0x4b8/0x510 [drm]
Oct 27 00:29:54 mymachine kernel: drm_mode_rmfb_work_fn+0x80/0xac [drm]
Oct 27 00:29:54 mymachine kernel: process_one_work+0x1dc/0x460
Oct 27 00:29:54 mymachine kernel: worker_thread+0x22c/0x43c
Oct 27 00:29:54 mymachine kernel: kthread+0xf8/0x104
Oct 27 00:29:54 mymachine kernel: ret_from_fork+0x10/0x20
Oct 27 00:29:54 mymachine kernel: ---[ end trace 0000000000000000 ]---
Oct 27 00:29:54 mymachine kernel: vc4-drm gpu: [drm] ERROR Failed to allocate DLIST entry: -28
Oct 27 00:30:07 mymachine last message buffered 50 times
Oct 27 00:31:47 mymachine last message buffered 118 times
6by9 commentedon Oct 27, 2023
Thanks for testing.
PR updated to add a debugfs entry to print out the allocations. You should be able to do
sudo cat /sys/kernel/debug/dri/1/hvs_dlist_allocsto print out the allocations. For me with a triple-head Wayfire session running I get0x20 is the scaling kernel. Entries that are 0x11 bytes long have a primary and a cursor plane, whilst those 0x9 bytes long only have a primary plane. This can also be confirmed via
sudo cat /sys/kernel/debug/dri/1/hvs_dliststo list those which currently active.Knowing what it thinks are allocated vs active when it goes wrong would be very useful.
WeirdAnalyst commentedon Oct 28, 2023
Sorry I think I wrote something misleading. I was not meaning that I had the issue after applying your patch. The kernel dump I provided is before before applying it.
Now I applied your patch and all seems OK.
Thank you and sorry for the confusion I have generated.
6by9 commentedon Oct 28, 2023
OK, you had me quite confused that we still appeared to have a leak. Having the debugfs hook to dump out the allocations doesn't hurt anyway.
If anyone else is able to test and confirm that they aren't seeing the error anymore, that would be awesome.
Brunnis commentedon Oct 28, 2023
I am the one that initially reported the issue on Ubuntu 23.10 in the forum thread. Since there's no easy way of applying the fix in Ubuntu (right?), I have applied it to a Raspberry Pi OS installation instead and so far so good. However, I don't think I've been able to reproduce the issue on RPi OS before the fix, so the fact that it works may not mean that much. I'll continue using the fix and let you know if I run into any issues.
Dark-Sky commentedon Oct 29, 2023
I have a guy on our forums keeps having this issue so I compiled the 6.1.58 kernel with your commits using commit 36ed2f9. He only had time for a short test but he appears to still be having the issue. He is using Gnome with Wayland. I do not seem to have the issue here on XFCE. I get no related output in journalctl while playing like he does.
My terminal output in XFCE:
Him playing with mpv compiled with jc-kynesim's ffmpeg6:
Requested info on his pi4:
6by9 commentedon Oct 30, 2023
@Dark-Sky That log doesn't include the
ERROR Failed to allocate DLIST entry: -28error that this issue is about.
swiotlb buffer is fullis a little worrying as I wouldn't expect there to need to be swiotlb usage under most situations.linux,cma: alloc failedis a totally different error.Brunnis commentedon Oct 30, 2023
I've been seeing that a lot on my Pi 4 as well. I believe on both RPi OS Bookworm and Ubuntu 23.10. Haven't made a report on it yet.
Dark-Sky commentedon Oct 30, 2023
I had questioned him about that earlier and he said he was getting the same error when he succeeded to open a TTY. Most of the time his system would just lock up was his response later on.
Dark-Sky commentedon Nov 1, 2023
Our forum member had some more time to test today and reported this:
6by9 commentedon Nov 1, 2023
So does that mean it is working?
If not, what kernel version are they actually running? And what client software?
Some of the reports providing the WARN backtrace including
drm_mode_rmfb_work_fnis weird.drm_mode_rmfbis generally called due todrmModeRmFBin userspace, which is destroying a FB mapping of a bo or DMABUF. This isn't something that I would expect to be happening that often, as you generally addFB during init, and destroy at exit.drm_framebuffer_removeis then doing a commit if the FB was active when removed.I'm wondering if this is on some app being killed, hence cleanup coming in and freeing all resources in one hit, thereby generating many commits. Even so, if not directly driving DRM to add lots of planes, then I wouldn't expect there to be lots of active FBs needing actually removing, but the accounting may not be that finely grained.
Dark-Sky commentedon Nov 1, 2023
I asked again today and this was his response still testing the using the kernel I compiled with your commits you had done above:
I have enabled a maximum of gnome-shell extension and apart from vc4-drm gpu: swiotlb buffer is full, I didn’t have any crash. But I think it takes a few days to be sure.
Seems to me it should have locked up by now.
6by9 commentedon Nov 2, 2023
That sounds positive. I've updated the PR, and will look to get it merged now.
67 remaining items
WilkuAgresor commentedon Jan 24, 2024
It repeated once before my script rebooted the pi. I'll disable the workaround and report when I catch it again.
6by9 commentedon Jan 24, 2024
I think we may have a read-modify-write issue between setting the DSPEISLUR and EOF enables - I'm seeing both bits 7 (0x80) and 9 (0x200) being enabled and disabled in SCALER_DISPCTRL via /sys/kernel/debug/dri/1/hvs_regs over updates, and they're done from different contexts.
I've created #5891 as a test which disables the underrun interrupt, so it should remove the race condition. It's a hack, but it would be useful if people could test to see if it does solve their issues. Once CI has completed,
sudo rpi-update pulls/5891should get the 6.1 kernel with that patch.pelwell commentedon Jan 24, 2024
The builds are done -
sudo rpi-update pulls/5891away (after backing up any important data etc.)WilkuAgresor commentedon Jan 29, 2024
Right now uptime is 5 days after the 'sudo rpi-update pulls/5891' and a reboot.
Linux testTerminal 6.1.74-v8+ #1 SMP PREEMPT Wed Jan 24 17:15:21 UTC 2024 aarch64 GNU/Linux
No issues found, everything works ok.
6by9 commentedon Jan 30, 2024
Thanks for testing - I was beginning to think no one had tested it.
I'll have a think about a clean way of implementing both underrun and EOF interrupt handling. It's tempting to just enable EOF permanently, but it adds some overhead triggering interrupts at 60Hz for each HVS channel.
anyc commentedon Jan 31, 2024
I can also confirm that it works for me for over one day now.
TRyan84 commentedon Feb 1, 2024
Hello,
ruining since 7 days on a cm3+, and it works.
Thanks
6by9 commentedon Feb 1, 2024
Thanks @WilkuAgresor, @TRyan84 and @anyc.
With the three of you confirming that the hack to drop underrun logging works, it gives me confidence that we have identified the cause, and just need to sort the proper fix.
I don't need any other confirmations that it works now.
hughmcmaster commentedon Feb 11, 2024
Can someone please tell me which kernel version has the relevant fixes for this issue?
I'm running Debian 12 Bookworm (arm64) on a RPi4 (8GB).
6by9 commentedon Feb 12, 2024
I've dropped underrun detection via #5935 which was merged 7:52PM Fri 8th Feb.
The last rpi-update bump was 3:41PM Fri 8th Feb, so hasn't picked it up yet.
AIUI using
sudo rpi-update rpi-6.6.yshould pick up the latest CI build from that branch, which should include it.TRyan84 commentedon Feb 14, 2024
Hello,
I update the System with sudo rpi-update rpi-6.6.y
Now I get this error:
[ 16.264098] alsactl[701]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
[ 16.873391] vc4_dsi 3f700000.dsi: transfer interrupt wait timeout
[ 16.873407] vc4_dsi 3f700000.dsi: instat: 0x00000000
[ 16.873425] [drm:vc4_dsi_host_transfer [vc4]] ERROR DSI transfer failed, resetting: -110
[ 17.113409] tc358762 3f700000.dsi.0: error initializing bridge (-110)
[ 17.115153] Console: switching to colour frame buffer device 100x30
[ 17.129595] vc4-drm soc:gpu: [drm] fb0: vc4drmfb frame buffer device
And the Display is kind of fuzzy...
Thanks.
Greetings
6by9 commentedon Feb 14, 2024
What DSI display are you using? Presumably the Pi 7" DSI panel as it's loading
tc358762.If a clone of the Pi display, then I largely don't care.
Nothing significant has changed with regard that driver or the DSI host controller.
Which kernel version were you on previously?
TRyan84 commentedon Feb 14, 2024
Hi 6by9
thanks for your answer.
Yes, I am using the Pi 7" DSI panel
The kernel version before was 6.1.63-v7, and I never saw this behavior
After a few resets, the error is gone.
I have 10 of them in my office, and after I power cycle 2 of them has the same error.
Thanks
Greetings
TRyan84 commentedon Feb 16, 2024
Hi 6by9,
sorry, I think my setup is the problem...
Greetings