gnome-shell gdb instructions cause immediate "Oh no" crash

Bug #1937958 reported by jimav
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNOME Shell
Fix Released
Unknown
gnome-shell (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

I wanted to report a gnome-shell bug with a backtrace, so tried to use the instructions in

   https://wiki.gnome.org/Projects/GnomeShell/Debugging

which say to do the following in an ssh login or separate VT:

  gnome_session=$(pgrep -u $USER gnome-session)
  eval export $(sed 's/\o000/\n/g;' < /proc/$gnome_session/environ | grep DISPLAY)
  eval export $(sed 's/\o000/\n/g;' < /proc/$gnome_session/environ | grep XAUTHORITY)
  eval export $(sed 's/\o000/\n/g;' < /proc/$gnome_session/environ | grep DBUS_SESSION_BUS_ADDRESS)
  gdb
  ...etc...

However three problems came up, two minor (wrong instructions), the other major:

(1) There is more than one gnome-session process, and so the shell variable $gnome_session gets set to a list of several PIDs, which in turn causes syntax errors when using the expression "/proc/$gnome_session/environ".

In Ubuntu 21.04 I have three gnome-session processes immediately after rebooting and logging in (I have auto-login enabled, so the login happens by itself, in case that matters):

$ ps -F $(pgrep -u $USER gnome-session|perl -p -e 's/(\d+)/-p $1/')
UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
jima 9743 9725 0 55216 16084 2 13:41 tty3 00:00:00 /usr/libexec/gnome-session-binary --systemd --session=ubuntu
jima 9828 8066 0 24031 6148 8 13:41 ? 00:00:00 /usr/libexec/gnome-session-ctl --monitor
jima 9838 8066 0 129272 18176 7 13:41 ? 00:00:00 /usr/libexec/gnome-session-binary --systemd-service --session=ubuntu

(2) The instructions specify this gdb command:

  call gjs_dumpstack ()

However that results in an error and the call is not made: 'gjs_dumpstack' has unknown return type; cast the call to its declared return type

(3) Most importantly, a crash: Immediately upon starting the new gnome-shell process (with option --replace) a white screen appears with "Oh No... something went wrong..." forcing me log out.

The crash happens whether using an independent VT or an ssh login.

Afterwards I typed Control-C to get control in gdb, and produced the attached backtraces but they don't seem useful (see attached typescript file).

/var/syslog might be useful. I will attach the portion beginning just before starting the new gnome-shell

The attached typescript file shows what I did to circumvent the buggy instructions at https://wiki.gnome.org/Projects/GnomeShell/Debugging

P.S. The original crash I wanted to report was that opening any .jpg in gimp and selecting part of the image and then doing Select->Invert instantly freezes the system. The only recovery is to use a separate VT to kill the gimp process, after which gnome-shell restarts. A system error dialog appears saying gnome-session [correction: gnome-shell] got a segfault somewhere; thus the desire to get a backtrace. But this bug report is _not_ about that bug, but is about how using the debug instructions in the wiki are incorrect and when fixed seem to cause a crash on their own.

ProblemType: Bug
DistroRelease: Ubuntu 21.04
Package: gnome-shell 3.38.4-1ubuntu3~21.04.1
ProcVersionSignature: Ubuntu 5.11.0-25.27-generic 5.11.22
Uname: Linux 5.11.0-25-generic x86_64
ApportVersion: 2.20.11-0ubuntu65.1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: GNOME
Date: Sun Jul 25 13:41:54 2021
DisplayManager: gdm3
InstallationDate: Installed on 2021-07-20 (5 days ago)
InstallationMedia: Ubuntu-Server 21.04 "Hirsute Hippo" - Release amd64 (20210421)
RelatedPackageVersions: mutter-common 3.38.4-1ubuntu2
SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
jimav (james-avera) wrote :
jimav (james-avera)
description: updated
description: updated
jimav (james-avera)
description: updated
Revision history for this message
jimav (james-avera) wrote :
Revision history for this message
jimav (james-avera) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

That wiki is not owned by Ubuntu so we can't fix the instructions it gives. As for any and all crashes in Ubuntu, please follow these instructions:

1. Look in /var/crash for crash files and if found run:
    ubuntu-bug YOURFILE.crash
Then tell us the ID of the newly-created bug.

2. If step 1 failed then look at https://errors.ubuntu.com/user/ID where ID is the content of file /var/lib/whoopsie/whoopsie-id on the machine. Do you find any links to recent problems on that page? If so then please send the links to us.

3. If step 2 also failed then apply the workaround from bug 994921, reboot, reproduce the crash, and retry step 1.

Please take care to avoid attaching .crash files to bugs as we are unable to process them as file attachments. It would also be a security risk for yourself.

Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Revision history for this message
jimav (james-avera) wrote :

@vanvugt -

No recent crash file was created in /var/crash, and neither at https://errors.ubuntu.com/user/<myid>

I re-ran the test using ssh and this time many "St-CRITICAL" warnings were written to the terminal, including this one surely indicates something bad:

  Object Gio.DBusProxy (0x555557d0fa70), has been already deallocated — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.

These were all captured in a typescript, which I will upload now: PLEASE SEE "typescript.3-processed"

LMK if there is something else I could do to help track this down.
-Jim

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks. Actually I can't tell which error was the fatal one, if it's logged at all. I suggest reporting the problem to the gnome-shell developers at:

  https://gitlab.gnome.org/GNOME/gnome-shell/-/issues

and then tell us the new issue ID.

Revision history for this message
jimav (james-avera) wrote :
Changed in gnome-shell (Ubuntu):
status: Incomplete → New
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.
Ubuntu 21.04 (hirsute) reached end-of-life on January 20, 2022.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test. If you then find the bug is still present in the newer Ubuntu version, please add a comment here telling us which new version it is in.

Changed in gnome-shell (Ubuntu):
status: New → Won't Fix
Changed in gnome-shell:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.