After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 785404 - Commit 3b298f60 makes nautilus try to thumbnail folders
Commit 3b298f60 makes nautilus try to thumbnail folders
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: Thumbnail
git master
Other Linux
: Normal normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-07-25 13:19 UTC by Hussam Al-Tayeb
Modified: 2017-09-04 12:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
thumbnail: Fix nautilus trying to thumbnail folders (1.29 KB, patch)
2017-09-04 12:11 UTC, Bastien Nocera
committed Details | Review

Description Hussam Al-Tayeb 2017-07-25 13:19:31 UTC
nautilus crashes while generating thumbnails on gnome-desktop from git.
Reverting gnome-desktop to 3.25.4 fixes it.

Thread 4 "pool" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe6802700 (LWP 4966)]
0x00007ffff52d5260 in gnome_desktop_thumbnail_script_exec ()
   from /usr/lib/libgnome-desktop-3.so.12
(gdb) thread apply all bt full

Thread 8 (Thread 0x7fffceffd700 (LWP 5107))

  • #0 syscall
  • #1 g_cond_wait_until
    at gthread-posix.c line 1442
  • #2 g_async_queue_pop_intern_unlocked
    at gasyncqueue.c line 422
  • #3 g_async_queue_timeout_pop_unlocked
    at gasyncqueue.c line 570
  • #4 g_thread_pool_wait_for_new_task
    at gthreadpool.c line 262
  • #5 g_thread_pool_thread_proxy
    at gthreadpool.c line 296
  • #6 g_thread_proxy
    at gthread.c line 784
  • #7 start_thread
  • #8 clone

Thread 7 (Thread 0x7fffcf7fe700 (LWP 5106))

  • #0 syscall
  • #1 g_cond_wait_until
    at gthread-posix.c line 1442
  • #2 g_async_queue_pop_intern_unlocked
    at gasyncqueue.c line 422
  • #3 g_async_queue_timeout_pop_unlocked
    at gasyncqueue.c line 570
  • #4 g_thread_pool_wait_for_new_task
  • #5 g_thread_pool_thread_proxy
    at gthreadpool.c line 296
  • #6 g_thread_proxy
    at gthread.c line 784
  • #7 start_thread
  • #8 clone

Thread 6 (Thread 0x7fffcffff700 (LWP 5101))

  • #0 syscall
  • #1 g_cond_wait_until
    at gthread-posix.c line 1442
  • #2 g_async_queue_pop_intern_unlocked
    at gasyncqueue.c line 422
  • #3 g_async_queue_timeout_pop_unlocked
    at gasyncqueue.c line 570
  • #4 g_thread_pool_wait_for_new_task
    at gthreadpool.c line 262
  • #5 g_thread_pool_thread_proxy
    at gthreadpool.c line 296
  • #6 g_thread_proxy
    at gthread.c line 784
  • #7 start_thread
  • #8 clone

Thread 4 (Thread 0x7fffe6802700 (LWP 4966))

  • #0 gnome_desktop_thumbnail_script_exec
  • #1 gnome_desktop_thumbnail_factory_generate_thumbnail
  • #2 thumbnail_thread_func
    at ../src/nautilus-thumbnails.c line 567
  • #3 g_task_thread_pool_thread
    at gtask.c line 1328
  • #4 g_thread_pool_thread_proxy
    at gthreadpool.c line 307
  • #5 g_thread_proxy
    at gthread.c line 784
  • #6 start_thread
  • #7 clone

Comment 1 Ernestas Kulik 2017-07-25 13:37:08 UTC
Can’t reproduce it on my machine fwiw.
Comment 2 Hussam Al-Tayeb 2017-07-25 13:51:00 UTC
Ok, it stopped crashing but it now shows blank (missing) icons for folders (no folder thumbnailer installed) and /tmp/ quickly fills up with 3GB of gnome* files.
Comment 3 Hussam Al-Tayeb 2017-08-07 20:23:50 UTC
Unless I did something wrong in my git bisect, the thumbnailing breakage started with https://git.gnome.org/browse/gnome-desktop/commit/?id=3b298f60
Comment 4 Hussam Al-Tayeb 2017-08-07 20:29:25 UTC
Reverting that checkin makes thumbnailing work again so I can confirm it was the cause.
Comment 5 Bastien Nocera 2017-08-09 08:40:59 UTC
Looks like a thumbnailer crashing. You'll need to figure out which one that is, and report bugs against it.
Comment 6 Hussam Al-Tayeb 2017-08-09 09:04:13 UTC
(In reply to Bastien Nocera from comment #5)
> Looks like a thumbnailer crashing. You'll need to figure out which one that
> is, and report bugs against it.

Ok, thank you very much for the directions.
I will do so. it is likely either gsf-office.thumbnailer or totem.thumbnailer because I have hundreds of spreadsheets and text documents and over 180GB of videos.
Comment 7 Khurshid Alam 2017-09-04 11:25:09 UTC
I can confirm it works If I revert 3b298f60. On 32 bit even if bubblewrap is disabled (which ubuntu) did nautilus now takes lot longer to create folder thumbnail.
Comment 8 Bastien Nocera 2017-09-04 11:29:51 UTC
(In reply to Khurshid Alam from comment #7)
> I can confirm it works If I revert 3b298f60. On 32 bit even if bubblewrap is
> disabled (which ubuntu) did nautilus now takes lot longer to create folder
> thumbnail.

This is a separate bug, as folders really shouldn't go through the thumbnailer hot-path (setting up and launching something in bwrap) if there's no handler for the mime-type.

I'm still waiting on Hussam's report as to which thumbnailer is crashing.
Comment 9 Hussam Al-Tayeb 2017-09-04 11:45:53 UTC
Nothing is crashing according to coredumpctl.
Comment 10 Bastien Nocera 2017-09-04 11:46:45 UTC
Hussam, do you have any thumbnailers in /usr/share/thumbnailers for which the binary mentioned in TryExec isn't installed?
Comment 11 Hussam Al-Tayeb 2017-09-04 11:58:01 UTC
They all have TryExec lines and the binaries mentioned are installed in the correct path. Also each thumbnailer contains the full path.
For example,
TryExec=/usr/bin/totem-video-thumbnailer
Exec=/usr/bin/totem-video-thumbnailer -s %s %u %o
Comment 12 Bastien Nocera 2017-09-04 12:00:49 UTC
So now it's only the speed problem? This bug has transformed from crashes in libgnome-desktop to /tmp filling up. Is it about the speed now?
Comment 13 Bastien Nocera 2017-09-04 12:11:39 UTC
Created attachment 359070 [details] [review]
thumbnail: Fix nautilus trying to thumbnail folders

And loads of other non-thumbnailable files in a regression introduced in
3b298f60. To answer _can_thumbnail() correctly, we need to check whether
a thumbnailer exists for the mime-type in question, not simply assume it
to be available.
Comment 14 Hussam Al-Tayeb 2017-09-04 12:13:39 UTC
(In reply to Bastien Nocera from comment #12)
> So now it's only the speed problem? This bug has transformed from crashes in
> libgnome-desktop to /tmp filling up. Is it about the speed now?

Both speed and /tmp filling up.
With latest revision, I am seeing the following.

without reverting 3b298f60:
- entries in /tmp keep appearing and disappearing very quickly.
- no crashes.
- Thumbnails don't ever appear or get cached.
- folder icons are blank.

with reverting 3b298f60:
- Entries in /tmp show up slowly and don't get cleaned up.
- no crashes happen.
- The occasional thumbnail appears after a minute.
- folder icons show.

I'm sorry this is taking much of your time.

I'm not using bubblewrap nor flatpak.
Comment 15 Bastien Nocera 2017-09-04 12:17:48 UTC
I found the problem described in comment 7. Hussam, please try to keep the bugs to one issue in the future, even if the problems pile up. It's hard enough trying to track bugs in new code without having to guess how the problems show up :/

(In reply to Hussam Al-Tayeb from comment #14)
> (In reply to Bastien Nocera from comment #12)
> > So now it's only the speed problem? This bug has transformed from crashes in
> > libgnome-desktop to /tmp filling up. Is it about the speed now?
> 
> Both speed and /tmp filling up.
> With latest revision, I am seeing the following.
> 
> without reverting 3b298f60:
> - entries in /tmp keep appearing and disappearing very quickly.
> - no crashes.
> - Thumbnails don't ever appear or get cached.
> - folder icons are blank.
> 
> with reverting 3b298f60:
> - Entries in /tmp show up slowly and don't get cleaned up.
> - no crashes happen.
> - The occasional thumbnail appears after a minute.
> - folder icons show.

If this still happens on master with the patch attached to this bug, please file a new bug. Most of those were already fixed in other bugs that ended up in 3.25.91.

> I'm not using bubblewrap nor flatpak.

bubblewrap is a hard-requirement on Linux, you cannot *not* have it installed and expect things to work.
Comment 16 Hussam Al-Tayeb 2017-09-04 12:19:08 UTC
Ok, I will install it and rebuild gnome-desktop.
Comment 17 Bastien Nocera 2017-09-04 12:20:26 UTC
Attachment 359070 [details] pushed as 2d6ce46 - thumbnail: Fix nautilus trying to thumbnail folders
Comment 18 Hussam Al-Tayeb 2017-09-04 12:31:26 UTC
Ok, I've filed bug 787249 regarding the remaining thumbnailing issues.
Thank you very much.