Crash when using H264 and MJPEG M2M encoders on V4L2_MEMORY_DMABUF buffers
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- c, linux
- Domain
- embedded-iot, operating-systems
Research direction
Reproduce the crash with the TC358743 setup, V4L2_MEMORY_DMABUF buffers, and the ustreamer command shown in the issue. Start by examining the video_encode V4L2 M2M path and the resulting dmesg messages. Done means H264 and MJPEG can run simultaneously for many hours without a kernel crash.
Written by the indexing model from the issue text.
Description
Describe the bug
When encoding H264 and MJPEG simultaneously using V4L2 M2M encoders (video_encode component), when the image source buffer is of type V4L2_MEMORY_DMABUF, a kernel crash occurs after a few minutes.
To reproduce
0. TC358743 video capture and any 1080p signal source are used for reproducing.
- Add
cma=128Mto/boot/cmdline.txt. - Add this to
/boot/config.txt(some used to debug):gpu_mem=128 enable_uart=1 dtoverlay=tc358743 dtoverlay=disable-bt start_x1=1 - Compile ustreamer:
sudo apt-get install git libevent-dev libjpeg9-dev libbsd-dev git clone --depth=1 --branch=m2m https://github.com/pikvm/ustreamer cd ustreamer make -j5 - Download and apply EDID:
wget https://raw.githubusercontent.com/pikvm/kvmd/master/configs/kvmd/tc358743-edid.hex v4l2-ctl --device=/dev/video0 --set-edid=file=tc358743-edid.hex --fix-edid-checksums - Run ustreamer. Wait 5-10 minutes and you will see the crash in dmesg. After that, you will be able to press Ctrl+C on ustreamer and see a few more messages related to this:
./ustreamer --device=/dev/video0 --persistent --dv-timings --format=uyvy --encoder=m2m-video --workers=1 --h264-sink=test --host=::
Expected behaviour
No crash and stable operation for many hours.
Actual behaviour
Crash, pain and despair.
System
raspinfo.txt
Logs
See raspinfo ^^^
- Dominant language
- C
- Stars
- 13.2k
- Forks
- 5.5k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 21
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raspberrypi/linux
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7415 · 2 comments · 1 reaction ·
-
rp1-cfe doesn't forward V4L2_EVENT_SOURCE_CHANGE event from csi-2 sensor driver to userspace app Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
raspberrypi/linux#7399 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
raspberrypi/linux#7357 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7054 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
raspberrypi/linux#7634 · 8 comments · 1 reaction ·
All issues in raspberrypi/linux
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
zephyrproject-rtos/zephyr#119726 ·
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BasedHardware/omi#15320 ·
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·