You are not logged in.
I am running xfce4 on Arch. Mousepad (the text editor) suddenly stopped launching today (possibly after an update). When I try to run it from the terminal, the segmentation fault error is displayed. Surprisingly, I can still launch it using sudo.
Last edited by insciwetrust (2024-05-15 19:40:41)
No gods, no masters!
Offline
You can see how recently you updated mousepad by using "pacman -Qi mousepad", but it could easily be a library mousepad pulls in that has the bug. It's not surprising that running it with sudo works, because a segmentation fault happens when a program tries to access memory it isn't able to access.
Does this happen with only mousepad, or also any other XFCE applications?
Offline
You can see how recently you updated mousepad by using "pacman -Qi mousepad", but it could easily be a library mousepad pulls in that has the bug. It's not surprising that running it with sudo works, because a segmentation fault happens when a program tries to access memory it isn't able to access.
Does this happen with only mousepad, or also any other XFCE applications?
Yeah, I don't think that the reason is a Mousepad update either. I checked, and my current build is from 1 May. I did install 2-3 GB worth of updates today though, so you may be right in your second theory.
It only affects Mousepad - other XFCE applications work all right.
No gods, no masters!
Offline
Please post the backtrace with debug symbols from the core dump.
Offline
I am also having the same issue (only launches with sudo) after a recent update, although only on my computer that has an Nvidia/Intel graphics GPU.
(GPU: NVIDIA GeForce GTX 1650 + GPU: Intel HD Graphics 530)
gdb reports the following:
Thread 1 "mousepad" received signal SIGSEGV, Segmentation fault.
0x00007ffff7de7dc7 in g_menu_exporter_menu_free (menu=0x0) at ../glib/gio/gmenuexporter.c:121
Downloading source file /usr/src/debug/glib2/build/../glib/gio/gmenuexporter.c
121 g_menu_exporter_group_remove_menu (menu->group, menu->id);
Last edited by 8bitredstone (2024-05-11 13:52:26)
Offline
Please provide full backtrace.
Xfce maintainer: https://gravatar.com/gaelbonithon
Offline
Was glib2 in the recent update? From pacman.log what version was it updated from and to? Looks similar to https://gitlab.archlinux.org/archlinux/ … -/issues/5
Offline
Please provide full backtrace.
Full traceback
https://pastebin.com/muxTWuPn
Offline
Looks like it's related to vala-panel-appmenu?
Does rebuilding this package help?
See also https://gitlab.com/vala-panel-project/v … issues/387
Xfce maintainer: https://gravatar.com/gaelbonithon
Offline
Looks like it's related to vala-panel-appmenu?
Does rebuilding this package help?
See also https://gitlab.com/vala-panel-project/v … issues/387
I uninstalled that package and still get the same issue. Even still shows up in gdb?
not sure if it's uninstalling properly
I ran "yay -Rns vala-panel-appmenu-xfce"
Offline
I'm not sure what's going on, I doubt it's coming directly from mousepad anyway (which I maintain). The crash reported in https://gitlab.archlinux.org/archlinux/ … -/issues/5 does indeed seem to have the same cause, so let's wait and see what comes of it (unless someone has an idea...)
Xfce maintainer: https://gravatar.com/gaelbonithon
Offline
There was no response to
Was glib2 in the recent update? From pacman.log what version was it updated from and to?
So this is a guess but If you downgrade glib2 to 2.80.0-3 can you still reproduce the issue?
or glib2 2.80.0-4 https://bbs.archlinux.org/viewtopic.php … 5#p2170635
Last edited by loqs (2024-05-11 16:26:08)
Offline
I uninstalled that package and still get the same issue. Even still shows up in gdb?
Just to be sure: did you also remove the plugin from the panel?
Xfce maintainer: https://gravatar.com/gaelbonithon
Offline
I uninstalled that package and still get the same issue.
#0 0x00007ffff7de7dc7 in g_menu_exporter_menu_free (menu=0x0) at ../glib/gio/gmenuexporter.c:121
#1 0x00007ffff7dedd99 in g_menu_exporter_free (user_data=0x555556125740) at ../glib/gio/gmenuexporter.c:714
exporter = 0x555556125740
#2 0x00007ffff7e0ea0a in g_dbus_connection_register_object (connection=0x7fffe00059e0 [GDBusConnection], object_path=<optimized out>, interface_info=<optimized out>, vtable=<optimized out>, user_data=0x555556125740, user_data_free_func=0x7ffff7dedd80 <g_menu_exporter_free>, error=0x0) at ../glib/gio/gdbusconnection.c:5809
eo = <optimized out>
ei = <optimized out>
ret = 0
__func__ = "g_dbus_connection_register_object"
#3 0x00007ffff7dee595 in g_dbus_connection_export_menu_model (connection=connection@entry=0x7fffe00059e0 [GDBusConnection], object_path=0x5555561dbef0 "/org/xfce/mousepad/menus/menubar", menu=0x5555561e5670 [GMenu], error=error@entry=0x0) at ../glib/gio/gmenuexporter.c:72
vtable = {method_call = 0x7ffff7dee1a0 <g_menu_exporter_method_call>, get_property = 0x0, set_property = 0x0, padding = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
exporter = 0x555556125740
id = <optimized out>
#4 0x00007ffff31d184d in gtk_x11_window_get_window_data (window=0x555555766ed0 [MousepadWindow]) at ../vala-panel-appmenu-24.02/subprojects/appmenu-gtk-module/src/platform.c:192
object_path = 0x555556121870 "/org/appmenu/gtk/window/0"
old_unity_object_path = 0x0
old_action_group = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--
session = 0x7fffe00059e0 [GDBusConnection]
old_unique_bus_name = 0x5555561ed060 ":1.256"
old_menubar_object_path = 0x5555561dbef0 "/org/xfce/mousepad/menus/menubar"
old_menu_model = <optimized out>
window_id = <optimized out>
window_data = 0x5555561e08d0
window_data = <optimized out>
__func__ = {<optimized out> <repeats 31 times>}
_g_boolean_var_15 = <optimized out>
__inst = <optimized out>
__t = <optimized out>
__r = <optimized out>
window_id = <optimized out>
session = <optimized out>
object_path = <optimized out>
old_unique_bus_name = <optimized out>
old_unity_object_path = <optimized out>
old_menubar_object_path = <optimized out>
old_action_group = <optimized out>
old_menu_model = <optimized out>
The trace in https://gitlab.archlinux.org/archlinux/packaging/packages/handbrake/-/issues/5 has the same
#0 0x00007ffff7cb9dc7 in g_menu_exporter_menu_free (menu=0x0) at ../glib/gio/gmenuexporter.c:121
#1 0x00007ffff7cbfd99 in g_menu_exporter_free (user_data=0x55555b7819c0) at ../glib/gio/gmenuexporter.c:714
exporter = 0x55555b7819c0
#2 0x00007ffff7ce0a0a in g_dbus_connection_register_object (connection=0x555559d699f0 [GDBusConnection], object_path=<optimized out>, interface_info=<optimized out>, vtable=<optimized out>, user_data=0x55555b7819c0, user_data_free_func=0x7ffff7cbfd80 <g_menu_exporter_free>, error=0x0) at ../glib/gio/gdbusconnection.c:5809
eo = <optimized out>
ei = <optimized out>
ret = 0
__func__ = "g_dbus_connection_register_object"
#3 0x00007ffff7cc0595 in g_dbus_connection_export_menu_model (connection=connection@entry=0x555559d699f0 [GDBusConnection], object_path=0x55555b566200 "/fr/handbrake/ghb/menus/menubar", menu=0x55555b7864e0 [GMenu], error=error@entry=0x0) at ../glib/gio/gmenuexporter.c:72
vtable = {method_call = 0x7ffff7cc01a0 <g_menu_exporter_method_call>, get_property = 0x0, set_property = 0x0, padding = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
exporter = 0x55555b7819c0
id = <optimized out>
#4 0x00007ffff21fa84d in gtk_x11_window_get_window_data (window=0x55555a0380f0 [GtkApplicationWindow]) at ../vala-panel-appmenu-24.02/subprojects/appmenu-gtk-module/src/platform.c:192
object_path = 0x55555b782660 "/org/appmenu/gtk/window/0"
old_unity_object_path = 0x0
old_action_group = <optimized out>
session = 0x555559d699f0 [GDBusConnection]
old_unique_bus_name = 0x55555b786490 ":1.844"
old_menubar_object_path = 0x55555b566200 "/fr/handbrake/ghb/menus/menubar"
old_menu_model = <optimized out>
window_id = <optimized out>
window_data = 0x55555b781650
window_data = <optimized out>
__func__ = {<optimized out> <repeats 31 times>}
_g_boolean_var_15 = <optimized out>
__inst = <optimized out>
__t = <optimized out>
__r = <optimized out>
window_id = <optimized out>
session = <optimized out>
object_path = <optimized out>
old_unique_bus_name = <optimized out>
old_unity_object_path = <optimized out>
old_menubar_object_path = <optimized out>
old_action_group = <optimized out>
old_menu_model = <optimized out>
#5 gtk_window_get_window_data (window=0x55555a0380f0 [GtkApplicationWindow]) at ../vala-panel-appmenu-24.02/subprojects/appmenu-gtk-module/src/datastructs.c:159
window_data = <optimized out>
__func__ = "gtk_window_get_window_data"
pattern but also goes through vala-panel-appmenu which might come from https://archlinux.org/packages/extra/x8 … tk-module/ ?
pacman -Qs appmenu
Offline
I downgraded glib2 from 2.80.2-1 to 2.80.0-4 and it fixed the issue
So it is clearly an issue with glib2
it also fixed an issue I was having with changing xfwm themes crashing my session, and causing pinta to fail opening
Offline
https://gitlab.com/vala-panel-project/v … platform.c hasn't been touched in 5 years.
It calls g_dbus_connection_export_menu_model from glib/gio/gmenuexporter.c and that
g_menu_exporter_menu_free (menu=0x0) at ../glib/gio/gmenuexporter.c
looks like it's trying to free a nullptr in https://github.com/GNOME/glib/blob/86dd … ter.c#L119 from https://github.com/GNOME/glib/blob/86dd … ter.c#L714 which is then deref'd what gets you a segfault
This happens because https://github.com/GNOME/glib/blob/86dd … ter.c#L798 fails
The change propbaly is in https://github.com/GNOME/glib/commits/m … nnection.c and that exposes bad memory management in gmenuexporter.c but would in and by itself rather lead to a functional failure.
Do you have a host for the appmenu (global menubar)?
Edit: copied markdown from my gitlab comment
Last edited by seth (2024-05-12 07:04:12)
Offline
Can you reproduce the issue with either of the two patched glib2 packages:
Revert https://github.com/GNOME/glib/commit/74 … ee4a6bd91b
https://drive.google.com/file/d/156RPb0 … sp=sharing glib2-2.80.2-1.1-x86_64.pkg.tar.zst
Patched with:
diff --git a/gio/gmenuexporter.c b/gio/gmenuexporter.c
index 909780cb2..59eae7dbb 100644
--- a/gio/gmenuexporter.c
+++ b/gio/gmenuexporter.c
@@ -710,6 +710,8 @@ static void
g_menu_exporter_free (gpointer user_data)
{
GMenuExporter *exporter = user_data;
+ if (!exporter)
+ return
g_menu_exporter_menu_free (exporter->root);
g_clear_pointer (&exporter->peer_remote, g_menu_exporter_remote_free);
https://drive.google.com/file/d/1nyrUNL … sp=sharing glib2-2.80.2-1.2-x86_64.pkg.tar.zst
Last edited by loqs (2024-05-12 13:03:57)
Offline
exporter was previously allocated and will likely en up being not actually a nullptr but just full of 0x0 - in that case the function would have to test "if (!exporter->id) return;"
Offline
../glib/gio/gmenuexporter.c: In function ‘g_menu_exporter_free’:
../glib/gio/gmenuexporter.c:713:16: error: ‘GMenuExporter’ {aka ‘struct _GMenuExporter’} has no member named ‘id’
713 | if (!exporter->id) return;
Offline
Ah, f*** that's "GMenuExporterMenu" - "exporter->connection" should be a safe bet as it's referenced to the dbus connection afterwards.
For more cleanup
static void
g_menu_exporter_free (gpointer user_data)
{
GMenuExporter *exporter = user_data;
if (exporter->connection) {
g_menu_exporter_menu_free (exporter->root);
g_clear_pointer (&exporter->peer_remote, g_menu_exporter_remote_free);
g_hash_table_unref (exporter->remotes);
g_hash_table_unref (exporter->groups);
g_object_unref (exporter->connection);
g_free (exporter->object_path);
}
g_slice_free (GMenuExporter, exporter);
}
and then what's liekly been a workaround for the now fixed cleanup the "g_slice_free (GMenuExporter, exporter);" in
if (id == 0)
{
// g_slice_free (GMenuExporter, exporter);
return 0;
}
can be removed.
Offline
glib2 2.80.2 patched with:
diff --git a/gio/gmenuexporter.c b/gio/gmenuexporter.c
index 909780cb2..150e44985 100644
--- a/gio/gmenuexporter.c
+++ b/gio/gmenuexporter.c
@@ -710,14 +710,14 @@ static void
g_menu_exporter_free (gpointer user_data)
{
GMenuExporter *exporter = user_data;
-
- g_menu_exporter_menu_free (exporter->root);
- g_clear_pointer (&exporter->peer_remote, g_menu_exporter_remote_free);
- g_hash_table_unref (exporter->remotes);
- g_hash_table_unref (exporter->groups);
- g_object_unref (exporter->connection);
- g_free (exporter->object_path);
-
+ if (exporter->connection) {
+ g_menu_exporter_menu_free (exporter->root);
+ g_clear_pointer (&exporter->peer_remote, g_menu_exporter_remote_free);
+ g_hash_table_unref (exporter->remotes);
+ g_hash_table_unref (exporter->groups);
+ g_object_unref (exporter->connection);
+ g_free (exporter->object_path);
+ }
g_slice_free (GMenuExporter, exporter);
}
@@ -800,7 +800,6 @@ g_dbus_connection_export_menu_model (GDBusConnection *connection,
if (id == 0)
{
- g_slice_free (GMenuExporter, exporter);
return 0;
}
https://drive.google.com/file/d/1B655FL … sp=sharing glib2-2.80.2-1.3-x86_64.pkg.tar.zst
Offline
This worked for me, Thanks.
glib2 2.80.2 patched with:
diff --git a/gio/gmenuexporter.c b/gio/gmenuexporter.c index 909780cb2..150e44985 100644 --- a/gio/gmenuexporter.c +++ b/gio/gmenuexporter.c @@ -710,14 +710,14 @@ static void g_menu_exporter_free (gpointer user_data) { GMenuExporter *exporter = user_data; - - g_menu_exporter_menu_free (exporter->root); - g_clear_pointer (&exporter->peer_remote, g_menu_exporter_remote_free); - g_hash_table_unref (exporter->remotes); - g_hash_table_unref (exporter->groups); - g_object_unref (exporter->connection); - g_free (exporter->object_path); - + if (exporter->connection) { + g_menu_exporter_menu_free (exporter->root); + g_clear_pointer (&exporter->peer_remote, g_menu_exporter_remote_free); + g_hash_table_unref (exporter->remotes); + g_hash_table_unref (exporter->groups); + g_object_unref (exporter->connection); + g_free (exporter->object_path); + } g_slice_free (GMenuExporter, exporter); } @@ -800,7 +800,6 @@ g_dbus_connection_export_menu_model (GDBusConnection *connection, if (id == 0) { - g_slice_free (GMenuExporter, exporter); return 0; }
https://drive.google.com/file/d/1B655FL … sp=sharing glib2-2.80.2-1.3-x86_64.pkg.tar.zst
Offline
@seth should someone now report the issue on https://gitlab.gnome.org/GNOME/glib/-/issues?
Offline
One of the affected users, interested in continued use of the feature most certainly should.
Offline
Upstream bug report https://gitlab.gnome.org/GNOME/glib/-/issues/3366
Edit:
glib2 2.80.2 with proposed upstream fix https://gitlab.gnome.org/GNOME/glib/-/m … uests/4073 applied:
https://drive.google.com/file/d/1qjvcCG … sp=sharing glib2-2.80.2-1.4-x86_64.pkg.tar.zst
Last edited by loqs (2024-05-15 12:03:35)
Offline