bcm2835-codec: a second encoder STOP during drain produces duplicate EOS
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 40/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- c, linux
- Lĩnh vực
- embedded-iot
Hướng nghiên cứu
Start in drivers/media/platform/raspberrypi/bcm2835-codec/bcm2835-v4l2-codec.c, at the VIDIOC_ENCODER_CMD handler that services V4L2_ENC_CMD_STOP and calls the drain/EOS path, and follow where the driver records that a drain is in progress. Find the existing guard that is skipped before both queues are streaming (referenced in #7733) and extend it so a second STOP, or a START while draining, returns EBUSY once drain has begun. Done means a double-STOP reports a single EOS event and stream teardown finishes without the bcm2835_codec_flush_buffers timeout — reproduce with the two-STOP sequence on a CM4, as the report and its logged output describe.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
On a Compute Module 4, a second V4L2_ENC_CMD_STOP while an H.264 encode is draining returns success. The driver submits EOS twice. In the immediate double-STOP test, stream teardown then timed out with one buffer outstanding. The second STOP should return EBUSY while the first drain is in progress.
Steps to reproduce the behaviour
- On a CM4 with an unmodified 64-bit rpi-6.18.y kernel, open /dev/video11 and configure H.264 capture and YUV420 output. Start both queues and encode a picture.
- Queue 12 more source frames and enough capture buffers.
- Call VIDIOC_ENCODER_CMD with V4L2_ENC_CMD_STOP twice before dequeuing the CAPTURE buffer marked LAST.
- Dequeue the buffers and EOS events, then stop streaming.
Expected: the second STOP returns EBUSY, one EOS is reported, and teardown completes without a timeout.
Observed: both STOP calls returned success and two EOS events were reported. An immediate second STOP also caused a teardown timeout with one buffer outstanding. A second STOP 250 ms later still produced two EOS events.
Device (s)
Raspberry Pi CM4
System
Board: Raspberry Pi Compute Module 4.
OS: Minimal RAM-based test environment; no Raspberry Pi OS image was used.
Kernel: unmodified 64-bit rpi-6.18.y at adb947547136096c91f037dd392cd8af3aa98451 (6.18.64-v8).
Firmware version: not recorded for this test.
Logs
Selected serial/test output from the unmodified kernel:
STOP #1: ret=0 errno=0 (Success) at 9565 ms
STOP #2: ret=0 errno=0 (Success) at 9565 ms
drain: result=complete, output=12/12, LAST=yes, EOS_events=2
[ 11.935653] bcm2835-codec bcm2835-codec: bcm2835_codec_flush_buffers: Timeout waiting for buffers to be returned - 1 outstanding
A single STOP under the same conditions produced one EOS event and no timeout.
Additional context
A local change that rejects a second STOP or a START during drain with EBUSY was built and tested on rpi-6.18.y at 731e90c14fb88950a44575276f2f190493af713f. On the same CM4 it produced one EOS event and no teardown timeout; START after a completed drain resumed encoding. The existing behavior before both queues are streaming was left unchanged (see #7733).
- Ngôn ngữ chính
- C
- Star
- 13.4k
- Fork
- 5.5k
- Merge trung bình
- 2 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 32
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của raspberrypi/linux
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
raspberrypi/linux#7415 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
rp1-cfe doesn't forward V4L2_EVENT_SOURCE_CHANGE event from csi-2 sensor driver to userspace appĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
raspberrypi/linux#7399 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Documentation update requiredĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
raspberrypi/linux#7357 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
raspberrypi/linux#7054 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
v3d: [drm:v3d_reset [v3d]] *ERROR* V3D_ERR_STAT: 0x00001000 when running app that uses vulkanĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
raspberrypi/linux#7790 · 18 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của raspberrypi/linux
Issue tương tự
-
nuttx/esp32s3: sdkconfig.h has no "no console" case, so CONFIG_NO_SERIAL_CONSOLE builds failĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Document the isv:HDFGroup Linux package repositories and signing keyCó thể đã có người làm @brtnfld đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug status: planned
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ChupathingyCE/chupathingyce#1834 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày