Nautilus hangs when clicking on preview images

Bug #391757 reported by Friedrich Graeter
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
nautilus (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Binary package hint: nautilus

When I click on an image file, that is previewed in nautilus, the entire process hangs. I can circumvent this problem only by disabling image previews in nautilus.

Using "gdb" I get the following results (after pressing CTRL+C for stopping nautilus):

^C
Program received signal SIGINT, Interrupt.
[Switching to Thread 0x7fbe3791a7e0 (LWP 26240)]
0x00007fbe33337a94 in __lll_lock_wait () from /lib/libpthread.so.0
(gdb) trace
trace command requires an argument
(gdb) backtrace
#0 0x00007fbe33337a94 in __lll_lock_wait () from /lib/libpthread.so.0
#1 0x00007fbe33333190 in _L_lock_102 () from /lib/libpthread.so.0
#2 0x00007fbe33332a7e in pthread_mutex_lock () from /lib/libpthread.so.0
#3 0x00007fbe355c73d5 in ?? () from /usr/lib/libgdk_pixbuf-2.0.so.0
#4 0x00007fbe355cab55 in ?? () from /usr/lib/libgdk_pixbuf-2.0.so.0
#5 0x00007fbe355cb6a5 in gdk_pixbuf_loader_write ()
   from /usr/lib/libgdk_pixbuf-2.0.so.0
#6 0x00007fbe355c8583 in ?? () from /usr/lib/libgdk_pixbuf-2.0.so.0
#7 0x00007fbe355c86ef in gdk_pixbuf_new_from_stream_at_scale ()
   from /usr/lib/libgdk_pixbuf-2.0.so.0
#8 0x00007fbe35da7b4f in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#9 0x00007fbe35da8222 in gtk_icon_info_load_icon ()
   from /usr/lib/libgtk-x11-2.0.so.0
#10 0x00000000004ebabe in ?? ()
#11 0x00000000004d0e30 in ?? ()
#12 0x00000000004fac4c in ?? ()
#13 0x00000000004f3ea9 in ?? ()
#14 0x00000000004caada in ?? ()
#15 0x00000000004b29d7 in ?? ()
#16 0x00007fbe3456620a in g_main_context_dispatch ()
   from /usr/lib/libglib-2.0.so.0
#17 0x00007fbe345698e0 in ?? () from /usr/lib/libglib-2.0.so.0
#18 0x00007fbe34569dad in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#19 0x00007fbe35dd3bc7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#20 0x0000000000442bc7 in ?? ()
#21 0x00007fbe32fd65a6 in __libc_start_main () from /lib/libc.so.6
#22 0x000000000042f819 in ?? ()
#23 0x00007fff3f959da8 in ?? ()
#24 0x000000000000001c in ?? ()
#25 0x0000000000000001 in ?? ()
#26 0x00007fff3f95a6e7 in ?? ()
#27 0x0000000000000000 in ?? ()

For me, it looks like a deadlock...

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Your backtrace is incomplete, as it's missing some debug symbols - you need to install at least libglib2.0-0-dbg, libgtk2.0-0-dbg and nautilus-dbg.

Also, is that the full output of "backtrace full" from GDB? Are there any other threads running too? (you should see these in GDB also)

Changed in nautilus (Ubuntu):
status: New → Incomplete
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Also, which version of Ubuntu are you using?

Revision history for this message
Friedrich Graeter (graeter) wrote :
Download full text (10.6 KiB)

Sorry, for not providing all required informations. I'm using Jaunty (with latest updates).

Before crashing I've got the following gdb output:

~ $ gdb nautilus
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
(gdb) run
Starting program: /usr/bin/nautilus
[Thread debugging using libthread_db enabled]
[New Thread 0x7f428192d7e0 (LWP 2012)]
[New Thread 0x7f42765f2950 (LWP 2026)]
[Thread 0x7f42765f2950 (LWP 2026) exited]
Initializing nautilus-open-terminal extension
[New Thread 0x7f42765f2950 (LWP 2068)]
[New Thread 0x7f4263133950 (LWP 2069)]

** (nautilus:2012): WARNING **: Unable to add monitor: Nicht unterstützt
[Thread 0x7f42765f2950 (LWP 2068) exited]
[New Thread 0x7f42765f2950 (LWP 2070)]
[New Thread 0x7f426194f950 (LWP 2071)]
[Thread 0x7f4263133950 (LWP 2069) exited]
[Thread 0x7f42765f2950 (LWP 2070) exited]

** (nautilus:2012): WARNING **: Cannot extract frame (252, 0) from the grid

[New Thread 0x7f42765f2950 (LWP 2076)]
[New Thread 0x7f4263133950 (LWP 2077)]
[Thread 0x7f426194f950 (LWP 2071) exited]
[New Thread 0x7f426194f950 (LWP 2079)]
[Thread 0x7f426194f950 (LWP 2079) exited]
[Thread 0x7f42765f2950 (LWP 2076) exited]
[New Thread 0x7f42765f2950 (LWP 2081)]
[Thread 0x7f42765f2950 (LWP 2081) exited]
[New Thread 0x7f42765f2950 (LWP 2087)]
[New Thread 0x7f426194f950 (LWP 2088)]
[Thread 0x7f426194f950 (LWP 2088) exited]
[New Thread 0x7f4262498950 (LWP 2089)]
[Thread 0x7f42765f2950 (LWP 2087) exited]
[New Thread 0x7f42765f2950 (LWP 2090)]
[New Thread 0x7f426194f950 (LWP 2091)]
[New Thread 0x7f42603da950 (LWP 2092)]
[Thread 0x7f426194f950 (LWP 2091) exited]
[Thread 0x7f42765f2950 (LWP 2090) exited]
[Thread 0x7f42603da950 (LWP 2092) exited]

After pressing CTRL+C, because nautilus hangs:

^C
Program received signal SIGINT, Interrupt.
[Switching to Thread 0x7f428192d7e0 (LWP 2012)]
0x00007f427d34aa94 in __lll_lock_wait () from /lib/libpthread.so.0

Doing the backtrace leads to:

(gdb) backtrace full
#0 0x00007f427d34aa94 in __lll_lock_wait () from /lib/libpthread.so.0
No symbol table info available.
#1 0x00007f427d346190 in _L_lock_102 () from /lib/libpthread.so.0
No symbol table info available.
#2 0x00007f427d345a7e in pthread_mutex_lock () from /lib/libpthread.so.0
No symbol table info available.
#3 0x00007f427f5da3d5 in _gdk_pixbuf_lock (image_module=<value optimized out>)
    at /build/buildd/gtk+2.0-2.16.1/gdk-pixbuf/gdk-pixbuf-io.c:119
No locals.
#4 0x00007f427f5ddb55 in gdk_pixbuf_loader_load_module (loader=0x3595580,
    image_type=<value optimized out>, error=0x34b3a28)
    at /build/buildd/gtk+2.0-2.16.1/gdk-pixbuf/gdk-pixbuf-loader.c:379
 priv = (GdkPixbufLoaderPrivate *) 0x3711550
#5 0x00007f427f5de6a5 in IA__gdk_pixbuf_loader_write (loader=0x3595580,
    buf=0x7fff8995c530 "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!-- Generator: Adobe Illustrator 9.0, SVG Export Plug-In -->\n<svg\n...

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Could you provide an example image that causes this issue?

Thanks

Revision history for this message
Friedrich Graeter (graeter) wrote :

I analyzed the problem and found out, that it does not seem to be a problem with the images I try to open.

The problem seems to be a complex SVG file that got visited when I browse to the destination directory of the image.

I checked the debugger output of gdb and I saw, that nautilus start a new thread whenever I visit the directory with this SVG file. But because this SVG file is really complex, this thread doesn't terminate in an apropriate time. When I open another image without this thread to be terminated, nautilus hangs...

(Perhaps, because it waits for a lock to be released by the thread that creates the SVG preview)

Unfortunately I can't disclose this SVG file by now. But it is apparently very complex - Inkscape needs a lot of memory and time to render it. So perhaps the SVG thumbnailing mechanism of nautilus has to be prevented to thumbnail complex images...

Revision history for this message
Sebastien Bacher (seb128) wrote :

seems to not be a bug but just a slow loading due to a complex image

Changed in nautilus (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Low
Revision history for this message
Friedrich Graeter (graeter) wrote :

The problem is, that this bug does look like a crash of Nautilus, since nautilus hangs completely, unless the thread completely rendered the SVG. Since SVG and Inkscape gains on popularity it is a real issue for everyone, who wants to make image processing on Ubuntu.

It's also a little bit strange, why Nautilus crashes, only when opening another file (using double-click or right-click and "Open"). Why doesn't it hang already when creating the thumbnail of other files?

For me it looks like that there is some small locking issue inside Nautilus when opening files during a thumbnail is generated...

Revision history for this message
Bruno Santos (bsantos) wrote :
Download full text (3.7 KiB)

There are other bug reports somehow connected to this issue, but I'll post here since this is still open.

I have 9.10 in two machines and in one of them this issue shows up.

The one that works fine is a MacBook2,1 with 2GB of RAM and 9.10 64bits. The other is a desktop with 6GB of RAM, also running 9.10 64 bits. Both have the same related libs versions (I'll confirm that later).

The backtrace from nautilus when it hangs is the following:

#0 __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136
#1 0x00007ffff6933295 in _L_lock_949 () from /lib/libpthread.so.0
#2 0x00007ffff69330b8 in __pthread_mutex_lock (mutex=0x7ffff5c4a488) at pthread_mutex_lock.c:61
#3 0x00007ffff5a36555 in _gdk_pixbuf_lock (image_module=<value optimized out>) at /build/buildd/gtk+2.0-2.18.3/gdk-pixbuf/gdk-pixbuf-io.c:119
#4 0x00007ffff5a39df5 in gdk_pixbuf_loader_load_module (loader=0x10a5220, image_type=<value optimized out>, error=0x0)
    at /build/buildd/gtk+2.0-2.18.3/gdk-pixbuf/gdk-pixbuf-loader.c:379
#5 0x00007ffff5a3a8c3 in gdk_pixbuf_loader_eat_header_write (loader=0x10a5220,
    buf=0x7fffd83c9010 "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!-- Created with Inkscape (http://www.inkscape.org/) -->\n\n<svg\n xmlns:i=\"http://ns.adobe.com/AdobeIllustrator/10.0/\"\n xmlns:dc=\"http://purl."..., count=579848, error=0x0)
    at /build/buildd/gtk+2.0-2.18.3/gdk-pixbuf/gdk-pixbuf-loader.c:417
#6 IA__gdk_pixbuf_loader_write (loader=0x10a5220,
    buf=0x7fffd83c9010 "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!-- Created with Inkscape (http://www.inkscape.org/) -->\n\n<svg\n xmlns:i=\"http://ns.adobe.com/AdobeIllustrator/10.0/\"\n xmlns:dc=\"http://purl."..., count=579848, error=0x0)
    at /build/buildd/gtk+2.0-2.18.3/gdk-pixbuf/gdk-pixbuf-loader.c:463
#7 0x00000000004b3c29 in get_pixbuf_for_content (source_object=<value optimized out>, res=<value optimized out>, user_data=<value optimized out>)
    at nautilus-directory-async.c:3886
#8 thumbnail_read_callback (source_object=<value optimized out>, res=<value optimized out>, user_data=<value optimized out>)
    at nautilus-directory-async.c:3937
#9 0x00007ffff57ae89f in load_contents_close_callback (obj=<value optimized out>, close_res=<value optimized out>, user_data=0x1243f70)
    at /build/buildd/glib2.0-2.22.3/gio/gfile.c:6142
#10 0x00007ffff57c6be0 in async_ready_close_callback_wrapper (source_object=0xe71860, res=0xe718c0, user_data=0x1243f70)
    at /build/buildd/glib2.0-2.22.3/gio/ginputstream.c:485
#11 0x00007ffff57d4b28 in complete_in_idle_cb_for_thread (_data=<value optimized out>) at /build/buildd/glib2.0-2.22.3/gio/gsimpleasyncresult.c:650
#12 0x00007ffff49a5bce in g_main_dispatch (context=0x7fee80) at /build/buildd/glib2.0-2.22.3/glib/gmain.c:1960
#13 IA__g_main_context_dispatch (context=0x7fee80) at /build/buildd/glib2.0-2.22.3/glib/gmain.c:2513
#14 0x00007ffff49a9598 in g_main_context_iterate (context=0x7fee80, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>)
    at /build/buildd/glib2.0-2.22.3/glib/gmain.c:2591
#15 0x00007ffff49a99f5 in IA__g_main_loop_run (loop=0xdc32b0) at /b...

Read more...

Revision history for this message
Bruno Santos (bsantos) wrote :
Revision history for this message
Bruno Santos (bsantos) wrote :

Aha!

Well, the file in question is shared through Dropbox. One of the files in the SVG was a local TIF in the desktop that wasn't available in the laptop. I took the file out of the xml and the thumbnail got generated without issues in the desktop!

So this has got something to do with TIFs inside the SVG...

Revision history for this message
Sebastien Bacher (seb128) wrote :

could you try if that's still an issue in lucid? could you add the example to the bug?

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks for the report, it has been some time without any response or feedback in this bug report and we are wondering if this is still an issue for you with the latest release of Ubuntu the Natty Narwhal, May you please test with that version and comment back if you're still having or not the issue? Please have a look at http://www.ubuntu.com/download to know how to install that version.Thanks in advance.

Revision history for this message
Bruno Santos (bsantos) wrote : Re: [Bug 391757] Nautilus hangs when clicking on preview images

I don't have these hangs with some SVG anymore, so I assume this is a non
issue on Natty.

I have reproducible crashes though, with the same kind of SVG (with embedded
raster images, png, jpg).

I think the crashes are a reported issue, but I'll confirm and issue a new
bug report for it.

On Thu, May 19, 2011 at 8:33 PM, Pedro Villavicencio <email address hidden>wrote:

> Thanks for the report, it has been some time without any response or
> feedback in this bug report and we are wondering if this is still an
> issue for you with the latest release of Ubuntu the Natty Narwhal, May
> you please test with that version and comment back if you're still
> having or not the issue? Please have a look at
> http://www.ubuntu.com/download to know how to install that
> version.Thanks in advance.
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/391757
>
> Title:
> Nautilus hangs when clicking on preview images
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/391757/+subscribe
>

Revision history for this message
Pedro Villavicencio (pedro) wrote :

please enable apport and provide a crash for that one you're facing, lets close this bug for now, thanks.

Changed in nautilus (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.