I can confirm this on a second machine, with core dumps and a fix verified
by testing. On my machine it caused a login loop. I could only work around
it by disabling the shell's weather and my
extensions, and I had to keep them disabled for over a week.

System: Debian 13 amd64, gnome-shell 48.7-0+deb13u2,
libxkbregistry0 1.7.0-2, libxml2 2.12.7+dfsg+really2.9.14-2.1+deb13u3,
libgweather-4-0t64 4.4.4-1.

What happened (2026-11-04, times UTC)
-------------------------------------
- 06:46  met.no returned "502 Bad Gateway". gnome-shell segfaulted
         while handling the weather response.
- From then on, gnome-shell segfaulted about 2 seconds after every login,
even after a reboot and with user extensions disabled.
- The first crash left a truncated forecast entry in the libsoup cache
(~/.cache/libgweather). Deleting it helped once. Later crashes happened
with an empty cache, so live met.no responses were triggering the bug too.
- The only way I could log in reliably was to disable the shell's weather
entirely (org.gnome.shell.weather automatic-location=false, empty
locations).

Crash analysis
--------------
Kernel message (ip == fault address, so the shell called through a stale
function pointer):

  gnome-shell[52868]: segfault at 8069c632ae2 ip 000008069c632ae2
  sp 00007ffed25a1a08 error 15

The corrupt rip stops normal unwinding, so I read the return
address from the top of the stack and scanned the rest of it in gdb:

  rxkb_log+146        libxkbregistry.so.0   call *0x70(%rdi)  <- freed ctx
xml_error_func+322  libxkbregistry.so.0
  xmlReportError+798  libxml2.so.2
  __xmlRaiseError+1181 libxml2.so.2
  ...

Three more crashes in the same session had the same return-address offsets.
This is upstream #529, fixed in 1.8.0 by
https://github.com/xkbcommon/libxkbcommon/pull/530

Verification of the fix
-----------------------
I wrote a small test: rxkb_context_new() +
rxkb_context_parse_default_ruleset() + rxkb_context_unref(), then I read
libxml2's global generic error handler (*__xmlGenericError())
and compared it with xmlGenericErrorDefaultFunc:

  libxkbregistry0 1.7.0-2           -> handler left dangling (bug)
libxkbregistry0 1.13.1-1~bpo13+1  -> handler reset to the default

After I upgraded the libxkbcommon packages to 1.13.1-1~bpo13+1 from
trixie-backports and logged in again, gnome-shell has run without crashing,
with all extensions enabled.

Request for a stable update
---------------------------
I'd like to ask for the upstream fix in a trixie point release:

- Users can't control the trigger. Any bad or truncated met.no response can
set it off, and met.no outages affect every trixie GNOME user with weather
enabled at the same moment. Several of us reported this on the same day.
- The result is not a single crash. Users can't log in to their desktop
until they find the cause, which most users cannot diagnose.
- The fix is small and self-contained (reset the libxml2 generic error
handler after parsing), so it should be easy to review for
trixie-proposed-updates.

Workarounds until then: rm -rf ~/.cache/libgweather and turn off the
shell's weather, or install libxkbcommon from trixie-backports.

Regards,
Federico Bonino

Reply via email to