Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 420349 - media-libs/jasper-1.900.1-r4 asserts when loading jpeg2k corrupted file and crashes many gtk-based applications (chromium, nautilus, eog, ...)
Summary: media-libs/jasper-1.900.1-r4 asserts when loading jpeg2k corrupted file and c...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-09 03:38 UTC by milan hodoscek
Modified: 2012-06-16 22:42 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
file to crash nautilus (Markststandbemaßt.jp2.gz,62.48 KB, application/x-gzip)
2012-06-09 03:38 UTC, milan hodoscek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description milan hodoscek 2012-06-09 03:38:53 UTC
Created attachment 314753 [details]
file to crash nautilus

nautilus crashes if viewing folder containing jpeg2k corrupted file
jasper package has problems to convert a certain jpeg2k file (possibly corrupted: I have no way to check - having only GNU/Linux system) so it aborts with SIGABRT with the message:

jasper: jpc_dec.c:1077: jpc_dec_tiledecode: Assertion `dec->numcomps == 3' failed.

This is gdb's output:


#0  0x00007ffff7810f55 in raise () from /lib64/libc.so.6
#1  0x00007ffff78123d8 in abort () from /lib64/libc.so.6
#2  0x00007ffff7809f42 in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007ffff7809ff2 in __assert_fail () from /lib64/libc.so.6
#4  0x00007ffff7ba1f6f in jpc_dec_tiledecode () from /usr/lib64/libjasper.so.1
#5  0x00007ffff7ba3fc1 in jpc_dec_process_sod () from /usr/lib64/libjasper.so.1
#6  0x00007ffff7ba336d in jpc_decode () from /usr/lib64/libjasper.so.1
#7  0x00007ffff7b9c978 in jp2_decode () from /usr/lib64/libjasper.so.1
#8  0x00007ffff7b9145c in jas_image_decode () from /usr/lib64/libjasper.so.1
#9  0x0000000000401437 in main ()

But the botom line is that nautilus shouldn't mind if this is the case and should continue to work. I am attaching the file which crashes nautilus (3.2, 3.4) if one opens a folder where this file is in. I had to gzip it, because it crashes also google-chrome trying to attach this file.

Possibly this bug should be reported to GNOME directly, but it is very interesting to see how one file in user home directory can destroy a system :-)
At least for non-command line users.
Comment 1 milan hodoscek 2012-06-09 03:39:40 UTC
Portage 2.1.10.65 (default/linux/amd64/10.0, gcc-4.7.0, glibc-2.15-r2, 3.4.0-gentoo x86_64)
=================================================================
System uname: Linux-3.4.0-gentoo-x86_64-Intel-R-_Core-TM-2_CPU_T5600_@_1.83GHz-with-gentoo-2.1
Timestamp of tree: Sat, 09 Jun 2012 02:30:01 +0000
app-shells/bash:          4.2_p29
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/cmake:           2.8.8-r2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.2
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.5
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.4.6-r1, 4.5.3-r2, 4.6.3, 4.7.0
sys-devel/gcc-config:     1.7.2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo science x-portage
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=core2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe -march=core2"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en us"
MAKEOPTS="-j 2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/science /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib abiword accessibility acl acpi alsa amd64 amr apng berkdb bluetooth bzip2 cairo cdda cddax cddb cdio cdparanoia cdr cdrom cdsound cjk cli consolekit context cpio cracklib crypt css cups cxx cyrillic dbus declarative demosaic detex device-mapper dirac dri dvd dvi2tty dvipdfm emacs embedded enca encode exif extra extras ffmpeg firefox flac fontconfig fortran games gcj gdbm gdu gif gimp glib gnome gnuplot gnutls goffice gphoto2 gpm graphics graphicsmagick graphite graphviz grub gs gsf gsl gsm gstreamer gtk gtk2-perl gtk3 gtkhtml gudev gzip gzip-el h224 h281 h323 hacking humanities hwdb iconv icu id3 id3tag imagemagick introspection ipv6 jadetex java jbig jpeg jpeg2k kate kdcraw kde kdepim kpathsea lame lapack laptop latex latex3 lcms libv4l2 llvm llvm-gcc luatex lxde lzo mad matroska mbox melt mmx mng modules mp3 mp4 mpd mpeg mplayer mpqc msms mudflap multilib musepack music nautilus ncurses networkmanager nls nptl nsplugin ntp ocrad octave offensive ogg ogg123 ogm omega openexr opengl openmp openssl pam pcre pdf perl plasma png policykit pppd pstricks publishers pulseaudio python python3 qt3support qt4 readline rle schroedinger science sdl semantic-desktop sendto server session shout speech speex sql sqlite sse sse2 ssh ssl static-libs svg taglib tcpd tex4ht theora tiff tonal truetype twolame udev unicode unzip upnp uuencode v4l2 vaapi valgrind video vim vim-pager vim-syntax vorbis vpx weather webkit webm x264 xcb xetex xindy xml xmp xorg xpm xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en us" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 2 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-06-09 05:10:04 UTC
(In reply to comment #0)
> But the botom line is that nautilus shouldn't mind if this is the case and
> should continue to work.

No. This is a bug in media-libs/jasper, not in nautilus. Nautilus, Chrome, and all your other gtk-based applications have the right to expect that the graphics libraries they use will not crash even when loading invalid image files.
Comment 3 milan hodoscek 2012-06-09 14:26:00 UTC
Thanks for clearing this up. I expected jasper is like plugin to nautilus, so it shouldn't be effected. But it's library, so a different story.I just looked at the jasper web site and the last release is like 5 years old, so I guess this will be hard to fix :-(
Comment 5 milan hodoscek 2012-06-10 21:19:20 UTC
Yes! The beauty of free sowftware :-)

I hope I can put jpeg2k USE flag to off, so it will not make trouble in the future.
Comment 6 Patrick Kursawe (RETIRED) gentoo-dev 2012-06-11 21:26:41 UTC
Made a new patch bundle and uploaded it to our mirrors. This will most likely fix the problem. Let's hope I remember to CVS commit tomorrow :-)
Thanks for the input.
Comment 7 Patrick Kursawe (RETIRED) gentoo-dev 2012-06-13 07:06:03 UTC
In CVS, please re-open if there are remaining problems.
Comment 8 milan hodoscek 2012-06-16 22:42:06 UTC
it is fixed at least for me