Wrong incoming frame length

Bug #2025204 reported by You-Sheng Yang
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OEM Priority Project
In Progress
Undecided
Unassigned
v4l2loopback (Ubuntu)
Fix Released
Medium
Unassigned
Jammy
Fix Committed
Undecided
Unassigned
Lunar
Won't Fix
Undecided
Unassigned
Mantic
Fix Released
Medium
Unassigned

Bug Description

[SRU Justification]

[Impact]

v4l2loopback may give wrong incoming frame length, and video capturing client may freeze. Filed as https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2532 and https://github.com/umlaeute/v4l2loopback/issues/448.

[Fix]

Upstream v4l2loopback pull request https://github.com/umlaeute/v4l2loopback/pull/543 and its merged git commit https://github.com/umlaeute/v4l2loopback/pull/543/commits/175adaf96d6d3784b922d3e0c77e9fd3e9ad8f53.

[Test Case]

# start gst in one terminal
$ gst-launch-1.0 videotestsrc ! video/"x-raw,width=320,height=240" ! videoconvert ! v4l2sink device=/dev/video0

# start ffplay in another
ffplay -hide_banner -i /dev/video0

[Where problems could occur]

When compiled against older (< v5.2) kernel this is ineffective.

[Other Info]

========== original bug description ==========

To backport upstream fix https://github.com/umlaeute/v4l2loopback/pull/543 for https://github.com/umlaeute/v4l2loopback/issues/448.

"Gstreamer's v4l2sink is known to submit buffers with bytesused set to the length of the buffer instead of the size of the actual image-data within the buffer which is typically smaller due to buffer sizes being rounded op to a page-size: ..."

Revision history for this message
You-Sheng Yang (vicamo) wrote : Re: [Bug 2025204] [NEW] Wrong incoming frame length

Pushed new versions to PPA in
https://launchpad.net/~vicamo/+archive/ubuntu/ppa-2025204. The
original symptom is no longer reproducible on all Jammy kernels
generic-5.15.0-77, oem-5.17, hwe-5.19, oem-6.0, oem-6.1, and hwe-6.2.
Still attached debdiffs for reference, but I'll invalidate this update
attempt until proven necessary.

Changed in v4l2loopback (Ubuntu Jammy):
status: New → Invalid
Changed in v4l2loopback (Ubuntu Lunar):
status: New → Invalid
Changed in v4l2loopback (Ubuntu Mantic):
status: New → Invalid
Revision history for this message
You-Sheng Yang (vicamo) wrote :

Mark as INVALID per comment #1.

Revision history for this message
You-Sheng Yang (vicamo) wrote :

Reopen this after re-tested with v4l2-relayd disabled, and following the verification steps on https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2532:

# start gst in one terminal
$ gst-launch-1.0 videotestsrc ! video/"x-raw,width=320,height=240" ! videoconvert ! v4l2sink device=/dev/video0

# start ffplay in another
ffplay -hide_banner -i /dev/video0

Changed in v4l2loopback (Ubuntu Jammy):
status: Invalid → In Progress
Changed in v4l2loopback (Ubuntu Lunar):
status: Invalid → In Progress
Changed in v4l2loopback (Ubuntu Mantic):
status: Invalid → In Progress
Revision history for this message
You-Sheng Yang (vicamo) wrote :

Need sponsoring.

description: updated
Benjamin Drung (bdrung)
Changed in v4l2loopback (Ubuntu Mantic):
assignee: nobody → Benjamin Drung (bdrung)
Revision history for this message
Benjamin Drung (bdrung) wrote :

Thanks for the contribution. This sponsor request was perfectly prepared. I only simplified the version number for lunar from 0.12.7-2ubuntu3.23.04.1 to 0.12.7-2ubuntu3.1, because the version 0.12.7-2ubuntu3 is only present in lunar.

I uploaded 0.12.7-2ubuntu4 to mantic, 0.12.7-2ubuntu3.1 to lunar, and 0.12.7-2ubuntu2~22.04.2 to jammy.

Changed in v4l2loopback (Ubuntu Mantic):
assignee: Benjamin Drung (bdrung) → nobody
status: In Progress → Fix Committed
Changed in v4l2loopback (Ubuntu Jammy):
status: In Progress → New
Changed in v4l2loopback (Ubuntu Lunar):
status: In Progress → New
Changed in v4l2loopback (Ubuntu Mantic):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package v4l2loopback - 0.12.7-2ubuntu4

---------------
v4l2loopback (0.12.7-2ubuntu4) mantic; urgency=medium

  * Fix wrong income frame length. (LP: #2025204)
    - v4l2loopback: Fixup bytesused field when writer sends a too large value

 -- You-Sheng Yang <email address hidden> Wed, 05 Jul 2023 14:05:05 +0200

Changed in v4l2loopback (Ubuntu Mantic):
status: Fix Committed → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello You-Sheng, or anyone else affected,

Accepted v4l2loopback into lunar-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/v4l2loopback/0.12.7-2ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-lunar to verification-done-lunar. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-lunar. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in v4l2loopback (Ubuntu Lunar):
status: New → Fix Committed
tags: added: verification-needed verification-needed-lunar
Changed in v4l2loopback (Ubuntu Jammy):
status: New → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello You-Sheng, or anyone else affected,

Accepted v4l2loopback into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/v4l2loopback/0.12.7-2ubuntu2~22.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in oem-priority:
status: New → In Progress
You-Sheng Yang (vicamo)
tags: added: verification-done verification-done-jammy verification-done-lunar
removed: verification-needed verification-needed-jammy verification-needed-lunar
Revision history for this message
Benjamin Drung (bdrung) wrote :

You-Sheng, please document the output of your tests and package version number in addition to setting the verification-done tags.

Revision history for this message
Robie Basak (racb) wrote :

Swapping the tags back as this is still awaiting documented verification. Please see the instructions in comment 7.

tags: added: verification-needed verification-needed-jammy verification-needed-lunar
removed: verification-done verification-done-jammy verification-done-lunar
Revision history for this message
Brian Murray (brian-murray) wrote :

Ubuntu 23.04 (Lunar Lobster) has reached end of life, so this bug will not be fixed for that specific release.

Changed in v4l2loopback (Ubuntu Lunar):
status: Fix Committed → Won't Fix
Rex Tsai (chihchun)
tags: added: oem-priority
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.