Bug 2273497
| Summary: | snapshot crashes on launch or after taking a picture, console error "thread 'main' has overflowed its stack", backtrace is 4000+ frames and inc "Cannot access memory at address 0xffffffffffffffff" (Logitech C920 camera) | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Adam Williamson <awilliam> |
| Component: | gtk4 | Assignee: | GNOME SIG Unassigned <gnome-sig> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | urgent | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 40 | CC: | bdm, decathorpe, fzatlouk, geraldo.simiao.kutz, gnome-sig, kevin, klember, lruzicka, mcatanza, mclasen, robatino, rust-sig |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | AcceptedBlocker | ||
| Fixed In Version: | gtk4-4.14.2-2.fc40 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2024-04-10 03:12:56 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 2187794 | ||
|
Description
Adam Williamson
2024-04-04 19:02:29 UTC
I think https://retrace.fedoraproject.org/faf/problems/bthash/?bth=3abf01d239c53a7c493bead5126b161db4831dd0&bth=298bb63f91ff2f310762f6002368c0e9050f4fe8 is the FAF problem for this issue (note the same looping pair of frames in the backtrace, which is cut off at 256 frames). It has 31 reports so far, indicating this is fairly widespread, I think. Looks like a regression from https://gitlab.gnome.org/GNOME/gtk/-/commit/cfaddb5d47d8d49d8846d5b21c21275fb62790c2 I can't reproduce this bug with snapshot-46.1-1.fc40 Setup: Updated F40 Workstation on KVM virt-manager (F40 KDE host) Chipset Q35 / UEFI / CPU host-passthrough) HD WEBCAM - host acer notebook integrated - passthrough I can reproduce with snapshot-46.1-1.fc40.x86_64 and a Logi(tech) C920 HD Pro Webcam. Launching from the gnome-shell launcher: This gives me an empty window with "No camera found". I suspect the "who's faster? rendering the window or asking for camera permission (which is only granted for apps with windows)?" race condition is back. Launching "snapshot" from a terminal: 2024-04-05T08:35:06.147248Z INFO snapshot::application::imp: Snapshot (org.gnome.Snapshot) 2024-04-05T08:35:06.147267Z INFO snapshot::application::imp: Version: 46.1 2024-04-05T08:35:06.147270Z INFO snapshot::application::imp: Datadir: /usr/share/snapshot 2024-04-05T08:35:06.338168Z INFO ashpd::desktop::request: Creating a org.freedesktop.portal.Request /org/freedesktop/portal/desktop/request/1_106/ashpd_jyhANXXPZw 2024-04-05T08:35:06.339340Z INFO ashpd::desktop::request: Received signal 'Response' on 'org.freedesktop.portal.Request' 2024-04-05T08:35:06.339361Z INFO ashpd::proxy: Calling method org.freedesktop.portal.Camera:OpenPipeWireRemote thread 'main' has overflowed its stack fatal runtime error: stack overflow Aborted (core dumped) aha. indeed, my camera is also a C920. Not sure why that matters, but apparently it does. Does launching Snapshot from the overview not cause the "no camera found" problem like it does for me and Fabio? If we had more testing with other buildin webcam and/or camera models, that would be great. snapshot-46.1-2.fc41 here does not crash, but also... doesn't work. ;) snapshot-46.1-1.fc41 same framework laptop here. If it would help, can boot on a f40 live to see what happens there. Did you run it from the overview? Did it say it couldn't find a camera? If you run it from a console, does it work? The interface comes up from either cli or overview, it just says "could not play camera stream" in a little dialog at the bottom, and of course the interface with no camera shows no camera images. Command line it outputs:
2024-04-06T17:17:03.265709Z ERROR aperture::viewfinder: Could not start camerabin: Element failed to change its state
2024-04-06T17:17:03.290614Z ERROR aperture::viewfinder: Could not start camerabin: Element failed to change its state
2024-04-06T17:17:03.292174Z ERROR aperture::viewfinder: Bus Error from Some("/GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")
stream error: error output enum formats: Invalid argument
Some("../src/gst/gstpipewiresrc.c(689): on_state_changed (): /GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")
2024-04-06T17:17:03.292256Z ERROR aperture::viewfinder: Bus Error from Some("/GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")
Internal data stream error.
I don't know if this is just a different rawhide issue or not. :(
(In reply to Adam Williamson from comment #8) > Did you run it from the overview? Did it say it couldn't find a camera? If > you run it from a console, does it work? I have the HD920 webcam, currently I can run from the console window and take a picture. If I try for the overview I get a blank window with a spinning cursor for as long as I care to wait. snapshot-46.1-1 here on F40 with everything up to date from -testing repos. 2nd try from overview or application menu and I get "No camera found". Not sure why the original run just sat with spinning cursor. My camera is some Trust piece, reported as `Bus 003 Device 009: ID 1bcf:2701 Sunplus Innovation Technology Inc. HD 720P webcam` and the application works normally for me. Discussed during the 2024-04-08 blocker review meeting: [1] The decision to classify this bug as a AcceptedBlocker (Final) was made: "Both because a crash on a widely-used camera model (we found three affected people easily) is bad enough to block on its own, and we found other issues in snapshot in testing (for nirik it doesn't crash but never shows anything, and many folks found it shows 'No Camera Found' when run from overview). we recommend that we revert to Cheese again for F40 final " [1] https://meetbot.fedoraproject.org/blocker-review_matrix_fedoraproject-org/2024-04-08/f40-blocker-review.2024-04-08-16.00.html We already identified the GTK commit that introduced this crash. There is no need to revert to Cheese. Worst case scenario, we would revert that GTK commit.
> for nirik it doesn't crash but never shows anything, and many folks found it shows 'No Camera Found' when run from overview
Please report new bugs (here if needed for blocker tracking purposes, but most importantly upstream).
https://bugzilla.redhat.com/show_bug.cgi?id=2274061 for the "No Camera Found" one. There are multiple "no camera found" bugs open upstream, not sure which would be best to link that report to. I've asked nirik to report his framework laptop failure bug separately too. Anyone else hitting anything that's not the C920 crash, not the thing where you get "no camera found" from the overview but it works from a terminal, and not failure with a framework laptop camera, please file another bug and link it here. Mine seems to be: https://gitlab.gnome.org/GNOME/snapshot/-/issues/134 Michael: BTW, the last practical day to do a candidate for Thursday's go/no-go is tomorrow, so if we don't have a better fix for this crash and we don't want to drop snapshot, we're gonna need the GTK revert today or early tomorrow I guess. Thanks! Unfortunately I'm not able to reproduce this crash myself. I am hoping it goes away if you run snapshot with this environment variable: GSK_RENDERER=gl Can somebody who can reproduce confirm this please? If so, we can use that as an emergency workaround. Running "GSL_RENDERER=gl snapshot" fixes the crash on both systems where snapshot previously crashed for me. With that it doesn't *crash* any more, but I get a "Could not play camera stream" error, and no video. Changing the camera access in Privacy & Security (per the other bug) doesn't change that. On the console I get:
[adamw@xps13a os-autoinst-distri-fedora (main %)]$ GSL_RENDERER=gl snapshot
2024-04-09T15:34:18.994303Z INFO snapshot::application::imp: Snapshot (org.gnome.Snapshot)
2024-04-09T15:34:18.994330Z INFO snapshot::application::imp: Version: 46.1
2024-04-09T15:34:18.994338Z INFO snapshot::application::imp: Datadir: /usr/share/snapshot
2024-04-09T15:34:19.218885Z INFO ashpd::desktop::request: Creating a org.freedesktop.portal.Request /org/freedesktop/portal/desktop/request/1_1105/ashpd_et6RFHPbXF
2024-04-09T15:34:19.221591Z INFO ashpd::desktop::request: Received signal 'Response' on 'org.freedesktop.portal.Request'
2024-04-09T15:34:19.221650Z INFO ashpd::proxy: Calling method org.freedesktop.portal.Camera:OpenPipeWireRemote
2024-04-09T15:34:19.310090Z ERROR aperture::viewfinder: Could not start camerabin: Element failed to change its state
2024-04-09T15:34:19.315716Z ERROR aperture::viewfinder: Could not start camerabin: Element failed to change its state
2024-04-09T15:34:19.316272Z ERROR aperture::viewfinder: Bus Error from Some("/GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")
stream error: error output enum formats: No such file or directory
Some("../src/gst/gstpipewiresrc.c(689): on_state_changed (): /GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")
2024-04-09T15:34:19.316294Z ERROR aperture::viewfinder: Bus Error from Some("/GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")
Internal data stream error.
Some("../libs/gst/base/gstbasesrc.c(3132): gst_base_src_loop (): /GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir:\nstreaming stopped, reason not-negotiated (-4)")
Hm, and that is separate from bug #2274061, and you suspect it is caused by the environment variable? Well, good news: we have a fix in GTK that I am building now, so hopefully we won't even need the environment variable hack. oh, no, that actually seems like it was some other temporary blip, cos it also affects snapshot without GSL_RENDERER=gl . unplugging and replugging the camera cleared it, and now I can see the stream with `GSL_RENDERER=gl snapshot`. however, that doesn't fix this crash for me, it still crashes with the stack overflow. I'll see if the GTK fix helps when it's ready. FEDORA-2024-6f3aeca158 (gtk4-4.14.2-2.fc40) has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2024-6f3aeca158 confirmed, that does seem to fix the crash. thanks. FEDORA-2024-6f3aeca158 has been pushed to the Fedora 40 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-6f3aeca158` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-6f3aeca158 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2024-6f3aeca158 (gtk4-4.14.2-2.fc40) has been pushed to the Fedora 40 stable repository. If problem still persists, please make note of it in this bug report. |