Bug 2269649 - [abrt] guvcview: _gtk_css_value_compute(): guvcview killed by SIGSEGV
Summary: [abrt] guvcview: _gtk_css_value_compute(): guvcview killed by SIGSEGV
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gtk3
Version: 39
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:6be1d39d422e0fefb657a84d58e...
Depends On:
Blocks: Framework
TreeView+ depends on / blocked
 
Reported: 2024-03-15 04:48 UTC by kvakil
Modified: 2024-11-13 18:41 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-11-13 18:41:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: proc_pid_status (1.48 KB, text/plain)
2024-03-15 04:48 UTC, kvakil
no flags Details
File: maps (4.00 KB, text/plain)
2024-03-15 04:48 UTC, kvakil
no flags Details
File: limits (1.29 KB, text/plain)
2024-03-15 04:48 UTC, kvakil
no flags Details
File: open_fds (3.71 KB, text/plain)
2024-03-15 04:48 UTC, kvakil
no flags Details
File: mountinfo (3.20 KB, text/plain)
2024-03-15 04:48 UTC, kvakil
no flags Details
File: os_info (734 bytes, text/plain)
2024-03-15 04:48 UTC, kvakil
no flags Details
File: cpuinfo (3.36 KB, text/plain)
2024-03-15 04:48 UTC, kvakil
no flags Details
File: core_backtrace (53.29 KB, text/plain)
2024-03-15 04:48 UTC, kvakil
no flags Details
File: exploitable (81 bytes, text/plain)
2024-03-15 04:48 UTC, kvakil
no flags Details
File: dso_list (158 bytes, text/plain)
2024-03-15 04:48 UTC, kvakil
no flags Details
File: backtrace (133.83 KB, text/plain)
2024-03-15 04:49 UTC, kvakil
no flags Details
File: environ (3.43 KB, text/plain)
2024-03-15 04:49 UTC, kvakil
no flags Details
backtrace from one of my crashed attempts (33.84 KB, text/plain)
2024-03-28 19:37 UTC, Adam Williamson
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNOME Gitlab GNOME gtk issues 6611 0 None opened Some apps (guvcview, gnome-connections...) crash in GTK 3 CSS code when running on GNOME on Wayland 2024-04-04 23:54:17 UTC
freedesktop.org Gitlab libdecor libdecor issues 72 0 None opened guvcview (with SDL backend, which uses libdecor) crashes in GTK CSS code on startup on Wayland 2024-04-19 19:40:25 UTC

Description kvakil 2024-03-15 04:48:20 UTC
Description of problem:
Crashes very soon after starting.

Version-Release number of selected component:
guvcview-2.0.8-6.fc39

Additional info:
reporter:       libreport-2.17.11
type:           CCpp
reason:         guvcview killed by SIGSEGV
journald_cursor: s=8629d2e1a34d4aa8a505c7a7b72ea5ac;i=1e7a9;b=a9a9c12df89246459aab8984036054fc;m=91465ce5f;t=60f6d1e16d407;x=ccab1a8775872d89
executable:     /usr/bin/guvcview
cmdline:        guvcview
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-org.gnome.Terminal.slice/tmux-spawn-a0198cc8-4a35-4b26-a290-08e36c0119f7.scope
rootdir:        /
uid:            1000
kernel:         6.6.11-200.fc39.x86_64
package:        guvcview-2.0.8-6.fc39
runlevel:       N 5
backtrace_rating: 4
crash_function: _gtk_css_value_compute
comment:        Crashes very soon after starting.

Truncated backtrace:
Thread no. 1 (15 frames)
 #0 _gtk_css_value_compute at ../gtk/gtkcssvalue.c:97
 #1 gtk_css_value_position_compute at ../gtk/gtkcsspositionvalue.c:48
 #2 gtk_css_value_array_compute at ../gtk/gtkcssarrayvalue.c:59
 #3 gtk_css_static_style_compute_value at ../gtk/gtkcssstaticstyle.c:237
 #4 _gtk_css_lookup_resolve at ../gtk/gtkcsslookup.c:122
 #5 gtk_css_static_style_new_compute at ../gtk/gtkcssstaticstyle.c:195
 #6 gtk_css_node_create_style at ../gtk/gtkcssnode.c:371
 #7 gtk_css_node_real_update_style at ../gtk/gtkcssnode.c:425
 #8 gtk_css_node_ensure_style at ../gtk/gtkcssnode.c:1007
 #12 gtk_css_node_get_style at ../gtk/gtkcssnode.c:1033
 #13 gtk_style_context_lookup_style at ../gtk/gtkstylecontext.c:494
 #14 _gtk_style_context_peek_property at ../gtk/gtkstylecontext.c:1642
 #15 gtk_widget_update_alpha at ../gtk/gtkwidget.c:16098
 #16 gtk_widget_realize at ../gtk/gtkwidget.c:5541
 #17 gtk_widget_set_parent at ../gtk/gtkwidget.c:9663

Comment 1 kvakil 2024-03-15 04:48:27 UTC
Created attachment 2021714 [details]
File: proc_pid_status

Comment 2 kvakil 2024-03-15 04:48:31 UTC
Created attachment 2021715 [details]
File: maps

Comment 3 kvakil 2024-03-15 04:48:34 UTC
Created attachment 2021716 [details]
File: limits

Comment 4 kvakil 2024-03-15 04:48:38 UTC
Created attachment 2021717 [details]
File: open_fds

Comment 5 kvakil 2024-03-15 04:48:41 UTC
Created attachment 2021718 [details]
File: mountinfo

Comment 6 kvakil 2024-03-15 04:48:45 UTC
Created attachment 2021719 [details]
File: os_info

Comment 7 kvakil 2024-03-15 04:48:48 UTC
Created attachment 2021720 [details]
File: cpuinfo

Comment 8 kvakil 2024-03-15 04:48:51 UTC
Created attachment 2021721 [details]
File: core_backtrace

Comment 9 kvakil 2024-03-15 04:48:55 UTC
Created attachment 2021722 [details]
File: exploitable

Comment 10 kvakil 2024-03-15 04:48:58 UTC
Created attachment 2021723 [details]
File: dso_list

Comment 11 kvakil 2024-03-15 04:49:02 UTC
Created attachment 2021724 [details]
File: backtrace

Comment 12 kvakil 2024-03-15 04:49:05 UTC
Created attachment 2021725 [details]
File: environ

Comment 13 Adam Williamson 2024-03-28 19:35:22 UTC
So, I can reproduce this, on two systems. There actually seem to be some different variations on the crash, but it always crashes soon after startup, when run as a regular user.

It does *not* crash (for Matt Hartley, who pointed this out, or for me, at least) when run as root.

The backtraces differ a bit, but always wind up running through the GTK CSS code.

Comment 14 Adam Williamson 2024-03-28 19:37:52 UTC
Created attachment 2024079 [details]
backtrace from one of my crashed attempts

Here's the backtrace from one of my crashes. This is with 2.0.8. I have built 2.1.0 and confirmed that still crashes.

Comment 15 Adam Williamson 2024-03-28 19:39:35 UTC
This is the "should not be reached" code we hit in my traceback, from GTK gtk/gtkcssinheritvalue.c :

static void G_GNUC_NORETURN
gtk_css_value_inherit_free (GtkCssValue *value)
{
  /* Can only happen if the unique value gets unreffed too often */
  g_assert_not_reached ();
}

Comment 16 Adam Williamson 2024-03-28 19:44:06 UTC
Here's some references of other projects that ran into this kinda crash:

https://github.com/lutris/lutris/issues/5092
https://github.com/bottlesdevs/Bottles/issues/813
https://github.com/haskell-gi/haskell-gi/issues/117

it seems this tends to involve threading and memory management and destructors and other things I'm not any kind of expert on, so I'm not going to attempt a fix for this myself.

Comment 17 Adam Williamson 2024-03-29 01:24:58 UTC
Upstream report: https://sourceforge.net/p/guvcview/tickets/76/

Comment 18 Adam Williamson 2024-04-04 23:54:17 UTC
After further investigation, we suspect this is actually a GTK 3 issue. https://retrace.fedoraproject.org/faf/problems/bthash/?bth=610603e80cf6cdd99354b01975ab1a7b35ad2c50&bth=4a6c303b02b725b8e01f713e3fb4563a476b8e54&bth=c480691445209611ff5079e7be7a2b6a7d488f91&bth=dd80be01d4012f9a2db76faff2f768d77bec4d27&bth=69a7fcaf4179c04257b19a601d9ca079c5c7a803&bth=df920c604a2b926a04a80522743900a4653d85bf seems to be GNOME Connections running into the same thing. Filed https://gitlab.gnome.org/GNOME/gtk/-/issues/6611 .

Neal is going to do a build which uses SFML instead of SDL. This seems to avoid the crashes, we think because it forces guvcview to run as an XWayland app (SFML does not have native Wayland support).

Comment 19 Fedora Update System 2024-04-05 00:13:39 UTC
FEDORA-2024-ac9be9fa7b (guvcview-2.1.0-2.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-ac9be9fa7b

Comment 20 Fedora Update System 2024-04-05 01:41:33 UTC
FEDORA-2024-ac9be9fa7b 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-ac9be9fa7b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-ac9be9fa7b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 21 Neal Gompa 2024-04-05 02:04:22 UTC
I've unlinked this bug from the guvcview update.

Comment 22 Adam Williamson 2024-04-19 18:37:40 UTC
I think I remember mclasen suggesting somewhere that this may really be a libdecor issue...can't find the reference right now, though.

Comment 23 Adam Williamson 2024-04-19 18:40:19 UTC
oh, https://gitlab.gnome.org/GNOME/gtk/-/issues/6611 . Asking for clarification there.

Comment 24 Aoife Moloney 2024-11-13 12:14:35 UTC
This message is a reminder that Fedora Linux 39 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 39 on 2024-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '39'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 39 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 25 Adam Williamson 2024-11-13 18:41:02 UTC
This was *effectively* fixed by switching the backend to SFML in https://bodhi.fedoraproject.org/updates/FEDORA-2024-0249d1561b , which makes guvcview an XWayland app and avoids the bug. The underlying problem was reported to libdecor upstream in https://gitlab.freedesktop.org/libdecor/libdecor/-/issues/72 .


Note You need to log in before you can comment on or make changes to this bug.