G-dH / vertical-workspaces

V-Shell is a GNOME Shell extension that allows you to customize the layout and behavior of the Shell UI.
GNU General Public License v3.0
228 stars 19 forks source link

[BUG] gnome-shell crashes when a network drive disconnects #100

Closed ErikSteiner closed 10 months ago

ErikSteiner commented 1 year ago

Describe the bug If a network drive (Samba) mounted via fstab is not available, Gnome freezes under certain conditions.

Basic debug information

To Reproduce Steps to reproduce the behavior:

  1. Add a Samba share to fstab like //AnIPAddress/somewhere /home/user/somewhere cifs noauto,x-systemd.automount,x-system.idle-timeout=1min,credentials=... 0 0
  2. Shut down the Samba share, so it is not available anymore
  3. Move the mouse to the bottom or use the super key to search for a program like the Gnome Software Center
  4. Gnome will freeze after the first few letters, you enter
  5. See error

Expected behavior It is possible for me to enter search terms and find and open programs or data.

Screenshots If applicable, add screenshots to help explain your problem.

System:

System log output open terminal, execute: journalctl /usr/bin/{gjs,gnome-shell} -fo cat I wasn't yet able to do it, because of the freeze.

My main intention is to link this issue with the TopHat extension, where a user has a similar experience with that extension. The developer and I were able to reproduce it. Maybe you can fix the issue together?

G-dH commented 1 year ago

If you disable all other extensions and restart GNOME session (log out/ log in), can you still reproduce the bug? If not, you need to find extension which actually causes the problem. V-Shell is only about UI.

ErikSteiner commented 1 year ago

I disabled all extensions, rebooted and after reboot I entered Exte to get the Extension Manager. It works flawless. I enable Vertical Workspaces and from the desktop I move my mouse to the bottom. I enter Exte, but it hangs after Ex for a minute. Then it shows all applications, all files etc. I click onto the Extension Manager and disable Vertical Workspaces and redo it again. It works flawless again.

I assume, that the extension triggers the file path of the mount point and waits for response. However, as the address to the Samba share is not available, it gets a timeout (wild speculation).

G-dH commented 1 year ago

Interesting... The only module that has anything to do with files in V-Shell is RecentFilesSerchProvider, you can disable it in Settings.

ErikSteiner commented 1 year ago

Thank you, I disabled RecentFilesSerchProvider, rebooted and the lag was gone. This "fixes" the problem, but I am curious what is the reason behind it?

G-dH commented 1 year ago

Probably an attempt to get a thumbnail of a file that is not currently available. I will try to filter out unavailable files.

G-dH commented 1 year ago

Can you please try the latest update from refactor-legacy-imports branch if it helps? I disabled those thumbnails so all files should show an app icon by MIME type.

git clone git@github.com:G-dH/vertical-workspaces.git
cd vertical-workspaces/
git checkout refactor-legacy-imports
make install
ErikSteiner commented 1 year ago

Hello there, I don't think that this is the problem. From my personal view, I don't get any thumbnails anyway. Bildschirmfoto 2023-08-14 19-42-47 I hope that the following logs can help. They are from the refactor-legacy-imports branch:

[esteban@ThePC ~]$ journalctl /usr/bin/gnome-shell -f
Aug 14 19:37:54 ThePC gnome-shell[11542]: Could not load a pixbuf from icon theme.
                                          This may indicate that pixbuf loaders or the mime database could not be found.
Aug 14 19:37:54 ThePC gnome-shell[11542]: Received error from D-Bus search provider firefox.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.mozilla.firefox.SearchProvider was not provided by any .service files
Aug 14 19:37:54 ThePC gnome-shell[11542]: Received error from D-Bus search provider firefox.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.mozilla.firefox.SearchProvider was not provided by any .service files
Aug 14 19:37:55 ThePC gnome-shell[11542]: clutter_actor_set_mapped: assertion '!CLUTTER_ACTOR_IN_MAP_UNMAP (self)' failed
Aug 14 19:37:55 ThePC gnome-shell[11542]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x4600004
Aug 14 19:37:55 ThePC gnome-shell[11542]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x4600004
Aug 14 19:37:58 ThePC gnome-shell[11542]: Some code accessed the property 'MonitorGroup' on the module 'workspaceAnimation'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Aug 14 19:37:58 ThePC gnome-shell[11542]: Some code accessed the property 'SecondaryMonitorDisplay' on the module 'workspacesView'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Aug 14 19:37:58 ThePC gnome-shell[11542]: Some code accessed the property 'AppGrid' on the module 'appDisplay'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Aug 14 19:37:58 ThePC gnome-shell[11542]: V-Shell (Vertical Workspaces): enabled
Aug 14 19:38:51 ThePC gnome-shell[11542]: Received error from D-Bus search provider firefox.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.mozilla.firefox.SearchProvider was not provided by any .service files
G-dH commented 1 year ago

There is only one line in the log related to the search and it's from Firefox. Recent files search provider shows its results only if you use prefix fq//, the files we can see in your screenshot belongs to the Files manager. However, the RFSP initial search result set was collected even when the results were not shown, I fixed that. The RF search provider accessed the files to get thumbnails, and if no thumbnail existed, the app/default icon was used.

Current update should fix it for normal search, only if you trigger the recent files search provider (prefix, icon, hotkey), the problematic code should be used. It needs further investigation from my end.

What version of GNOME are you using?

ErikSteiner commented 1 year ago

Even if it is obvious, commit 8a6a023 fixed it. Yesterday, I guess I checked out around 7 pm, it was still a thing. I guess that was b5da9d606cca963265e02e0a4fa04a33ea2001e7.

Current update should fix it for normal search, only if you trigger the recent files search provider (prefix, icon, hotkey), the problematic code should be used. It needs further investigation from my end. Yes, if I press super key and type fq// it hangs for a few seconds.

Aug 15 15:00:01 ThePC gnome-shell[1917]: Received error from D-Bus search provider org.gnome.Boxes.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.122 was not provided by any .service files
Aug 15 15:00:01 ThePC gnome-shell[1917]: Received error from D-Bus search provider org.gnome.Games.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.124 was not provided by any .service files
Aug 15 15:01:56 ThePC gnome-shell[1917]: Received error from D-Bus search provider org.gnome.Nautilus.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.132 was not provided by any .service files
Aug 15 15:01:56 ThePC gnome-shell[1917]: Received error from D-Bus search provider org.gnome.Boxes.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.130 was not provided by any .service files
Aug 15 15:01:56 ThePC gnome-shell[1917]: Received error from D-Bus search provider org.gnome.Games.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.133 was not provided by any .service files
Aug 15 15:02:11 ThePC gnome-shell[1917]: Can't update stage views actor <unnamed>[<MetaWindowActorX11>:0x55bc2ec489b0] is on because it needs an allocation.
Aug 15 15:02:11 ThePC gnome-shell[1917]: Can't update stage views actor <unnamed>[<MetaSurfaceActorX11>:0x55bc2b27c190] is on because it needs an allocation.

I don't know if journalctl /usr/bin/gnome-shell -f is that helpful here.

If I can do anything, any logs and such, I am happy to help you.

$ gnome-shell --version
GNOME Shell 44.3
G-dH commented 1 year ago

Yeah, I meant the today's commit in the previous comment, I forgot to add reference to the bug report. You don't have to type fq//, just press Ctrl+Space or click on the RFSP icon in the dash, it will enter the string automatically. This search provider offers isolated list of recently used files so you can immediately see the last 20 of them without typing. The built-in Files search provider can find them too, but you need to remember their names.

I'll let you know when I fix it, thanks for testing.

G-dH commented 1 year ago

I'm going to remove the Recent Files Search provider from V-Shell because importing Gtk into an extension is no longer allowed and I couldn't find any other way to get the file list.