Bug 1199382

Summary: When the user login to the desktop, gnome-shell crash with SIGSEGV in meta_context_terminate (context=0x0)
Product: [openSUSE] PUBLIC SUSE Linux Enterprise Server 15 SP4 Reporter: Huang Jun <huangjun>
Component: GNOMEAssignee: xiaoguang wang <xiaoguang.wang>
Status: RESOLVED FIXED QA Contact:
Severity: Major    
Priority: P1 - Urgent CC: gnome-bugs, huangjun, rtsvetkov, xiaoguang.wang, yfjiang
Version: PublicRC-202204Flags: rtsvetkov: needinfo? (huangjun)
Target Milestone: ---   
Hardware: x86-64   
OS: SLES 15   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: supportconfig md5: e2160dee2afcbd25206db49b55731d6e
gnome-shell coredump
gnome-shell coredump with mutter-41.5-150400.4.1.x86_64.rpm

Description Huang Jun 2022-05-10 09:45:51 UTC
Created attachment 858775 [details]
supportconfig md5: e2160dee2afcbd25206db49b55731d6e

When the system starts normally, I use the root to login to the GNOME desktop, and then the desktop stays on the black screen with the mouse pointer.

At this time, the system can run normally, I can switch tty with Ctrl+Alt+F1 and login system with ssh.

The system generates a coredump:

localhost:~ # coredumpctl
TIME                         PID UID GID SIG     COREFILE EXE                   SIZE
Wed 2022-05-11 01:29:01 CST 3472 467 467 SIGSEGV present  /usr/bin/gnome-shell 10.5M
localhost:~ # coredumpctl info
           PID: 3472 (gnome-shell)
           UID: 467 (gdm)
           GID: 467 (gdm)
        Signal: 11 (SEGV)
     Timestamp: Wed 2022-05-11 01:28:58 CST (9min ago)
  Command Line: /usr/bin/gnome-shell
    Executable: /usr/bin/gnome-shell
 Control Group: /user.slice/user-467.slice/session-c1.scope
          Unit: session-c1.scope
         Slice: user-467.slice
       Session: c1
     Owner UID: 467 (gdm)
       Boot ID: 57b2dc054c444af4bbe116b3654be54c
    Machine ID: 5d763496a9bd4829a56b2a427d3e20aa
      Hostname: localhost
       Storage: /var/lib/systemd/coredump/core.gnome-shell.467.57b2dc054c444af4bbe116b3654be54c.3472.1652203738000000.zst (present)
     Disk Size: 10.5M
       Message: Process 3472 (gnome-shell) of user 467 dumped core.
       ......
                Stack trace of thread 3472:
                #0  0x00007ff1662cb5cb meta_context_terminate (libmutter-9.so.0 + 0xd35cb)
                #1  0x00007ff1662fb15e process_ice_messages (libmutter-9.so.0 + 0x10315e)
                #2  0x00007ff167f5b7fb g_main_dispatch (libglib-2.0.so.0 + 0x557fb)
                #3  0x00007ff167f5bba0 g_main_context_iterate (libglib-2.0.so.0 + 0x55ba0)
                #4  0x00007ff167f5be72 g_main_loop_run (libglib-2.0.so.0 + 0x55e72)
                #5  0x00007ff1662cb544 meta_context_run_main_loop (libmutter-9.so.0 + 0xd3544)
                #6  0x0000555c84202825 main (gnome-shell + 0x2825)
                #7  0x00007ff165e382bd __libc_start_main (libc.so.6 + 0x352bd)
                #8  0x0000555c842029ca _start (gnome-shell + 0x29ca)
Comment 1 Huang Jun 2022-05-10 09:49:28 UTC
Created attachment 858776 [details]
gnome-shell coredump
Comment 2 Yifan Jiang 2022-05-10 09:50:29 UTC
It sounds like the core dump happens when gdm hand over display to user session. Xiaoguang, can you please take a look?
Comment 3 xiaoguang wang 2022-05-11 02:00:28 UTC
Hi Huang Jun, does this issue happen every time when you login as root user?
Comment 4 Huang Jun 2022-05-11 02:08:40 UTC
(In reply to xiaoguang wang from comment #3)
> Hi Huang Jun, does this issue happen every time when you login as root user?

Not every time, but occurs very frequently, about 80%.
Comment 5 xiaoguang wang 2022-05-11 02:10:53 UTC
(In reply to Huang Jun from comment #4) 
> Not every time, but occurs very frequently, about 80%.

How about login as a normal user?
Comment 6 Huang Jun 2022-05-11 02:17:34 UTC
(In reply to xiaoguang wang from comment #5)
> (In reply to Huang Jun from comment #4) 
> > Not every time, but occurs very frequently, about 80%.
> 
> How about login as a normal user?

Same as root, and have the same error message.
Comment 7 xiaoguang wang 2022-05-11 08:03:55 UTC
Hi Huang jun, I find the system was installed with version SLE-15-SP4-Full-Snapshot-202205-1, not SLE-15-SP4-Full-PublicRC-202204. Did you do the test on SLE-15-SP4-Full-PublicRC-202204 before and get the same issue?
Comment 9 Huang Jun 2022-05-11 09:04:02 UTC
(In reply to xiaoguang wang from comment #7)
> Hi Huang jun, I find the system was installed with version
> SLE-15-SP4-Full-Snapshot-202205-1, not SLE-15-SP4-Full-PublicRC-202204. Did
> you do the test on SLE-15-SP4-Full-PublicRC-202204 before and get the same
> issue?

I tried it on PublicRC-202204, PublicBeta-202202, and both have this problem. 
Sorry I didn't explain it in the bugzilla. I actually used PublicRC-202204, because of the problem I upgraded gnome-shell.

Below is my history command:
localhost:~ # history | grep "zypper up"
  138  2022-05-10 19:50:17 zypper up mutter
  150  2022-05-10 22:21:13 zypper up libglib-2_0-0
  280  2022-05-10 19:39:39 zypper up gnome-shell-41.4-150400.1.5.x86_64
  349  2022-05-12 00:58:05 history | grep "zypper up"
localhost:~ # cat /etc/products.d/SLES.prod | grep beta
    <betaversion>PublicRC-202204</betaversion>
Comment 10 xiaoguang wang 2022-05-12 01:00:37 UTC
The coredump backtrace:

> #0  meta_context_terminate (context=0x0) at ../src/core/meta-context.c:451
>         _g_boolean_var_ = <optimized out>
>         priv = <optimized out>
>         __func__ = "meta_context_terminate"
> #1  0x00007ff1662fb15e in process_ice_messages (channel=<optimized out>, condition=<optimized out>,
>     user_data=0x555c86bf3ad0) at ../src/x11/session.c:116
>         ice_connection = 0x555c86bf3ad0
>         connection = <optimized out>
>         status = <optimized out>
>         channel = <optimized out>
>         condition = <optimized out>
>         ice_connection = <optimized out>
>         connection = <optimized out>
>         status = <optimized out>
>         user_data = 0x555c86bf3ad0
>         ice_connection = 0x555c86bf3ad0
>         connection = <optimized out>
>         status = <optimized out>
> #2  0x00007ff167f5b7fb in g_main_dispatch (context=0x555c85561fc0) at ../glib/gmain.c:3381
>         dispatch = 0x7ff167fac940 <g_io_unix_dispatch>
>         prev_source = 0x0
>         begin_time_nsec = 0
>         was_in_call = 0
>         user_data = 0x555c86bf3ad0
>         callback = 0x7ff1662fb110 <process_ice_messages>
>         cb_funcs = 0x7ff168237980 <g_source_callback_funcs>
>         cb_data = 0x555c8727b300
>         need_destroy = <optimized out>
>         source = 0x555c868df3d0
>         current = 0x555c855a46c0
>         i = 5
>         current = <optimized out>
>         i = <optimized out>
>         source = <optimized out>
>         _g_boolean_var_ = <optimized out>
>         was_in_call = <optimized out>
>         user_data = <optimized out>
>         callback = <optimized out>
>         cb_funcs = <optimized out>
>         cb_data = <optimized out>
>         need_destroy = <optimized out>
>         dispatch = <optimized out>
>         prev_source = <optimized out>
>         begin_time_nsec = <optimized out>
>         _g_boolean_var_ = <optimized out>
> #3  g_main_context_dispatch (context=context@entry=0x555c85561fc0) at ../glib/gmain.c:4099
> No locals.
> #4  0x00007ff167f5bba0 in g_main_context_iterate (context=0x555c85561fc0, block=block@entry=1,
>     dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4175
>         max_priority = 0
>         timeout = 0
>         some_ready = 1
>         nfds = <optimized out>
>         allocated_nfds = 15
>         fds = 0x555c8790de10
>         begin_time_nsec = 0
> #5  0x00007ff167f5be72 in g_main_loop_run (loop=0x555c87322bc0) at ../glib/gmain.c:4373
>         self = <optimized out>
>         __func__ = "g_main_loop_run"
> #6  0x00007ff1662cb544 in meta_context_run_main_loop (context=context@entry=0x555c85559860,
>     error=error@entry=0x7ffe0a0f6770) at ../src/core/meta-context.c:433
>         priv = <optimized out>
>         __func__ = "meta_context_run_main_loop"
> #7  0x0000555c84202825 in main (argc=<optimized out>, argv=<optimized out>) at ../src/main.c:563
>         context = 0x555c85559860
>         error = 0x0
>         ecode = 0
Comment 12 xiaoguang wang 2022-05-12 02:17:22 UTC
Download the test rpm file:
https://build.opensuse.org/package/binary/download/home:xiaoguang_wang:branches:GNOME:STABLE:41/mutter/SLE_15_SP4/x86_64/mutter-41.5-150400.4.1.x86_64.rpm

Install rpm file,
> zypper in -f mutter-41.5-150400.4.1.x86_64.rpm
Select 'Solution 3: break mutter-lang-41.4-150400.1.4.noarch by ignoring some of its dependencies'

When see 'mutter-41.5-150400.4.1.x86_64 (Plain RPM files cache): Signature verification failed [4-Signatures public key is not available]'
Select 'ignore'.

Restart system.
Comment 13 xiaoguang wang 2022-05-13 01:00:54 UTC
Create an issue on upstream:
https://gitlab.gnome.org/GNOME/mutter/-/issues/2267
Comment 14 Huang Jun 2022-05-13 02:17:51 UTC
(In reply to xiaoguang wang from comment #12)
> Download the test rpm file:
> https://build.opensuse.org/package/binary/download/home:xiaoguang_wang:
> branches:GNOME:STABLE:41/mutter/SLE_15_SP4/x86_64/mutter-41.5-150400.4.1.
> x86_64.rpm
> 
> Install rpm file,
> > zypper in -f mutter-41.5-150400.4.1.x86_64.rpm
> Select 'Solution 3: break mutter-lang-41.4-150400.1.4.noarch by ignoring
> some of its dependencies'
> 
> When see 'mutter-41.5-150400.4.1.x86_64 (Plain RPM files cache): Signature
> verification failed [4-Signatures public key is not available]'
> Select 'ignore'.
> 
> Restart system.

I tested this rpm and still have this problem.

localhost:~ # coredumpctl
TIME                         PID UID GID SIG     COREFILE EXE                   SIZE
Fri 2022-05-13 18:17:10 CST 3516 467 467 SIGSEGV present  /usr/bin/gnome-shell 10.7M
localhost:~ # rpm -qa | grep mutter-41
mutter-41.5-150400.4.1.x86_64
Comment 15 Huang Jun 2022-05-13 02:22:41 UTC
Created attachment 858877 [details]
gnome-shell coredump with mutter-41.5-150400.4.1.x86_64.rpm
Comment 17 Huang Jun 2022-05-13 07:35:28 UTC
(In reply to xiaoguang wang from comment #16)
> I updated the patch, download the rpm file and test it again.
> https://build.opensuse.org/package/binary/download/home:xiaoguang_wang:
> branches:GNOME:STABLE:41/mutter/SLE_15_SP4/x86_64/mutter-41.5-150400.5.1.
> x86_64.rpm

I tested mutter-41.5-150400.5.1.x86_64.rpm, the problem is solved, both root and normal user can login GNOME desktop success. Thank you very much! 

Will this patch be merged into the FCS version?
Comment 18 xiaoguang wang 2022-05-13 08:18:06 UTC
(In reply to Huang Jun from comment #17)
> (In reply to xiaoguang wang from comment #16)
> > I updated the patch, download the rpm file and test it again.
> > https://build.opensuse.org/package/binary/download/home:xiaoguang_wang:
> > branches:GNOME:STABLE:41/mutter/SLE_15_SP4/x86_64/mutter-41.5-150400.5.1.
> > x86_64.rpm
> 
> I tested mutter-41.5-150400.5.1.x86_64.rpm, the problem is solved, both root
> and normal user can login GNOME desktop success. Thank you very much! 
> 
> Will this patch be merged into the FCS version?

Thank you. I will send the patch to SLE-15-SP4:GA, I'm not sure it can be in FCS version.
Comment 20 Stefan Weiberg 2022-05-16 09:22:23 UTC
It won't be in the Gold Master, unless we have a second candidate. Could you please do a parallel submission directly to the GA branch as well, in case we need to build a second candidate?

You have to specify the target explicitly for this case:

iosc sr [sourceproj] [sourcepkg] SUSE:SLE-15-SP4:GA [targetpkg]

SR#272223 will go out via MU pre-FCS, in case we don't have a second candidate.
Comment 22 xiaoguang wang 2022-05-30 00:57:20 UTC
The fix was accepted by SLE-15-SP4:Update, closed.
Comment 23 Swamp Workflow Management 2022-06-02 16:21:14 UTC
SUSE-RU-2022:1924-1: An update that has one recommended fix can now be installed.

Category: recommended (moderate)
Bug References: 1199382
CVE References: 
JIRA References: 
Sources used:
openSUSE Leap 15.4 (src):    mutter-41.5-150400.3.3.1
SUSE Linux Enterprise Module for Desktop Applications 15-SP4 (src):    mutter-41.5-150400.3.3.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.