Repository navigation
Conversation
…ken away Zones refuse inotify, since a watch on the /usr they share with zone 0 would see every program started. WebRTC's V4L2 device code learned of cameras only by inotify, so a camera granted after a page loaded was never listed, and pages got no devicechange. A fifth Firefox patch makes its inotify thread fall back, when inotify_init fails, to looking for /dev/video<n> once a second. It reports a change when the set differs, and the zone's dangling /dev/video0 link reads as absent. The thread still stops within 100 ms of shutdown. Its capture thread polled a camera that was taken away in a busy loop: the node answers POLLERR or POLLHUP and never POLLIN. The thread now ends there. STREAMON precedes the thread and StopCapture joins it first, so a POLLERR while it runs is the device or its queue failing. The user guide's camera notes follow.
DevomB
marked this pull request as ready for review
October 29, 2026 15:23
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the audit's camera:2, as a fifth patch to Firefox 153.6.0 ESR (
build/patches/firefox-153.6.0/0005-v4l2-camera-changes-without-inotify.patch, plus its SHA256SUMS line and README entry).No inotify in zones. The zone filter refuses inotify on purpose, because a watch on the
/usrthat zones share with zone 0 would see every program started. It refuses with an errno, soinotify_initfails. WebRTC's V4L2 device code learns of cameras only by inotify (DeviceInfoV4l2::InotifyProcess), so in a zone a camera granted after a page loaded was never listed, and pages got nodevicechange.inotify_initfails, the thread closes whichever one opened./dev/video0…63withaccess()once a second and callsDeviceChange()whenever the set differs._isShutdownevery 100 ms, so the destructor's join is no slower./dev/video0link dangles and reads as absent.The busy loop on a camera taken away.
VideoCaptureModuleV4L2::CaptureProcessreturned true whenever poll's events lacked POLLIN. A node that is gone answersPOLLERR|POLLHUPat once, so the capture thread spun on a core. It now returns false on POLLERR, POLLHUP or POLLNVAL, which ends the thread. STREAMON comes before the thread starts, and StopCapture joins the thread before streaming stops. So while the thread runs, vb2's POLLERR means the queue failed or the device went away.WebRTC is built, and with
--disable-dbusthe PipeWire camera portal is off, so this V4L2 code is Firefox's camera path here.Whether Firefox then ends the track and closes the node is for the tests on physical hardware. The next grant waits for it to (
camera.rs). The user guide's camera notes now say Firefox looks once a second, and drop the busy core.Check: the browser image builds with the patch:
apply_repo_patcheswith-F0, then GCC 14. No CI suite drives Firefox's camera, and this changes the browser image's cache key, so the next Distro run rebuilds the browser.Testing on physical hardware is planned for October 2026.