Skip to content

docs(linux): add the camera-enumeration WebKit crash - #6598

Open
jramiresbrito wants to merge 1 commit into
block:mainfrom
jramiresbrito:docs/webkit-camera-enumeration-crash
Open

docs(linux): add the camera-enumeration WebKit crash#6598
jramiresbrito wants to merge 1 commit into
block:mainfrom
jramiresbrito:docs/webkit-camera-enumeration-crash

Conversation

@jramiresbrito

Copy link
Copy Markdown

Summary

Documents a WebKitGTK crash that presents as a hang, so Linux users can identify
it in one command and work around it today. Docs only — no code changes.

Found while debugging #6339. The root cause is upstream in WebKit, not in Buzz;
this adds the detection steps and workaround while that is fixed.

What happens

When a page calls navigator.mediaDevices.enumerateDevices(), WebKit builds
video presets for every capture device it can see.
GStreamerVideoCaptureSource.cpp handles a framerate that is a fraction range
or a single fraction, and otherwise assumes a list. When the field is absent,
gst_structure_get_value() returns NULL and gstStructureGetList() aborts the
web process on a RELEASE_ASSERT that sits one line above its own graceful
early-return:

const GValue* list = gst_structure_get_value(structure, key.utf8());
RELEASE_ASSERT(GST_VALUE_HOLDS_LIST(list));   // kills the web process
if (!GST_VALUE_HOLDS_LIST(list)) {            // unreachable
    GST_WARNING("Structure field %s does not hold a list", key.utf8());
    return result;
}

Symbolicated from a core dump:

#2  abort ()
#3  WTFCrashWithInfo(int, char const*, char const*, int)   WTF/Assertions.h:987
#4  gstStructureGetList<double>()                          GStreamerCommon.cpp:1460
#5  generatePresets()                                      GStreamerVideoCaptureSource.cpp:326
#8  capabilities()                                         GStreamerVideoCaptureSource.cpp:256
#25 enumerateDevices()                                     RealtimeMediaSourceCenter.cpp:307

Intel IPU6 laptops trigger it because the sensor is published twice — once via
icamerasrc/v4l2loopback, which is fine, and once via libcamera with no
framerate field.

Why it is worth documenting separately

It does not look like the other entries in this guide. The window paints
normally, then freezes on whatever it last drew roughly 20-30 seconds later.
Buzz prints nothing, and any "is the web process alive?" check in the first
~15 seconds reports healthy. It reads as a hang or a slow network, so the
existing rendering sections do not lead anyone to it.

Verified on

  • Dell XPS 9320, Intel IPU6 (ov01a10), Ubuntu 26.04, GNOME/Wayland
  • webkit2gtk 2.52.3-0ubuntu0.26.04.3
  • Buzz 0.5.17 (deb) and 0.5.18 from source, both affected
  • Before the workaround: crashed 6/6 launches
  • After: stock .deb, clean environment, 5/5 launches loaded the UI and were
    still alive at 60s

The workaround leaves the working camera in place — on IPU6 the capture path is
icamerasrcv4l2loopback, which does not involve libcamera.

Upstream

The fix belongs in WebKit: drop the RELEASE_ASSERT so the existing
GST_WARNING and early return can skip the device instead of killing the
process. Still present on WebKit main (GStreamerCommon.cpp:1403-1408).
bugs.webkit.org was unreachable at the time of writing; I will file it there
once it is back.

Refs #6339

A page calling navigator.mediaDevices.enumerateDevices() aborts the
WebKitGTK web process when any capture device advertises caps with no
framerate field. GStreamerVideoCaptureSource handles a fraction range and
a single fraction and otherwise assumes a list, so an absent field reaches
gstStructureGetList, whose RELEASE_ASSERT sits one line above its own
graceful early-return.

Intel IPU6 laptops hit this because the sensor is published twice: once
through icamerasrc/v4l2loopback, which is fine, and once through libcamera
with no framerate. The crash lands ~20-30s after first paint, so it reads
as a hang rather than a crash and any check in the first few seconds sees
a healthy process.

Documents how to detect it in one command and how to hide the duplicate
device, which needs disabling libcamera in both PipeWire and GStreamer.
The real fix belongs upstream in WebKit.

Refs block#6339

Signed-off-by: Joao Victor Ramires <joao@blueonionlabs.com>
@jramiresbrito
jramiresbrito requested a review from a team as a code owner August 23, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant