Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unplugging external monitor leads to gnome-shell crash #257

Open
bkuczenski opened this issue Aug 16, 2023 · 8 comments
Open

Unplugging external monitor leads to gnome-shell crash #257

bkuczenski opened this issue Aug 16, 2023 · 8 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@bkuczenski
Copy link

bkuczenski commented Aug 16, 2023

Hi, this is a re-opening of #238 with some more information.
Environment: Arch linux, current Gnome desktop (44.3). use of this extension in 2x3 arrangement, with an external monitor connected via USB-C to VGA. Intel i915 laptop display.

When I unplug the external monitor, with roughly 1/6 odds, I will get a syslog event including the following:

Aug 09 15:56:57 glyph gnome-shell[39000]: Attempting to call back into JSAPI during the sweeping phase of GC. This is most likely caused by not destroying a Clutter actor or Gtk+ widget with ::destroy signals connected, but can also be caused by using the destroy(), dispose(), or remove() vfuncs. Because it would crash the application, it has been blocked and the JS callback not invoked.
Aug 09 15:56:57 glyph gnome-shell[39000]: == Stack trace for context 0x55c5c3310440 ==
Aug 09 15:56:57 glyph gnome-shell[39000]: The offending signal was window-entered-monitor on MetaDisplay 0x55c5c3682b00.

window-left-monitor also appears as a signal.

The above 3 messages are repeated endlessly until the crash state is resolved. The computer is unusable while the event is ongoing. killing gnome-shell resolves the crash- though sometimes it recovers on its own e.g by tty-switching. This crash generated 10.8MB of log output (57k lines) during 1s of crash state.

It is 100% correlated with use of this extension.
How can I help solve this?

@mzur
Copy link
Owner

mzur commented Aug 16, 2023

It is 100% correlated with use of this extension.

So if you disable the extension the error does not occur?

@mzur mzur added the needs info Needs more information to continue label Aug 16, 2023
@bkuczenski
Copy link
Author

That's right. I had the extension turned off for many weeks and did not see this recur. Then I tried again after a recent system upgrade and once again the crashes occurred. I cannot say anything conclusive yet about whether it helps for me to "switch off" the extension prior to unplugging the monitor (haven't seen a crash like this yet, but n is small)

@mzur
Copy link
Owner

mzur commented Aug 16, 2023

Do you have "Show popup for all monitors" enabled? If yes, please disable it and see if the crash occurs again.

@bkuczenski
Copy link
Author

I do indeed have "show popup for all monitors" enabled, as well as "show popup" and "show workspace grid in overview". The others are disabled. I will experiment with these settings and report back.

@bkuczenski
Copy link
Author

bkuczenski commented Aug 22, 2023

FYI, I did observe another crash (although on wakeup after sleep) with "show popup for all monitors" unchecked.

I then disabled "show popup" and "show workspace grid in overview" and have not observed a crash in n=5 or so. I will keep monitoring and will later re-enable + observe.

current settings:
image

@bkuczenski
Copy link
Author

bkuczenski commented Sep 21, 2023

Finally caught it!
I was running with all options turned off for 30 days and did not observe the bug. Yesterday I switched on "Show popup".
Today I observed the crash after the following circumstances:

  • laptop was running with no external monitor
  • laptop went to suspend after inactivity
  • external monitor was plugged in before waking up laptop
  • upon wakeup, gnome-shell crashed

Fortunately, this time an explicit stack trace was provided in the journal:

Sep 21 11:30:58 glyph gnome-shell[1393]: Attempting to call back into JSAPI during the sweeping phase of GC. This is most likely caused by not destroying a Clutter actor or Gtk+ widget with ::destroy signals connected, but can also be caused by using the destroy(), dispose(), or remove() vfuncs. Because it would crash the application, it has been blocked and the JS callback not invoked.
Sep 21 11:30:58 glyph gnome-shell[1393]: == Stack trace for context 0x5555af762a90 ==
Sep 21 11:30:58 glyph gnome-shell[1393]: #0   5555bbe30880 i   resource:///org/gnome/shell/ui/main.js:629 (d6cdf1babf0 @ 412)
Sep 21 11:30:58 glyph gnome-shell[1393]: #1   5555bbe307a0 i   resource:///org/gnome/shell/ui/switcherPopup.js:105 (2fb078b08fb0 @ 66)
Sep 21 11:30:58 glyph gnome-shell[1393]: #2   5555bbe30700 i   /home/b/.local/share/gnome-shell/extensions/[email protected]/workspacePopup/workspaceSwitcherPopup.js:115 (ec8f5355380 @ 270)
Sep 21 11:30:58 glyph gnome-shell[1393]: #3   5555bbe30650 i   /home/b/.local/share/gnome-shell/extensions/[email protected]/workspacePopup/workspaceManagerOverride.js:458 (ec8f5353380 @ 314)
Sep 21 11:30:58 glyph gnome-shell[1393]: #4   7fff5dd3c840 I   self-hosted:164 (57d504cd510 @ 272)
Sep 21 11:30:58 glyph gnome-shell[1393]: #5   5555bbe305c8 i   /home/b/.local/share/gnome-shell/extensions/[email protected]/workspacePopup/workspaceManagerOverride.js:435 (ec8f5353330 @ 139)
Sep 21 11:30:58 glyph gnome-shell[1393]: #6   5555bbe304f8 i   /home/b/.local/share/gnome-shell/extensions/[email protected]/workspacePopup/workspaceManagerOverride.js:416 (ec8f53532e0 @ 1120)
Sep 21 11:30:58 glyph gnome-shell[1393]: #7   7fff5dd3d200 b   self-hosted:1115 (1084d1193b50 @ 501)
Sep 21 11:30:58 glyph gnome-shell[1393]: The offending signal was notify on MetaStage 0x5555af726480.

In this crash event, notify was the offending signal 254 times, and the above stack trace appears in the journal 254 times.

There was a second stack trace that appeared 9 times:

Sep 21 11:30:58 glyph gnome-shell[1393]: == Stack trace for context 0x5555af762a90 ==
Sep 21 11:30:58 glyph gnome-shell[1393]: #0   5555bbe307a0 i   resource:///org/gnome/shell/ui/switcherPopup.js:123 (2fb078b08fb0 @ 396)
Sep 21 11:30:58 glyph gnome-shell[1393]: #1   5555bbe30700 i   /home/b/.local/share/gnome-shell/extensions/[email protected]/workspacePopup/workspaceSwitcherPopup.js:115 (ec8f5355380 @ 270)
Sep 21 11:30:58 glyph gnome-shell[1393]: #2   5555bbe30650 i   /home/b/.local/share/gnome-shell/extensions/[email protected]/workspacePopup/workspaceManagerOverride.js:458 (ec8f5353380 @ 314)
Sep 21 11:30:58 glyph gnome-shell[1393]: #3   7fff5dd3c840 I   self-hosted:164 (57d504cd510 @ 272)
Sep 21 11:30:58 glyph gnome-shell[1393]: #4   5555bbe305c8 i   /home/b/.local/share/gnome-shell/extensions/[email protected]/workspacePopup/workspaceManagerOverride.js:435 (ec8f5353330 @ 139)
Sep 21 11:30:58 glyph gnome-shell[1393]: #5   5555bbe304f8 i   /home/b/.local/share/gnome-shell/extensions/[email protected]/workspacePopup/workspaceManagerOverride.js:416 (ec8f53532e0 @ 1120)
Sep 21 11:30:58 glyph gnome-shell[1393]: #6   7fff5dd3d200 b   self-hosted:1115 (1084d1193b50 @ 501)

In this version of the stack, the 0 entry is either switcherPopup.js: 123 (3 instances) or 124 (6 instances).

The vast majority of crashes (presumably the ones from callbacks) generated empty stack traces. SourceFunc() was an offending callback about 30k instances.

I saved the log but it is 20MB so I will hold off on posting it unless you need more information.

@mzur mzur added bug Something isn't working help wanted Extra attention is needed and removed needs info Needs more information to continue labels Sep 23, 2023
@mzur
Copy link
Owner

mzur commented Sep 23, 2023

Thanks, this looks like enough info to locate the issue!

mzur added a commit that referenced this issue Nov 5, 2023
@mzur
Copy link
Owner

mzur commented Nov 5, 2023

I have a potential fix for this in #271. It's implemented in the extension version for GNOME Shell 45 but you could patch it in your installed version and check if the errors occur again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants