Re: Possible regression in shm handling [SOLVED]
- In reply to: Ellen Emilia Anna Zscheile : "Re: Possible regression in shm handling [SOLVED]"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 12 Jun 2025 09:31:52 UTC
Nice catch. Might be helpful to post this as a bug report to the glib project. So they can make their software more resilient. Regards, Ronald. Van: Ellen Emilia Anna Zscheile <fogti+fbsd@ytrizja.de> Datum:donderdag, 12 juni 2025 00:43 Aan:freebsd-stable@freebsd.org Onderwerp:Re: Possible regression in shm handling [SOLVED] > > I managed to find the problem: > > ``` > .@.:~/.config/glib-2.0/settings/ > diff keyfile ~/tmp/.config/glib-2.0/settings/keyfile > 2,3c2,3 > < window-position=(20, 20) > < window-size=(679, 687) > --- > > window-position=(26, 23) > > window-size=(4092044, 2046032) > 9c9 > < sidebar-width=157 > --- > > sidebar-width=224 > .@.:~/ > cat ~/.config/glib-2.0/settings/keyfile > [org/gtk/settings/file-chooser] > window-position=(20, 20) > window-size=(679, 687) > date-format='regular' > location-mode='path-bar' > show-hidden=false > show-size-column=true > show-type-column=true > sidebar-width=157 > sort-column='name' > sort-directories-first=false > sort-order='ascending' > type-format='category' > ``` > > The file chooser tried to use an impossibly large window size, > which subsequently caused it to try to allocate an extremely large shared memory > blob (roughly on the order of terabytes, afaik) for the window buffer. > > Regards, > Ellen Zscheile > > 11/6/25 22:38, / Ellen Emilia Anna Zscheile : > > Hi, > > > > I managed to "reduce" the failure to > > > > ``` > > .@.:~/ > zenity --file-selection > > > > (zenity:1820): Gdk-WARNING **: 22:35:14.111: Native Windows wider than > 65535 pixels are not supported > > > > (zenity:1820): Gdk-WARNING **: 22:35:14.112: Native Windows taller > than 65535 pixels are not supported > > > > (zenity:1820): Gdk-CRITICAL **: 22:35:14.303: > ../gdk/wayland/gdkdisplay-wayland.c:1372: Truncating shared memory > file failed: Invalid argument > > zsh: segmentation fault (core dumped) zenity --file-selection > > ``` > > with backtrace: > > ``` > > (gdb) bt > > #0 0x000000080197b3a4 in wl_proxy_get_version () at > /usr/local/lib/libwayland-client.so.0 > > #1 0x00000008003067f7 in ??? () at /usr/local/lib/libgdk-3.so.0 > > #2 0x00000008003165af in ??? () at /usr/local/lib/libgdk-3.so.0 > > #3 0x00000008003149c9 in ??? () at /usr/local/lib/libgdk-3.so.0 > > #4 0x00000008002ea6a2 in ??? () at /usr/local/lib/libgdk-3.so.0 > > #5 0x00000008002eabce in gdk_window_begin_draw_frame () at > /usr/local/lib/libgdk-3.so.0 > > #6 0x0000000800afd71b in ??? () at /usr/local/lib/libgtk-3.so.0 > > #7 0x0000000800998de3 in gtk_main_do_event () at > /usr/local/lib/libgtk-3.so.0 > > #8 0x00000008002d98b1 in ??? () at /usr/local/lib/libgdk-3.so.0 > > #9 0x00000008002eb7de in ??? () at /usr/local/lib/libgdk-3.so.0 > > #10 0x00000008002ebdaa in ??? () at /usr/local/lib/libgdk-3.so.0 > > #11 0x00000008002ec028 in ??? () at /usr/local/lib/libgdk-3.so.0 > > #12 0x0000000800c1cf24 in ??? () at /usr/local/lib/libgobject-2.0.so.0 > > #13 0x0000000800c36082 in ??? () at /usr/local/lib/libgobject-2.0.so.0 > > #14 0x0000000800c36bbc in g_signal_emit () at > /usr/local/lib/libgobject-2.0.so.0 > > #15 0x00000008002e2fbf in ??? () at /usr/local/lib/libgdk-3.so.0 > > #16 0x00000008002cd832 in ??? () at /usr/local/lib/libgdk-3.so.0 > > #17 0x0000000800d39a41 in ??? () at /usr/local/lib/libglib-2.0.so.0 > > #18 0x0000000800d3e241 in ??? () at /usr/local/lib/libglib-2.0.so.0 > > #19 0x0000000800d3e6c7 in ??? () at /usr/local/lib/libglib-2.0.so.0 > > #20 0x0000000800d3e9e9 in g_main_loop_run () at > /usr/local/lib/libglib-2.0.so.0 > > #21 0x000000080099856a in gtk_main () at /usr/local/lib/libgtk-3.so.0 > > ``` > > > > Regards, > > Ellen Zscheile > > > > 11/6/25 17:52, / Ellen Emilia Anna Zscheile : > >> Hi, > >> > >> after upgrading my system from > >> FreeBSD 14.3-PRERELEASE stable/14-n271240-62c010b6514b GENERIC > >> to > >> FreeBSD 14.3-STABLE stable/14-n271620-b53120be1656 GENERIC > >> > >> I noticed that firefox now reliably crashes (closing the firefox >> window, and the process appears to abort with SIGSEGV) > >> when trying to open a file upload dialog when using sway > >> (forcing firefox to use X11 by setting `WAYLAND_DISPLAY=`makes the >> whole session hang). > >> > >> Ports packages involved: > >> drm-61-kmod-6.1.128.1403501_4 > >> firefox-139.0.1_1,2 (but also happens with firefox-esr) > >> glib-2.84.1_2,2 > >> gtk3-3.24.49 > >> sway-1.11.r4 > >> > >> Firefox log output is always something like: > >> ``` > >> [Parent 1609, Main Thread] WARNING: Native Windows wider than 65535 >> pixels are not supported: 'glib warning', file >> /wrkdirs/usr/ports/www/firefox/work/firefox-139.0.1/toolkit/xre/nsSigHandlers.cpp:201 > >> > >> (firefox:1609): Gdk-WARNING **: 17:37:32.563: Native Windows wider >> than 65535 pixels are not supported > >> [Parent 1609, Main Thread] WARNING: Native Windows taller than 65535 >> pixels are not supported: 'glib warning', file >> /wrkdirs/usr/ports/www/firefox/work/firefox-139.0.1/toolkit/xre/nsSigHandlers.cpp:201 > >> > >> (firefox:1609): Gdk-WARNING **: 17:37:32.563: Native Windows taller >> than 65535 pixels are not supported > >> [Parent 1609, Main Thread] WARNING: >> ../gdk/wayland/gdkdisplay-wayland.c:1372: Truncating shared memory >> file failed: Invalid argument: 'glib warning', file >> /wrkdirs/usr/ports/www/firefox/work/firefox-139.0.1/toolkit/xre/nsSigHandlers.cpp:201 > >> > >> (firefox:1609): Gdk-CRITICAL **: 17:37:32.702: >> ../gdk/wayland/gdkdisplay-wayland.c:1372: Truncating shared memory >> file failed: Invalid argument > >> console.warn: LoginRecipes: "Falling back to a synchronous message >> for: file://." > >> Exiting due to channel error. > >> Exiting due to channel error. > >> Exiting due to channel error. > >> Exiting due to channel error. > >> Exiting due to channel error. > >> Exiting due to channel error. > >> Exiting due to channel error. > >> Exiting due to channel error. > >> Exiting due to channel error. > >> Exiting due to channel error. > >> Exiting due to channel error. > >> Exiting due to channel error. > >> zsh: segmentation fault (core dumped) firefox > >> ``` > >> > >> backtrace: > >> ``` > >> (gdb) bt > >> #0 0x0000000803eaf3a4 in wl_proxy_get_version () at >> /usr/local/lib/libwayland-client.so.0 > >> #1 0x00000008034987f7 in ??? () at /usr/local/lib/libgdk-3.so.0 > >> #2 0x00000008034a85af in ??? () at /usr/local/lib/libgdk-3.so.0 > >> #3 0x00000008034a69c9 in ??? () at /usr/local/lib/libgdk-3.so.0 > >> #4 0x000000080347c6a2 in ??? () at /usr/local/lib/libgdk-3.so.0 > >> #5 0x000000080347cbce in gdk_window_begin_draw_frame () at >> /usr/local/lib/libgdk-3.so.0 > >> #6 0x00000008032fd71b in ??? () at /usr/local/lib/libgtk-3.so.0 > >> #7 0x0000000803198de3 in gtk_main_do_event () at >> /usr/local/lib/libgtk-3.so.0 > >> #8 0x000000080346b8b1 in ??? () at /usr/local/lib/libgdk-3.so.0 > >> #9 0x000000080347d7de in ??? () at /usr/local/lib/libgdk-3.so.0 > >> #10 0x000000080347ddaa in ??? () at /usr/local/lib/libgdk-3.so.0 > >> #11 0x000000080347e028 in ??? () at /usr/local/lib/libgdk-3.so.0 > >> #12 0x0000000802b68f24 in ??? () at /usr/local/lib/libgobject-2.0.so.0 > >> #13 0x0000000802b82082 in ??? () at /usr/local/lib/libgobject-2.0.so.0 > >> #14 0x0000000802b82bbc in g_signal_emit () at >> /usr/local/lib/libgobject-2.0.so.0 > >> #15 0x0000000803474fbf in ??? () at /usr/local/lib/libgdk-3.so.0 > >> #16 0x000000080345f832 in ??? () at /usr/local/lib/libgdk-3.so.0 > >> #17 0x00000008035d2a41 in ??? () at /usr/local/lib/libglib-2.0.so.0 > >> #18 0x00000008035d7241 in ??? () at /usr/local/lib/libglib-2.0.so.0 > >> #19 0x00000008035d76c7 in ??? () at /usr/local/lib/libglib-2.0.so.0 > >> #20 0x00000008035d7766 in g_main_context_iteration () at >> /usr/local/lib/libglib-2.0.so.0 > >> #21 0x000000080a236f68 in nsAppShell::ProcessNextNativeEvent(bool) () >> at /usr/local/lib/firefox/libxul.so > >> #22 0x000000080a187b86 in >> nsBaseAppShell::OnProcessNextEvent(nsIThreadInternal*, bool) () at >> /usr/local/lib/firefox/libxul.so > >> #23 0x000000080a187c6d in non-virtual thunk to >> nsBaseAppShell::OnProcessNextEvent(nsIThreadInternal*, bool) () at >> /usr/local/lib/firefox/libxul.so > >> #24 0x0000000806e94d28 in nsThread::ProcessNextEvent(bool, bool*) () >> at /usr/local/lib/firefox/libxul.so > >> #25 0x0000000806e98daf in NS_ProcessNextEvent(nsIThread*, bool) () at >> /usr/local/lib/firefox/libxul.so > >> #26 0x0000000807453d29 in >> mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) () at >> /usr/local/lib/firefox/libxul.so > >> #27 0x000000080740b057 in MessageLoop::Run() () at >> /usr/local/lib/firefox/libxul.so > >> #28 0x000000080a1878a9 in nsBaseAppShell::Run() () at >> /usr/local/lib/firefox/libxul.so > >> #29 0x000000080a236ea1 in nsAppShell::Run() () at >> /usr/local/lib/firefox/libxul.so > >> #30 0x000000080aba4a69 in nsAppStartup::Run() () at >> /usr/local/lib/firefox/libxul.so > >> #31 0x000000080ac808a6 in XREMain::XRE_mainRun() () at >> /usr/local/lib/firefox/libxul.so > >> #32 0x000000080ac81039 in XREMain::XRE_main(int, char**, >> mozilla::BootstrapConfig const&) () at /usr/local/lib/firefox/libxul.so > >> #33 0x000000080ac815ea in XRE_main(int, char**, >> mozilla::BootstrapConfig const&) () at /usr/local/lib/firefox/libxul.so > >> #34 0x0000000001046fbc in main () > >> ``` > >> (sorry, I have no clue how to get a properly installed gtk+-3 with >> debug symbols, rebuilding the port with `DEBUG` option didn't help.) > >> > >> I also don't really know what exactly caused this, because besides >> happening shortly after an upgrade, > >> it didn't start immediately; earlier today it still worked, and then >> it just started failing at some point, > >> with no clue as to why (no amount of rebooting or using different >> packages/ports appeared to influence this). > >> > >> Regards, > >> Ellen Zscheile > >> > >> > > > > > >