Bug 1638727

Summary: gnome-shell crashed with SIGSEGV in meta_monitor_mode_get_resolution()
Product: Red Hat Enterprise Linux 7 Reporter: Divya <dbasant>
Component: mutterAssignee: Jonas Ådahl <jadahl>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 7.5CC: alanm, amike, dkochuka, fmuellner, jadahl, jkoten, jwright, mclasen, mkolbas, modehnal, pandrade, tpelka
Target Milestone: rcKeywords: Patch, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mutter-3.28.3-11.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1760738 (view as bug list) Environment:
Last Closed: 2020-03-31 19:38:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1727111, 1760738    
Attachments:
Description Flags
[rhel-7.5] rpms/mutter patch
none
System journal while reproducing the bug
none
System journal while reproducing the bug 2 none

Description Divya 2018-10-12 10:40:04 UTC
Description of problem:
gnome-shell crashes in meta_monitor_mode_get_resolution with below backtrace: 
Core was generated by `/usr/bin/gnome-shell'.
Program terminated with signal 11, Segmentation fault.
#0  meta_monitor_mode_get_resolution (monitor_mode=monitor_mode@entry=0x0, width=width@entry=0x7ffdf32cbc58, height=height@entry=0x7ffdf32cbc5c) at backends/meta-monitor.c:1603
1603	  *width = monitor_mode->spec.width;
(gdb) bt
#0  meta_monitor_mode_get_resolution (monitor_mode=monitor_mode@entry=0x0, width=width@entry=0x7ffdf32cbc58, height=height@entry=0x7ffdf32cbc5c) at backends/meta-monitor.c:1603
#1  0x00007f194b7f9912 in calculate_scale (monitor_mode=0x0, monitor=0x7f191c0843a0) at backends/meta-monitor.c:1398
#2  meta_monitor_calculate_mode_scale (monitor=0x7f191c0843a0, monitor_mode=0x0) at backends/meta-monitor.c:1460
#3  0x00007f194b7fcaf8 in calculate_monitor_scale (monitor=0x7f191c0843a0, manager=0x287f0b0) at backends/meta-monitor-manager.c:177
#4  derive_calculated_global_scale (manager=0x287f0b0) at backends/meta-monitor-manager.c:191
#5  meta_monitor_manager_rebuild_logical_monitors_derived (config=<optimized out>, manager=0x287f0b0) at backends/meta-monitor-manager.c:236
#6  meta_monitor_manager_update_logical_state_derived (manager=manager@entry=0x287f0b0, config=config@entry=0x0) at backends/meta-monitor-manager.c:2762
#7  0x00007f194b7fcb8a in meta_monitor_manager_rebuild_derived (manager=0x287f0b0, config=0x0) at backends/meta-monitor-manager.c:2778
#8  0x00007f194b80a988 in meta_monitor_manager_xrandr_handle_xevent (manager_xrandr=0x287f0b0, event=<optimized out>) at backends/x11/meta-monitor-manager-xrandr.c:2142
#9  0x00007f194b8025a6 in x_event_source_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at backends/x11/meta-backend-x11.c:247
#10 0x00007f19458338f9 in g_main_dispatch (context=0x252d6a0) at gmain.c:3146
#11 g_main_context_dispatch (context=context@entry=0x252d6a0) at gmain.c:3811
#12 0x00007f1945833c58 in g_main_context_iterate (context=0x252d6a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3884
#13 0x00007f1945833f2a in g_main_loop_run (loop=0x28a9f20) at gmain.c:4080
#14 0x00007f194b83218c in meta_run () at core/main.c:650
#15 0x0000000000402584 in main (argc=1, argv=0x7ffdf32cc0f8) at main.c:539
(gdb)


Version-Release number of selected component (if applicable):
mutter-3.26.2-13.el7

How reproducible:
Intermittent 

Steps to Reproduce:
1. After groupinstall 'Server with GUI', the startx works but after some time it crashes.

Actual results:
gnome-shell crashes

Expected results:
gnome-shell should not crash.

Additional info:
Upstream Bug -->https://gitlab.gnome.org/GNOME/mutter/issues/130
Upstream fix --> https://gitlab.gnome.org/GNOME/mutter/commit/d0d80780

I tried to backport the patch to build a test rpm but looks like this alone can not be included and we need to include other intermediate patches between mutter-3.26 and mutter-3.28.

Comment 7 Jonas Ådahl 2018-10-26 15:32:24 UTC
Created attachment 1497849 [details]
[rhel-7.5] rpms/mutter patch

Comment 17 Pavlin Georgiev 2019-08-20 08:41:32 UTC
Created attachment 1606016 [details]
System journal while reproducing the bug

TEST SETUP 1
Distro: RHEL 7.5 Server
Component version: mutter-3.26.2-13.el7
PC: Dell Precision T5400
Graphics card: NVIDIA Corporation G94 [GeForce 9600 GT] [10de:0622] (rev a1)


TEST PROCEDURE 1
1. Connect 2 external monitors via DVI ports.
2. Open two gnome-terminal windows, and place one on each monitor
3. In gnome-terminal on the secondary monitor, run:
    xrandr --output <primary-output> --off
The first appears.

Comment 18 Pavlin Georgiev 2019-08-20 08:42:24 UTC
Created attachment 1606017 [details]
System journal while reproducing the bug 2

TEST PROCEDURE 2
1. Connect 2 external monitors via DVI ports.
2. Open two gnome-terminal windows, and place one on each monitor
3. In gnome-terminal run:
    { sleep 5 && zenity --warning & xrandr --output <primary-output> --off && sleep 10 && xrandr --output <primary-output> --auto ; }
The second bug appears.

Comment 19 Pavlin Georgiev 2019-08-20 10:33:53 UTC
TEST SETUP 2
Distro: RHEL 7.7 Server
Component version: mutter-3.28.3-10.el7
PC: Dell Precision T5400
Graphics card: NVIDIA Corporation G94 [GeForce 9600 GT] [10de:0622] (rev a1)

PREPARATION
Download and install Brew build mutter-3.28.3-11.el7:
  https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=944083
    

TEST PROCEDURE 1
1. Reproduce the first bug.
The GNOME session does not crash.


TEST PROCEDURE 2
1. Reproduce the second bug.
The GNOME session does not crash.


RESULT
Upgrading component: mutter
    from: 3.26.2-13.el7
      to: 3.28.3-11.el7
has fixed the bug.

Comment 26 errata-xmlrpc 2020-03-31 19:38:49 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, 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-2020:1021