Public bug reported: On Ubuntu 24.04 (Noble) with the HWE 7.0 kernel (7.0.0-28-generic), v4l2loopback fails to build with the stock package (see bug #2161037). After manually applying a community-suggested compile fix (https://github.com/v4l2loopback/v4l2loopback/issues/669#issuecomment-5011058299) for the v4l2_fh_add/v4l2_fh_del kernel API signature change, the module compiles and loads successfully. However, actually streaming through the resulting /dev/videoX device causes a complete system hard-freeze.
Reproduced 3/3 times (2x via ffplay, 1x via v4l2-ctl --stream-mmap). Symptoms: display becomes fully unresponsive, keyboard LEDs still toggle but no input is processed, SysRq/REISUB does not respond, machine stays reachable over the network (SSH), requiring a hard power cycle to recover. No kernel oops/panic was captured in the journal before the freeze -- the log simply stops. This does NOT reproduce on kernel 6.17.0-40-generic with the identical userspace pipeline (same v4l2loopback source, same docker-based ffmpeg writer, same ffplay/v4l2-ctl reader). Filed upstream as a separate issue from the build failure: https://github.com/v4l2loopback/v4l2loopback/issues/670 A maintainer commented on that upstream issue suggesting this could be related to https://github.com/v4l2loopback/v4l2loopback/issues/532 (missing list protection against concurrent access in 0.12.7, potentially causing a panic), and confirmed the current main branch (0.15.4) runs on kernel 7.0+ without this issue. Given Ubuntu's packaged version (0.12.7) is 9 releases behind upstream, this may already be fixed by updating the packaged version rather than needing a targeted backport. Steps to reproduce: 1. Apply the compile fix from the comment linked above to /usr/src/v4l2loopback-0.12.7/v4l2loopback.c and rebuild via DKMS for kernel 7.0.0-28-generic 2. Write to the loopback device via ffmpeg (dockerized): docker run --rm --device=/dev/video0:/dev/video0 jrottenberg/ffmpeg -loop 1 -re -i /data/image.png -f v4l2 -vcodec rawvideo -pix_fmt yuv420p /dev/video0 3. On the host, read from the device: v4l2-ctl --device=/dev/video0 --stream-mmap --stream-count=5 --stream-to=/tmp/test.raw or: ffplay /dev/video0 4. System hard-freezes within seconds. Expected: streaming works without crashing, as it does on kernel 6.17.0-40-generic. Configuration: - v4l2loopback version: 0.12.7 (patched per the comment above for kernel 7.0 API compat) - kernel version: 7.0.0-28-generic (x86_64) -- reproduced; NOT reproduced on 6.17.0-40-generic - Distribution: Ubuntu 24.04 LTS (Noble Numbat), HWE kernel from linux-signed-hwe-7.0 - GPU: NVIDIA (proprietary driver 595.71.05, DKMS) + AMD iGPU (amdgpu), hybrid graphics, Wayland session --- Filed with the help of Claude (Anthropic). ** Affects: v4l2loopback (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2161239 Title: v4l2loopback 0.12.7 causes full system hard-freeze when streaming on kernel 7.0 HWE To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/v4l2loopback/+bug/2161239/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
