Nautilus unresponsive when copying files from/to cifs mount
Affected version
- Nightly flatpak: Can't test it because the process consumes about 150% CPU on average even when trying to browse the local file system (seems like another issue for another day)
- Other: Files 40.2 on a Fedora 34 VM in QubesOS (I know that's EoL, but that shouldn't matter as it's the same behavior for my colleague who uses Files 42.2 on a Fedora 36 VM)
Steps to reproduce
- Mount a samba share using cifs
- Browse to the mount location using Nautilus
- Copy a large file (a few hundred MB) to your local file system using Nautilus
- Alternatively: Copy a large file from your file system to the share
Current behavior
Nautilus immediately becomes slow and sort of "hangs". It seems this mostly affects tabs/windows where the cifs-mounted folder is opened. The local filesystem can be browsed during the copy process.
- When downloading from the share, the progress bar for the file movement updates every once in a while but not constantly (seems to hang as well).
- When uploading, the progress bar immediately shows an almost completed transfer (433/434 MB).
When mounting the same share via gio (using the Nautilus GUI "Other locations -> Connect to server") I can continue using it during copy operations.
Expected behavior
Nautilus and especially the samba share can be used without noticeable lag during file copy.
Additional information
This seems to be related (or even identical?) to #1972 (closed) (maybe also #262 (closed)?). In contrast to #1972 (closed) I do not see any messages regarding nautilus-share in gdb and I don't think that this project is used in Fedora, so that doesn't seem to be the issue in my case (maybe it wasn't in the other case as well?). I tried creating a stacktrace as requested in the other issue (no expert on this, but I followed https://github.com/HExSA-Lab/nautilus/blob/master/USING-GDB.md):
Just after starting the copy process from the share (I did not observe the other direction):
[...]
[Thread 0x7fffd27fc640 (LWP 2963) exited]
[Thread 0x7fffda2cf640 (LWP 2968) exited]
[Thread 0x7ffff17d1640 (LWP 2967) exited]
[New Thread 0x7ffff17d1640 (LWP 2971)]
^C
Thread 1 "nautilus" received signal SIGINT, Interrupt.
0x00007ffff6cc458f in poll () from /lib64/libc.so.6
(gdb) info thread
Id Target Id Frame
* 1 Thread 0x7ffff30ceec0 (LWP 2910) "nautilus" 0x00007ffff6cc458f in poll () from /lib64/libc.so.6
2 Thread 0x7ffff3052640 (LWP 2914) "gmain" 0x00007ffff6cc458f in poll () from /lib64/libc.so.6
3 Thread 0x7ffff2851640 (LWP 2915) "gdbus" 0x00007ffff6cc458f in poll () from /lib64/libc.so.6
4 Thread 0x7ffff2050640 (LWP 2917) "pool-org.gnome." 0x00007ffff6cc9ddd in syscall () from /lib64/libc.so.6
8 Thread 0x7fffdbfff640 (LWP 2921) "dconf worker" 0x00007ffff6cc458f in poll () from /lib64/libc.so.6
43 Thread 0x7fffd3fff640 (LWP 2966) "pool-org.gnome." 0x00007ffff6ccf893 in splice () from /lib64/libc.so.6
46 Thread 0x7ffff17d1640 (LWP 2971) "pool-org.gnome." 0x00007ffff6cc9ddd in syscall () from /lib64/libc.so.6
(gdb) thread 46
[Switching to thread 46 (Thread 0x7ffff17d1640 (LWP 2971))]
#0 0x00007ffff6cc9ddd in syscall () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff6cc9ddd in syscall () from /lib64/libc.so.6
#1 0x00007ffff7f0c85c in g_cond_wait_until () from /lib64/libglib-2.0.so.0
#2 0x00007ffff7e8e401 in g_async_queue_pop_intern_unlocked () from /lib64/libglib-2.0.so.0
#3 0x00007ffff7e8e586 in g_async_queue_timeout_pop () from /lib64/libglib-2.0.so.0
#4 0x00007ffff7eefbd9 in g_thread_pool_thread_proxy.lto_priv () from /lib64/libglib-2.0.so.0
#5 0x00007ffff7eecc42 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#6 0x00007ffff6da72a5 in start_thread () from /lib64/libpthread.so.0
#7 0x00007ffff6ccf323 in clone () from /lib64/libc.so.6
(gdb) thread 43
[Switching to thread 43 (Thread 0x7fffd3fff640 (LWP 2966))]
#0 0x00007ffff6ccf893 in splice () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff6ccf893 in splice () from /lib64/libc.so.6
#1 0x00007ffff71d83c0 in do_splice () from /lib64/libgio-2.0.so.0
#2 0x00007ffff71d9924 in g_file_copy () from /lib64/libgio-2.0.so.0
#3 0x000055555560680a in copy_move_file ()
#4 0x0000555555608c29 in nautilus_file_operations_copy ()
#5 0x00007ffff722adef in g_task_thread_pool_thread () from /lib64/libgio-2.0.so.0
#6 0x00007ffff7eefb34 in g_thread_pool_thread_proxy.lto_priv () from /lib64/libglib-2.0.so.0
#7 0x00007ffff7eecc42 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#8 0x00007ffff6da72a5 in start_thread () from /lib64/libpthread.so.0
#9 0x00007ffff6ccf323 in clone () from /lib64/libc.so.6
(gdb) thread 8
[Switching to thread 8 (Thread 0x7fffdbfff640 (LWP 2921))]
#0 0x00007ffff6cc458f in poll () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff6cc458f in poll () from /lib64/libc.so.6
#1 0x00007ffff7f1248c in g_main_context_iterate.constprop () from /lib64/libglib-2.0.so.0
#2 0x00007ffff7ebbc03 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3 0x00007ffff010c3ed in dconf_gdbus_worker_thread () from /usr/lib64/gio/modules/libdconfsettings.so
#4 0x00007ffff7eecc42 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#5 0x00007ffff6da72a5 in start_thread () from /lib64/libpthread.so.0
#6 0x00007ffff6ccf323 in clone () from /lib64/libc.so.6
(gdb) thread 4
[Switching to thread 4 (Thread 0x7ffff2050640 (LWP 2917))]
#0 0x00007ffff6cc9ddd in syscall () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff6cc9ddd in syscall () from /lib64/libc.so.6
#1 0x00007ffff7f0c253 in g_cond_wait () from /lib64/libglib-2.0.so.0
#2 0x00007ffff7e8e41b in g_async_queue_pop_intern_unlocked () from /lib64/libglib-2.0.so.0
#3 0x00007ffff7eefb07 in g_thread_pool_thread_proxy.lto_priv () from /lib64/libglib-2.0.so.0
#4 0x00007ffff7eecc42 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#5 0x00007ffff6da72a5 in start_thread () from /lib64/libpthread.so.0
#6 0x00007ffff6ccf323 in clone () from /lib64/libc.so.6
(gdb) thread 3
[Switching to thread 3 (Thread 0x7ffff2851640 (LWP 2915))]
#0 0x00007ffff6cc458f in poll () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff6cc458f in poll () from /lib64/libc.so.6
#1 0x00007ffff7f1248c in g_main_context_iterate.constprop () from /lib64/libglib-2.0.so.0
#2 0x00007ffff7ebda93 in g_main_loop_run () from /lib64/libglib-2.0.so.0
#3 0x00007ffff728cd9a in gdbus_shared_thread_func.lto_priv () from /lib64/libgio-2.0.so.0
#4 0x00007ffff7eecc42 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#5 0x00007ffff6da72a5 in start_thread () from /lib64/libpthread.so.0
#6 0x00007ffff6ccf323 in clone () from /lib64/libc.so.6
(gdb) thread 2
[Switching to thread 2 (Thread 0x7ffff3052640 (LWP 2914))]
#0 0x00007ffff6cc458f in poll () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff6cc458f in poll () from /lib64/libc.so.6
#1 0x00007ffff7f1248c in g_main_context_iterate.constprop () from /lib64/libglib-2.0.so.0
#2 0x00007ffff7ebbc03 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3 0x00007ffff7ebbc51 in glib_worker_main () from /lib64/libglib-2.0.so.0
#4 0x00007ffff7eecc42 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#5 0x00007ffff6da72a5 in start_thread () from /lib64/libpthread.so.0
#6 0x00007ffff6ccf323 in clone () from /lib64/libc.so.6
(gdb) thread 1
[Switching to thread 1 (Thread 0x7ffff30ceec0 (LWP 2910))]
#0 0x00007ffff6cc458f in poll () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff6cc458f in poll () from /lib64/libc.so.6
#1 0x00007ffff7f1248c in g_main_context_iterate.constprop () from /lib64/libglib-2.0.so.0
#2 0x00007ffff7ebbc03 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3 0x00007ffff725899d in g_application_run () from /lib64/libgio-2.0.so.0
#4 0x00005555555ac279 in main ()
After resuming Nautilus and trying to again access the tab with the opened cifs share:
(gdb) continue
Continuing.
[New Thread 0x7fffda2cf640 (LWP 2974)]
[New Thread 0x7fffd27fc640 (LWP 2975)]
[Thread 0x7fffda2cf640 (LWP 2974) exited]
[Thread 0x7fffd27fc640 (LWP 2975) exited]
^C
Thread 1 "nautilus" received signal SIGINT, Interrupt.
0x00007ffff6cd00fb in inotify_add_watch () from /lib64/libc.so.6
(gdb)
Continuing.
[Thread 0x7ffff17d1640 (LWP 2971) exited]
^C
Thread 1 "nautilus" received signal SIGINT, Interrupt.
0x00007ffff6cd00fb in inotify_add_watch () from /lib64/libc.so.6
(gdb) info thread
Id Target Id Frame
* 1 Thread 0x7ffff30ceec0 (LWP 2910) "nautilus" 0x00007ffff6cd00fb in inotify_add_watch () from /lib64/libc.so.6
2 Thread 0x7ffff3052640 (LWP 2914) "gmain" 0x00007ffff6cc9ddd in syscall () from /lib64/libc.so.6
3 Thread 0x7ffff2851640 (LWP 2915) "gdbus" 0x00007ffff6cc458f in poll () from /lib64/libc.so.6
4 Thread 0x7ffff2050640 (LWP 2917) "pool-org.gnome." 0x00007ffff6cc9ddd in syscall () from /lib64/libc.so.6
8 Thread 0x7fffdbfff640 (LWP 2921) "dconf worker" 0x00007ffff6cc458f in poll () from /lib64/libc.so.6
43 Thread 0x7fffd3fff640 (LWP 2966) "pool-org.gnome." 0x00007ffff6ccf893 in splice () from /lib64/libc.so.6
(gdb) thread 43
[Switching to thread 43 (Thread 0x7fffd3fff640 (LWP 2966))]
#0 0x00007ffff6ccf893 in splice () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff6ccf893 in splice () from /lib64/libc.so.6
#1 0x00007ffff71d83c0 in do_splice () from /lib64/libgio-2.0.so.0
#2 0x00007ffff71d997f in g_file_copy () from /lib64/libgio-2.0.so.0
#3 0x000055555560680a in copy_move_file ()
#4 0x0000555555608c29 in nautilus_file_operations_copy ()
#5 0x00007ffff722adef in g_task_thread_pool_thread () from /lib64/libgio-2.0.so.0
#6 0x00007ffff7eefb34 in g_thread_pool_thread_proxy.lto_priv () from /lib64/libglib-2.0.so.0
#7 0x00007ffff7eecc42 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#8 0x00007ffff6da72a5 in start_thread () from /lib64/libpthread.so.0
#9 0x00007ffff6ccf323 in clone () from /lib64/libc.so.6
(gdb) thread 8
[Switching to thread 8 (Thread 0x7fffdbfff640 (LWP 2921))]
#0 0x00007ffff6cc458f in poll () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff6cc458f in poll () from /lib64/libc.so.6
#1 0x00007ffff7f1248c in g_main_context_iterate.constprop () from /lib64/libglib-2.0.so.0
#2 0x00007ffff7ebbc03 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3 0x00007ffff010c3ed in dconf_gdbus_worker_thread () from /usr/lib64/gio/modules/libdconfsettings.so
#4 0x00007ffff7eecc42 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#5 0x00007ffff6da72a5 in start_thread () from /lib64/libpthread.so.0
#6 0x00007ffff6ccf323 in clone () from /lib64/libc.so.6
(gdb) thread 4
[Switching to thread 4 (Thread 0x7ffff2050640 (LWP 2917))]
#0 0x00007ffff6cc9ddd in syscall () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff6cc9ddd in syscall () from /lib64/libc.so.6
#1 0x00007ffff7f0c253 in g_cond_wait () from /lib64/libglib-2.0.so.0
#2 0x00007ffff7e8e41b in g_async_queue_pop_intern_unlocked () from /lib64/libglib-2.0.so.0
#3 0x00007ffff7eefb07 in g_thread_pool_thread_proxy.lto_priv () from /lib64/libglib-2.0.so.0
#4 0x00007ffff7eecc42 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#5 0x00007ffff6da72a5 in start_thread () from /lib64/libpthread.so.0
#6 0x00007ffff6ccf323 in clone () from /lib64/libc.so.6
(gdb) thread 3
[Switching to thread 3 (Thread 0x7ffff2851640 (LWP 2915))]
#0 0x00007ffff6cc458f in poll () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff6cc458f in poll () from /lib64/libc.so.6
#1 0x00007ffff7f1248c in g_main_context_iterate.constprop () from /lib64/libglib-2.0.so.0
#2 0x00007ffff7ebda93 in g_main_loop_run () from /lib64/libglib-2.0.so.0
#3 0x00007ffff728cd9a in gdbus_shared_thread_func.lto_priv () from /lib64/libgio-2.0.so.0
#4 0x00007ffff7eecc42 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#5 0x00007ffff6da72a5 in start_thread () from /lib64/libpthread.so.0
#6 0x00007ffff6ccf323 in clone () from /lib64/libc.so.6
(gdb) thread 2
[Switching to thread 2 (Thread 0x7ffff3052640 (LWP 2914))]
#0 0x00007ffff6cc9ddd in syscall () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff6cc9ddd in syscall () from /lib64/libc.so.6
#1 0x00007ffff7f0c16c in g_mutex_lock_slowpath () from /lib64/libglib-2.0.so.0
#2 0x00007ffff72b82a0 in im_scan_missing () from /lib64/libgio-2.0.so.0
#3 0x00007ffff7ebed21 in g_timeout_dispatch () from /lib64/libglib-2.0.so.0
#4 0x00007ffff7ebe4cf in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#5 0x00007ffff7f124f8 in g_main_context_iterate.constprop () from /lib64/libglib-2.0.so.0
#6 0x00007ffff7ebbc03 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#7 0x00007ffff7ebbc51 in glib_worker_main () from /lib64/libglib-2.0.so.0
#8 0x00007ffff7eecc42 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#9 0x00007ffff6da72a5 in start_thread () from /lib64/libpthread.so.0
#10 0x00007ffff6ccf323 in clone () from /lib64/libc.so.6
(gdb) thread 1
[Switching to thread 1 (Thread 0x7ffff30ceec0 (LWP 2910))]
#0 0x00007ffff6cd00fb in inotify_add_watch () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff6cd00fb in inotify_add_watch () from /lib64/libc.so.6
#1 0x00007ffff72b7cb6 in _ik_watch () from /lib64/libgio-2.0.so.0
#2 0x00007ffff72b7f7b in _ip_start_watching () from /lib64/libgio-2.0.so.0
#3 0x00007ffff72bb529 in g_inotify_file_monitor_start () from /lib64/libgio-2.0.so.0
#4 0x00007ffff72b242c in g_local_file_monitor_new_for_path () from /lib64/libgio-2.0.so.0
#5 0x0000555555621ceb in nautilus_monitor_directory ()
#6 0x0000555555672760 in nautilus_directory_monitor_add_internal ()
#7 0x0000555555633344 in vfs_file_monitor_add.lto_priv ()
#8 0x0000555555659824 in nautilus_path_bar_update_path ()
#9 0x0000555555659b44 in nautilus_path_bar_set_path ()
#10 0x00005555555f0d0e in nautilus_window_sync_location_widgets ()
#11 0x00005555555eb1ea in nautilus_window_slot_set_active ()
#12 0x00005555555f1886 in nautilus_window_set_active_slot ()
#13 0x00007ffff7134c2f in g_closure_invoke () from /lib64/libgobject-2.0.so.0
#14 0x00007ffff7150ea6 in signal_emit_unlocked_R () from /lib64/libgobject-2.0.so.0
#15 0x00007ffff715276a in g_signal_emit_valist () from /lib64/libgobject-2.0.so.0
#16 0x00007ffff7152983 in g_signal_emit () from /lib64/libgobject-2.0.so.0
#17 0x00007ffff78b6973 in gtk_notebook_button_press.lto_priv () from /lib64/libgtk-3.so.0
#18 0x00007ffff7a288c8 in _gtk_marshal_BOOLEAN__BOXEDv () from /lib64/libgtk-3.so.0
#19 0x00007ffff715283a in g_signal_emit_valist () from /lib64/libgobject-2.0.so.0
#20 0x00007ffff7152983 in g_signal_emit () from /lib64/libgobject-2.0.so.0
#21 0x00007ffff79ec904 in gtk_widget_event_internal.part.0.lto_priv () from /lib64/libgtk-3.so.0
#22 0x00007ffff788fcc0 in propagate_event.lto_priv () from /lib64/libgtk-3.so.0
#23 0x00007ffff7890b8a in gtk_main_do_event () from /lib64/libgtk-3.so.0
#24 0x00007ffff75727d3 in _gdk_event_emit () from /lib64/libgdk-3.so.0
#25 0x00007ffff75a9c16 in gdk_event_source_dispatch.lto_priv.0.lto_priv () from /lib64/libgdk-3.so.0
#26 0x00007ffff7ebe4cf in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#27 0x00007ffff7f124f8 in g_main_context_iterate.constprop () from /lib64/libglib-2.0.so.0
#28 0x00007ffff7ebbc03 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#29 0x00007ffff725899d in g_application_run () from /lib64/libgio-2.0.so.0
#30 0x00005555555ac279 in main ()