tophat icon indicating copy to clipboard operation
tophat copied to clipboard

Bug Report: gnome-shell crashes when a network drive disconnects

Open aljazzair opened this issue 2 years ago • 9 comments

OS Manjaro Arch uname -a Linux computer 6.1.11-1-MANJARO #1 SMP PREEMPT_DYNAMIC Thu Feb 9 14:03:23 UTC 2023 x86_64 GNU/Linux

Gnome Shell gnome-shell --version GNOME Shell 43.2

Tophat: latest version available through Gnome Extensions website.

Summary: When tophat is enabled, a gnome-shell crash occurs. When tophat is disabled this crash does not occur. A more detailed description of the issue is provided below.

Details: First off, thank you for creating this fantastic extension. I have been using it for a long time without issue.

Recently some enhancements were introduced around disk monitoring. I suspect those enhancements have to do with this bug. Somehow this extension is now causing gnome-shell to crash on my system.

I have a VM set up to serve media content in my LAN. One of the disks attached to this VM is accessed by the host through SMB. It is a ZFS filesystem. When the VM is running, the host can access the content using SMB. When the VM is shutdown, the host no longer has access to this disk through SMB.

In TOPHAT, I tried switchingthe option "show the disk monitor" on or off, to no avail.

Every time I shutdown the VM described above, and tophat is enabled, gnome shell crashes. Starting the VM restores gnome-shell operation. If I turn off the Top hat extension this crash does not occur. This issue started a few weeks ago, I do not remember exactly when. I just discovered this crash only happens when tophat is enabled.

Please let me know if additional logs are useful to resolve, I would be more than happy to assist in resolving this issue, if possible. Thank you.

EDIT: partial log around the crash, file updated: journalctl -p4 partialog.txt

aljazzair avatar Feb 14 '23 17:02 aljazzair

Thanks for reporting this! I think I found + fixed the cause of the shell crashes based on your log file, but haven't been able to replicate the crash myself. Could you try out the attached version of TopHat to see if it solves the problem? To install it, unzip the archive to ~/.local/share/gnome-shell/extensions/[email protected]/, then log out and back in.

[email protected]

fflewddur avatar Feb 15 '23 03:02 fflewddur

First off thank you for taking this under consideration. As promised here are my findings.

Summary: There is progress! Gnome-shell no longer crashes :+1: ... however it still freezes.

Details:

Here are the steps I followed:

  • reinstalled the extension from Gnome Extensions
  • activated the extension
  • deleted the tophat folder
  • extracted the tophat zip you provided in the proper folder
  • log off
  • log back in
  • extension was still active
  • at exactly 17:11, i did a shutdown of the virtual machine mentioned earlier
  • gnome shell was frozen, however I did not see a crash in the logs
  • I waited until 17:14 to start the VM again from a remote appliance through SSH, it took maybe 20 seconds for the VM to start completely
  • gnome shell was no longer frozen
  • Disk monitoring was off in the extension settings during the whole process

Attached are slightly more detailed logs than last time. Please let me know if I can be of any assistance with interpreting the logs. Kind regards

logtophat(1).txt

aljazzair avatar Feb 15 '23 07:02 aljazzair

Thanks @aljazzair, sorry this didn't fix the issue. I'm still trying to replicate this directly, but it seems my particular network setup (only wireless, no ethernet connection) doesn't support bridging in the way that yours is setup, at least with KVM. It looks like you're using KVM for your VMs, is that correct?

Also, could you try disabling TopHat's network monitor in addition to its disk monitor? Some of the lines in the log make me wonder if it's freezing when the network config changes, rather than when the mount point goes away.

fflewddur avatar Feb 15 '23 20:02 fflewddur

Hello,

Many thanks for taking the time to review.

  • Tried again with network monitor turned off in tophat: Gnome shell freezes like the last time, but does not crash completely anymore like the first time.
  • Also tried another extension called Vitals, the issue does not appear (no freeze, no crash when the same VM is shutdown).

To answer your question: My setup is a bit peculiar.

h |---vm0 o |---vm1 (the vm with zfs disk shared through smb) s |---vm2 t |---vmX

host is arch manjaro with kvm-qemu and a gnome DE (& tophat) running on intel integrated graphics. vm0 is a freebsd based distribution called opnsense, an advanced firewall of sorts vm1 is an arch based linux vm serving media content, attached to it is a zfs drive and an intel iGPU instance for transcoding by way of GVT-g vm2 is windows with Nvidia dGPU passthrough etc...

host and all vms 1 to X are connected to VM0 (opnsense) through bridge networking. my LAN is behind the opnsense firewall VM which in turn is physically connected to an external broadband modem for WAN and hooked to an external access point for wifi on other devices.

So my environment might be an edge case after all. :)

As a workaround, I will be setting up libvirtd hooks to turn on and off the tophat extension when VM1 is started/shutdown using:

gnome-extensions enable/disable [email protected]

Thank you.

PS: Just in case, I am attaching a log of the last attempt, with VM1 shutdown at precisely 10:23, and restarted through ssh shortly after that. As before, restarting the VM resumed gnome-shell operation. VM0 is still on at all times.

logtophat.txt

aljazzair avatar Feb 16 '23 09:02 aljazzair

I have managed to solve my issue with a workaround, therefore I am closing this item. Thank you.

aljazzair avatar Feb 17 '23 19:02 aljazzair

Hi @aljazzair, I've been able to replicate this issue with a simpler setup:

  • Share a folder from a Windows machine
  • Mount the shared folder from a Linux machine running Tophat
  • Shut down the Windows file server or disconnect it from the network (but don't unmount the share from Linux first)

For me, this set of actions consistently locks up the GNOME Shell. I've traced the issue to libgtop, which seems to hang when asked to get filesystem info for a mounted-but-unavailable filesystem. I've fixed TopHat to refresh its list of mounted shares before checking current filesystem usage, but when the share has disconnected but not yet unmounted, it will still hang. I'm re-opening this issue until I can figure out a fix. Thanks again for reporting this--it's certainly not unique to your setup!

fflewddur avatar Mar 22 '23 19:03 fflewddur

I also have this issue, with a similar setup - narrowed it down to TopHat!

  • GNOME freezes on me when I lose network connection - ie. I can unplug the ethernet cable and as soon as dmesg -w shows "link is down", desktop freezes completely
  • I also run virtual machines using libvirt (KVM) and I have set up a bridge network. So, the network connection GNOME can see is bridge0, which is the one which gets an IP, and depends on "slave" enp8s0 for the physical link.
  • I have an NFS mount to another server on my network mounted at /everything. It's "soft" mounted so should I lose network then I/O to it shouldn't hang indefinitely - it previously was mounted hard,intr (hard but with interrupts) as I thought that might fix the freezing thing.
  • I've disabled NetworkManager "connectivity checking", [connectivity] enabled=false in a config file - that at least improved the GNOME freezes, it now only hangs for a second or so after plugging the ethernet back in, it used to hang until the full connectivity check was finished (which could take like a minute).
  • Disabling the TopHat extension fixes the freezing when the network is disconnected.
  • With TopHat enabled, switching off the disk and network monitors does not fix the freezing.
  • Fedora 38, GNOME 44.3 on Wayland, kernel 6.4.6-200, libgtop 2.41.1 installed, TopHat v11

erinaceous avatar Jul 29 '23 12:07 erinaceous

Ubuntu 22.04 GNOME Shell 42.9 Wired network and NFS share mounted. Only processor and network monitoring enabled in TopHat.

Disconnecting ethernet cable or stopping NFS server causes desktop freeze, nothing works, ctrl+alt+f* too. Disabling TopHat solved problem.

rokiden avatar Dec 26 '23 09:12 rokiden

Still not sure 100% but seems when I use it, gnome shell also crashes for me when logging in back after suspend. All windows open are gone. I'm on Manjaro too

apedicdev avatar Jan 15 '24 13:01 apedicdev