material-shell icon indicating copy to clipboard operation
material-shell copied to clipboard

Crash on sleep

Open jinnko opened this issue 4 years ago • 21 comments

Describe the bug

When the laptop goes to sleep, either by timing out idle or when the lid is shut, MS causes gnome-shell to crash, killing the entire login session.

Expected behavior

MS should be unloaded gracefully and recovery properly on wake.

Screenshots

gnome-shell[327529]: -----------------
gnome-shell[327529]: DISABLE EXTENSION
gnome-shell[327529]: -----------------
gnome-shell[327529]: **
gnome-shell[327529]: St:ERROR:../gnome-shell/src/st/st-bin.c:206:st_bin_destroy: assertion failed: (priv->child == NULL)
gnome-shell[327529]: Bail out! St:ERROR:../gnome-shell/src/st/st-bin.c:206:st_bin_destroy: assertion failed: (priv->child == NULL)
gnome-shell[327529]: == Stack trace for context 0x55b16466c1b0 ==
gnome-shell[327529]: #0   55b169a16760 i   /home/jinn/.local/share/gnome-shell/extensions/material-shell@papyelgringo/src/layout/msWorkspace/msWorkspace.js:87 (309f7d824380 @ 61)
gnome-shell[327529]: #1   55b169a16690 i   /home/jinn/.local/share/gnome-shell/extensions/material-shell@papyelgringo/src/manager/msWorkspaceManager.js:202 (309f7d81ff60 @ 270)
gnome-shell[327529]: #2   55b169a16600 i   /home/jinn/.local/share/gnome-shell/extensions/material-shell@papyelgringo/extension.js:142 (1317068dd9c0 @ 252)
gnome-shell[327529]: #3   7ffef6ae2e60 b   resource:///org/gnome/shell/ui/extensionSystem.js:108 (2ac15c136a60 @ 395)
gnome-shell[327529]: #4   55b169a16570 i   resource:///org/gnome/shell/ui/extensionSystem.js:611 (2ac15c12ce70 @ 15)
gnome-shell[327529]: #5   7ffef6ae38d0 b   self-hosted:225 (1406a3554560 @ 273)
gnome-shell[327529]: #6   55b169a164e0 i   resource:///org/gnome/shell/ui/extensionSystem.js:610 (2ac15c12cec0 @ 98)
gnome-shell[327529]: #7   55b169a16450 i   resource:///org/gnome/shell/ui/extensionSystem.js:628 (2ac15c12ce20 @ 82)
gnome-shell[327529]: #8   7ffef6ae4310 b   self-hosted:844 (18f30bfa6c40 @ 423)
gnome-shell[327529]: #9   7ffef6ae4400 b   resource:///org/gnome/gjs/modules/core/_signals.js:133 (309f7d863060 @ 439)
kernel: audit: type=1701 audit(1605190161.610:1883): auid=1001 uid=1001 gid=1001 ses=22 pid=327529 comm="gnome-shell" exe="/usr/bin/gnome-shell" sig=6 res=1
audit[327529]: ANOM_ABEND auid=1001 uid=1001 gid=1001 ses=22 pid=327529 comm="gnome-shell" exe="/usr/bin/gnome-shell" sig=6 res=1
gnome-shell[327529]: #10   7ffef6ae5080 b   resource:///org/gnome/shell/ui/sessionMode.js:195 (18f30bf9f650 @ 284)
gnome-shell[327529]: #11   55b169a161f0 i   resource:///org/gnome/shell/ui/sessionMode.js:156 (18f30bf9f790 @ 40)
gnome-shell[327529]: #12   55b169a16138 i   resource:///org/gnome/shell/ui/screenShield.js:572 (18f30bf8b560 @ 208)
gnome-shell[327529]: #13   55b169a16078 i   resource:///org/gnome/shell/ui/screenShield.js:621 (18f30bf8b510 @ 419)
gnome-shell[327529]: #14   55b169a15fe8 i   resource:///org/gnome/shell/ui/screenShield.js:263 (18f30bf8bd80 @ 25)
systemd[1]: Started Process Core Dump (PID 372618/UID 0).
...
polkitd[725]: Unregistered Authentication Agent for unix-session:21 (system bus name :1.19199, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_GB.UTF-8) (disconnected from bus)
...
xdg-desktop-por[357043]: Error reading events from display: Broken pipe

To Reproduce

  • Occurs on:
    • [ ] X.Org
    • [x] Wayland
  • GNOME Shell version: 3.38.1
  • Distro: ArchLinux
  • Steps to reproduce, if applicable:
  1. Use MS
  2. Close laptop lid & wait for full sleep
  3. Open lid, and see GDM login screen
  4. Bug

Current commit

Output from git rev-parse --short HEAD: n/a

Latest version installed from https://extensions.gnome.org/extension/3357/material-shell/, according to metadata.json, it is version: 9.

Log data

Output from journalctl /usr/bin/gnome-shell: See logs above

jinnko avatar Nov 12 '20 14:11 jinnko

I am experiencing the same issue on Material-Shell 9 at Gnome 3.36.7, openSUSE Tumbleweed. Material-Shell 10 just crashes after enabling it immediately.

felixg3 avatar Nov 12 '20 17:11 felixg3

I am experiencing the same problem on r720.4aa1c08, installed via AUR with gnome-shell v3.38.1.. After waking up from suspend, no window would display, log out and log in required.

peterbabic avatar Nov 16 '20 09:11 peterbabic

@peterbabic - have you tried using alt-tab to switch windows the old way when that happens? I believe I've experienced something similar but I believe it seems a different issue to this ticket. The alt-tab tends to improve interaction for a while, though glitches from that point on do continue.

jinnko avatar Nov 16 '20 09:11 jinnko

@jinnko I was experimenting more on this and it seems to be affected by "opacity" tweaks. If I use default extension settings or at least do not touch the opacity (both left to 100), it looks like the issue does not happen.

peterbabic avatar Nov 16 '20 10:11 peterbabic

@peterbabic interesting. I have never touched opacity (all opacity values remain at 100%) and I still experience the issue.

jinnko avatar Nov 16 '20 14:11 jinnko

@jinnko sorry for interfering then, it looks like this is a completely different issue

peterbabic avatar Nov 16 '20 19:11 peterbabic

@peterbabic - no probs. I'm curious whether you landed here because you had the same stack trace?

jinnko avatar Nov 16 '20 19:11 jinnko

I'm experiencing the same issue with a new installation and no other extensions.

Fedora 33 Gnome 3.38.1 Wayland

I've only modified some settings related to hotkeys/colors, but haven't touched the opacity setting or most other settings.

From what I can tell, my stack trace looks the same as the one above.

nequals30 avatar Nov 18 '20 14:11 nequals30

The problems seem to have disappeared on the current gnome version 3.38.1 on opensuse Tumbleweed (using Wayland).

felixg3 avatar Nov 21 '20 21:11 felixg3

I've just tested v10 on ArchLinux with Gnome v3.38.2 on Wayland and it is still crashing, though I didn't see the error emitted, only an indication of a core dump, but not sure where the core is dumped. With v8 it doesn't crash.

jinnko avatar Nov 24 '20 10:11 jinnko

@jinnko wanna join me on Discord to dig it up?

PapyElGringo avatar Nov 24 '20 11:11 PapyElGringo

@PapyElGringo sure, perfect! Don't think I received any Discord details when I set up sponsorship.

jinnko avatar Nov 24 '20 11:11 jinnko

@jinnko just join the discord https://discord.gg/vBb7D9a and pm me there !

PapyElGringo avatar Nov 24 '20 11:11 PapyElGringo

It looks like the MsWorkspaceActor needs to call this.destroy_all_children() just before it's destroyed itself? I'd have thought Clutter.Actor would do that itself, but if gnome-shell's throwing that assertion then I guess not? I can't tell if this is the same as #493, but it looks like the assertion failures are the same and the backtrace seems to be the same...

This may only take care of a symptom and not the cause, but figured I'd suggest it just in case it's something that straightforward?

I guess at https://github.com/material-shell/material-shell/blob/master/src/layout/msWorkspace/msWorkspace.js#L85?

ikelos avatar Dec 09 '20 00:12 ikelos

Ok, so having tried this destroy_all_children doesn't do what I'd hoped (on return to gnome-shell, it sits in an endless loop attempt to deallocate things that have already been deallocated and then runs into problems accessing things whilst a sweep is going on). It appears it's probably better to let the garbage collector sweep up.

ikelos avatar Dec 15 '20 17:12 ikelos

@ikelos In theory: according to the docs on ClutterActor the children will be destroyed after it's destroyed (https://developer.gnome.org/clutter/stable/ClutterActor.html#clutter-actor-destroy).

That said, in docs for the destroy signal there is: "Composite actors and actors implementing the ClutterContainer interface should override the default implementation of the class handler of this signal and call clutter_actor_destroy() on their children." Which makes sense. I have no idea if that matters here tho

coreyoconnor avatar Dec 15 '20 17:12 coreyoconnor

Thanks @coreyoconnor , the error message in the original post seems to suggest that needs to happen too:

Bail out! St:ERROR:../gnome-shell/src/st/st-bin.c:206:st_bin_destroy: assertion failed: (priv->child == NULL)

since it's bailing as the child still exists? I guess destroy_all_children was overkill, I just don't know clutter well enough to fashion a loop that'll destroy just our current children (or why doing that is better than destroy_all_children, but that definitely doesn't work). I don't know whether the structures in MS are a strict tree or self-reference in some way, but for all I know it may not be possible to self-reference in MS, so I may have to wait for someone with better clutter knowledge than me to look into this... 5:S Thanks again for the pointer! 5:)

ikelos avatar Dec 15 '20 17:12 ikelos

yea my clutter knowledge is near zero. This is probably not the best project to start on haha. But I'm very interested in this being stable.

I've been running with destroy_all_children added. No harm afaict, but no idea if it's having the desired impact yet.

coreyoconnor avatar Dec 15 '20 23:12 coreyoconnor

Ah, I'd been running it ok for a bit (and no crashes, but a slight pause), but it seems that it could cause gnome-shell to keel over after unlocking in certain situations. It seemed as though it would enter a situation where it took so long that the garbage collector started doing its job, and both ended up trying to delete something that had already been deleted by the other. It causes gnome-shell to freeze (sometimes for just a few seconds, sometimes for several minutes or more).

ikelos avatar Dec 15 '20 23:12 ikelos

This keeps happening to me too. Every single time I come back from sleep.

Fedora 33, wayland.

The logs contain this:

Mar 18 23:34:10 acf gnome-shell[149135]: Object .MsApplicationLauncher (0x55b294d09ba0), has been already deallocated — impossible to access it. This might be caused by>
Mar 18 23:34:10 acf gnome-shell[149135]: clutter_actor_get_parent: assertion 'CLUTTER_IS_ACTOR (self)' failed
Mar 18 23:34:10 acf gnome-shell[149135]: Object Clutter.Actor (0x55b294d72760), has been already deallocated — impossible to access it. This might be caused by the obje>
Mar 18 23:34:10 acf gnome-shell[149135]: Object .MsApplicationLauncher (0x55b294d09ba0), has been already deallocated — impossible to access it. This might be caused by>
Mar 18 23:34:10 acf gnome-shell[149135]: clutter_actor_add_child: assertion 'CLUTTER_IS_ACTOR (self)' failed
Mar 18 23:34:10 acf gnome-shell[149135]: Object .MsApplicationLauncher (0x55b294d09ba0), has been already deallocated — impossible to set any property on it. This might>
Mar 18 23:34:10 acf gnome-shell[149135]: Object Clutter.Actor (0x55b294d72760), has been already deallocated — impossible to access it. This might be caused by the obje>
Mar 18 23:34:10 acf gnome-shell[149135]: clutter_actor_get_children: assertion 'CLUTTER_IS_ACTOR (self)' failed
Mar 18 23:34:10 acf gnome-shell[149135]: Object .MsApplicationLauncher (0x55b294d09ba0), has been already deallocated — impossible to connect to any signal on it. This >
Mar 18 23:34:10 acf gnome-shell[149135]: Object .MsApplicationLauncher (0x55b294d09ba0), has been already deallocated — impossible to access it. This might be caused by>
Mar 18 23:34:10 acf gnome-shell[149135]: clutter_actor_has_key_focus: assertion 'CLUTTER_IS_ACTOR (self)' failed
Mar 18 23:34:10 acf gnome-shell[149135]: Object .MsApplicationLauncher (0x55b294d09ba0), has been already deallocated — impossible to access it. This might be caused by>
Mar 18 23:34:10 acf gnome-shell[149135]: clutter_actor_get_parent: assertion 'CLUTTER_IS_ACTOR (self)' failed
Mar 18 23:34:10 acf gnome-shell[149135]: Object Clutter.Actor (0x55b294d72760), has been already deallocated — impossible to access it. This might be caused by the obje>
Mar 18 23:34:10 acf gnome-shell[149135]: Object .MsApplicationLauncher (0x55b294d09ba0), has been already deallocated — impossible to access it. This might be caused by>
Mar 18 23:34:10 acf gnome-shell[149135]: clutter_actor_add_child: assertion 'CLUTTER_IS_ACTOR (self)' failed
Mar 18 23:34:10 acf gnome-shell[149135]: Object .MsApplicationLauncher (0x55b294d09ba0), has been already deallocated — impossible to access it. This might be caused by>
Mar 18 23:34:10 acf gnome-shell[149135]: clutter_actor_grab_key_focus: assertion 'CLUTTER_IS_ACTOR (self)' failed
Mar 18 23:34:10 acf gnome-shell[149135]: Object .MsApplicationLauncher (0x55b294d09ba0), has been already deallocated — impossible to get any property from it. This mig>
Mar 18 23:34:10 acf gnome-shell[149135]: Object Clutter.Actor (0x55b294d72760), has been already deallocated — impossible to get any property from it. This might be cau>
Mar 18 23:34:10 acf gnome-shell[149135]: JS ERROR: TypeError: this.tileableContainer.allocation.get_width is not a function
                                         resolveBox@/home/ac/.local/share/gnome-shell/extensions/material-shell@papyelgringo/extension.js:3977:68
                                         tileAll@/home/ac/.local/share/gnome-shell/extensions/material-shell@papyelgringo/extension.js:3983:20
                                         onTileableListChanged@/home/ac/.local/share/gnome-shell/extensions/material-shell@papyelgringo/extension.js:4047:14
                                         afterInit@/home/ac/.local/share/gnome-shell/extensions/material-shell@papyelgringo/extension.js:3921:14
                                         _init/<@/home/ac/.local/share/gnome-shell/extensions/material-shell@papyelgringo/extension.js:3916:18
Mar 18 23:34:10 acf gnome-shell[149135]: 
..........
.........
Mar 18 23:36:16 acf gnome-shell[155090]: Can't update stage views actor MsMain is on because it needs an allocation.
Mar 18 23:36:16 acf gnome-shell[155090]: Can't update stage views actor PrimaryMonitorContainer is on because it needs an allocation.
Mar 18 23:36:16 acf gnome-shell[155090]: Can't update stage views actor MsWorkspaceActor is on because it needs an allocation.
Mar 18 23:36:16 acf gnome-shell[155090]: Can't update stage views actor ClutterActor is on because it needs an allocation.
Mar 18 23:36:16 acf gnome-shell[155090]: Can't update stage views actor TranslationAnimator is on because it needs an allocation.
Mar 18 23:36:16 acf gnome-shell[155090]: Can't update stage views actor ClutterActor is on because it needs an allocation.
Mar 18 23:36:16 acf gnome-shell[155090]: Can't update stage views actor MsApplicationLauncher is on because it needs an allocation.
Mar 18 23:36:16 acf gnome-shell[155090]: Can't update stage views actor Gjs_material-shell_papyelgringo_extension_MsApplicationButtonContainer is on because it needs an>
Mar 18 23:36:17 acf gnome-shell[155090]: Focus MsWindow, ac@acf:~
Mar 18 23:36:17 acf gnome-shell[155090]: Focus MsWindow, ac@acf:~
Mar 18 23:36:17 acf gnome-shell[155090]: Focus MsWindow, Google Chrome
Mar 18 23:36:17 acf gnome-shell[155090]: Focus MsWindow, Google Chrome
Mar 18 23:36:17 acf gnome-shell[155090]: Focus MsWindow, Google Chrome
Mar 18 23:36:17 acf gnome-shell[155090]: Focus MsWindow, Google Chrome
Mar 18 23:36:17 acf gnome-shell[155090]: Focus MsWindow, Google Chrome
Mar 18 23:36:17 acf gnome-shell[155090]: Focus MsWindow, Google Chrome
Mar 18 23:36:19 acf gnome-shell[155090]: Timelines with detached actors are not supported
Mar 18 23:36:19 acf gnome-shell[155090]: Timelines with detached actors are not supported
Mar 18 23:36:19 acf gnome-shell[155090]: Timelines with detached actors are not supported
Mar 18 23:37:21 acf gnome-shell[155090]: Window manager warning: Ping serial 32615584 was reused for window W10, previous use was for window W11.
Mar 18 23:37:21 acf gnome-shell[155090]: Allocate, 
Mar 18 23:37:24 acf gnome-shell[155090]: Trying to activate unmanaged window 'W11'
Mar 18 23:37:24 acf gnome-shell[155090]: Focus MsWindow, gnome-shell killed by SIGSEGV - org.freedesktop.GnomeAbrt
Mar 18 23:37:24 acf gnome-shell[155090]: Trying to activate unmanaged window 'W11'
Mar 18 23:37:24 acf gnome-shell[155090]: Focus MsWindow, gnome-shell killed by SIGSEGV - org.freedesktop.GnomeAbrt
Mar 18 23:37:39 acf gnome-shell[155090]: Focus MsWindow, gnome-shell killed by SIGSEGV - org.freedesktop.GnomeAbrt
Mar 18 23:37:39 acf gnome-shell[155090]: Focus MsWindow, gnome-shell killed by SIGSEGV - org.freedesktop.GnomeAbrt
Mar 18 23:37:39 acf gnome-shell[155090]: Focus MsWindow, Problem Reporting```

albert-carreras avatar Mar 18 '21 22:03 albert-carreras

Experiencing the same issue. OS: Arch Linux with fcgu GNOME: 43.0 GNOME-SHELL: 43.0

Material Shell installed from the AUR gnome-shell-extension-material-shell-git, up to date.

Ujhhgtg avatar Oct 15 '22 09:10 Ujhhgtg