Crash when opening image files larger than 5M (>5M)

Bug #1241752 reported by PeterW
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
cairo (Ubuntu)
Confirmed
High
Unassigned

Bug Description

This is similar to the bug reported here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=710701

However, the crash that is now getting generated is from an entirely different call and file. Specifically, the error is:

eog: /build/buildd/cairo-1.12.16/src/cairo-xlib-surface-shm.c:619: _cairo_xlib_shm_pool_create: Assertion `*ptr != ((void *)0)' failed.
Aborted (core dumped)

In the message above, I was using eog, but this affects other apps, like gThumb as well.

In terms of the environment, I'm using Ubuntu 13.10 on an 64-bit machine, and am using libcairo2-1.12.16.

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: libcairo2 1.12.16-0ubuntu2
ProcVersionSignature: Ubuntu 3.11.0-12.19-generic 3.11.3
Uname: Linux 3.11.0-12-generic x86_64
ApportVersion: 2.12.5-0ubuntu2
Architecture: amd64
Date: Fri Oct 18 11:08:27 2013
InstallationDate: Installed on 2013-04-25 (176 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Alpha amd64 (20130402.1)
MarkForUpload: True
ProcEnviron:
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: cairo
UpgradeStatus: Upgraded to saucy on 2013-10-15 (2 days ago)

Revision history for this message
PeterW (peter-waltman) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cairo (Ubuntu):
status: New → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report, the error is different from the one on the debian bug. It would be useful if you could open the bug upstream on https://bugs.freedesktop.org/enter_bug.cgi?product=cairo with an example image

Revision history for this message
Frits Letteboer (f-letteboer) wrote :

I had the same problem with large files; that's because kernel.shmmax seems too small by default (256M).

Try adding the following to /etc/sysctl.conf and run 'sysctl -p' or reboot:

[...]
kernel.shmmax=536870912
[...]

This will double the value to 512M.
It fixed my problems. Try other values if this didn't work in your case.

Revision history for this message
PeterW (peter-waltman) wrote :

Frits' fix (comment #4) worked for me. Thanks!

Revision history for this message
gazhay (gazhay) wrote :

There is no kernel.shmmax line in my /etc/sysctl.conf file, is it safe to add one? under 14.10 ubuntu

Revision history for this message
Michael Beck (eliteknipser) wrote :

Frits' fix (comment #4) also worked for me.
And not in Ubuntu. It is Linux Mint Debian Edition 2 with eog (eye of gnome) here.
but ...thank you :)

Revision history for this message
Sophie Schumann (sharkynoms) wrote :
Download full text (3.4 KiB)

Confirmed, this bug is still around and Frits' fix (comment #4) worked for me on Linux Mint 17.3:

$ gdb --args eog IMG_9458_stitch.jpg
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 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".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from eog...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/eog IMG_9458_stitch.jpg
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py", line 63, in <module>
    from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named 'libstdcxx'
[New Thread 0x7fffec3be700 (LWP 24975)]
[New Thread 0x7fffebbbd700 (LWP 24976)]
[New Thread 0x7fffeb1af700 (LWP 24977)]
[New Thread 0x7fffea9ae700 (LWP 24978)]

(eog:24971): EOG-WARNING **: Couldn't load icon: Error writing
eog: /build/buildd/cairo-1.13.0~20140204/src/cairo-xlib-surface-shm.c:619: _cairo_xlib_shm_pool_create: Assertion `*ptr != ((void *)0)' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff3bbccc9 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007ffff3bbccc9 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff3bc00d8 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff3bb5b86 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00007ffff3bb5c32 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x00007ffff5165873 in ?? () from /usr/lib/x86_64-linux-gnu/libcairo.so.2
#5 0x00007ffff51661e7 in ?? () from /usr/lib/x86_64-linux-gnu/libcairo.so.2
#6 0x00007ffff516627c in ?? () from /usr/lib/x86_64-linux-gnu/libcairo.so.2
#7 0x00007ffff5135d8d in cairo_surface_create_similar_image () from /usr/lib/x86_64-linux-gnu/libcairo.so.2
#8 0x00007ffff5baafec in gdk_cairo_set_source_pixbuf () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#9 0x000000000044ae0d in ?? ()
#10 0x000000000044d4fb in eog_scroll_view_set_image ()
#11 0x0000000000435e61 in ?? ()
#12 0x000000000043698b in ?? ()
#13 0x00007ffff469a5e7 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#14 0x00007ffff46b3088 in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x00007ffff46b3ce2 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x0000000000425e9c in ?? ()
#17 0x00007ffff43cace5 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007ffff43cb048 in ?? () from /lib/x86_64-linu...

Read more...

tags: added: xenial
Changed in cairo (Ubuntu):
importance: Undecided → High
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.