Bug 1883868

Summary: [RFE] Dump JS stack trace by default when gnome-shell crashes
Product: Red Hat Enterprise Linux 8 Reporter: Phil Jasbutis <pjasbuti>
Component: gnome-shellAssignee: Florian Müllner <fmuellner>
Status: CLOSED ERRATA QA Contact: Tomas Pelka <tpelka>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.2CC: jadahl, sbarcomb, tpelka
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: 8.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: gnome-shell-3.32.2-27.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 14:38:50 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Phil Jasbutis 2020-09-30 12:37:48 UTC
3. What is the nature and description of the request?

- after facing issues+crashes with gnome-shell it turned out that debugging options are quite limited at the moment
- customer tested DEBUG_SHELL="backtrace-segfaults" in .bash_profile to get a JS stack trace when gnome-shell crashed
- customer would like to have this implemented as a default for every gnome-shell which runs on a host


4. Why does the customer need this? (List the business requirements here)

- to better understand gnome-shell crashes in retrospect and support debugging gnome-shell issues
- if gnome-shell crashed and re-spawned there is no indicator in the logs by default


5. How would the customer like to achieve this? (List the functional requirements here)

- set environment variable DEBUG_SHELL="backtrace-segfaults" as default in gnome-shell so every gnome-shell process on this
host (independent from the user) dumps a JS stack trace in journal when gnome-shell crashes.


6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.

- start a gnome-shell in userspace, open windows and gnome applications
- force the gnome-shell to crash by sending SEGV to the process
- check if the journal contains at least the header for the stack trace when crashed
- e.g. "Sep 02 12:30:43 <host> org.gnome.Shell.desktop[7197]: == Stack trace for context 0x26820c0 =="


7. Is there already an existing RFE upstream or in Red Hat Bugzilla?

- not known


8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?

- no, asap


9. Is the sales team involved in this request and do they have any additional input?

- no


10. List any affected packages or components.

- gnome-shell


11. Would the customer be able to assist in testing this functionality if implemented?

yes

Comment 6 Florian Müllner 2020-10-29 17:31:41 UTC
(In reply to Phil Jasbutis from comment #0)
> > - if gnome-shell crashed and re-spawned there is no indicator in the logs by
> default

That's not true, there should be a line along the lines of

  Oct 29 18:06:31 rhel7-unknow gnome-session[1532]: gnome-session-binary[1532]: WARNING: Application 'org.gnome.Shell.desktop' killed by signal 11


> - set environment variable DEBUG_SHELL="backtrace-segfaults" as default in
> gnome-shell so every gnome-shell process on this
> host (independent from the user) dumps a JS stack trace in journal when
> gnome-shell crashes.

That said, treating an unset DEBUG_SHELL variable as "backtrace-segfaults" is certainly feasible.

Comment 14 errata-xmlrpc 2021-05-18 14:38:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: GNOME security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:1586