Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 447654 - =app-arch/libarchive-3.0.4-r1: stabilize (was: 3.0.3 - Infinite loop when working with xps files (app-text/libgxps))
Summary: =app-arch/libarchive-3.0.4-r1: stabilize (was: 3.0.3 - Infinite loop when wor...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Keywording and Stabilization (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Brian Harring (RETIRED)
URL:
Whiteboard:
Keywords: STABLEREQ
Depends on:
Blocks:
 
Reported: 2012-12-18 00:31 UTC by Adam Randall
Modified: 2013-01-06 16:58 UTC (History)
3 users (show)

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


Attachments
A test XPS file that hangs with libarchive 3.0.3 installed (test2.xps,104.36 KB, application/octet-stream)
2012-12-18 00:32 UTC, Adam Randall
Details
strace of a hang with libarchive 3.0.3 installed. (xpstopdf.libarchive.3.0.3.txt,21.64 KB, text/plain)
2012-12-18 00:41 UTC, Adam Randall
Details
Working strace with libarchive 3.0.4-r1 installed. (xpstopdf.libarchive.3.0.4-r1.txt,43.04 KB, text/plain)
2012-12-18 00:42 UTC, Adam Randall
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Randall 2012-12-18 00:31:15 UTC
A project that I have requires that I be able to convert various files into PDF. One type of file that we get commonly are XPS files. I found the (masked) app-text/libgxps ebuild that provides xpstopdf, which is wonderful. Unfortunately, when I was testing the capabilities, almost all my files would cause the process to take 100% CPU.

Looking around on the web I found a number of mentions to this in libarchive 3.0.3 with regards to XPS files. It seems that there are patches for this, but I'm not sure if one is upstream or not. Here are a couple of sites that have patches, or discussions of the issue:

http://code.google.com/p/libarchive/issues/detail?id=226
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=662603

Since it seems that this affects 3.0.3, which is the current stable release, I upgraded to the masked 3.0.4-r1. Testing xpstopdf with that version of libarchive does fix the infinite loop / 100% CPU hang issue.

Reproducible: Sometimes

Steps to Reproduce:
1. Unmask and install app-text/libgxps
2. Convert test files to PDF using xpstopdf
3. Observe hung process using 100% CPU



I did not test this on x86, only amd64.

I don't think it is relevant, but here is my emerge info:

# emerge --info
Portage 2.1.11.31 (default/linux/amd64/10.0, gcc-4.5.4, glibc-2.15-r3, 3.5.7-gentoo x86_64)
=================================================================
System uname: Linux-3.5.7-gentoo-x86_64-Intel-R-_Xeon-TM-_CPU_3.00GHz-with-gentoo-2.1
Timestamp of tree: Mon, 17 Dec 2012 05:15:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://gentoo.cs.uni.edu/ http://mirror.usu.edu/mirrors/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
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=""
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="acl amd64 apache2 bash-completion berkdb bzip2 cli corefonts cracklib crypt ctype cups curl cxx djvu dri filter fontconfig fortran fpx gcj gd gdbm gif gnutls gpm graphviz gs hash hdri iconv imagemagick ipv6 jbig jpeg jpeg2k lcms ldap-sasl lzma mmx modules mudflap multilib ncurses nls nptl nptlonly openexr openmp pam pcntl pcre pdf png posix pppd readline samba sasl session simplexml smtp snmp soap sockets sse sse2 ssh ssl svg tcpd threads tiff truetype unicode vim-syntax webp wmf xml zip 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 auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Adam Randall 2012-12-18 00:32:18 UTC
Created attachment 332606 [details]
A test XPS file that hangs with libarchive 3.0.3 installed
Comment 2 Adam Randall 2012-12-18 00:41:43 UTC
Created attachment 332608 [details]
strace of a hang with libarchive 3.0.3 installed.
Comment 3 Adam Randall 2012-12-18 00:42:32 UTC
Created attachment 332610 [details]
Working strace with libarchive 3.0.4-r1 installed.
Comment 4 Adam Randall 2012-12-18 00:43:38 UTC
Traces were created with:

# strace xpstopdf test2.xps >name.txt 2>&1
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2012-12-18 13:11:54 UTC
So lets reuse this bug for 3.0.4-r1 stabilization then. 3.0.3 can ba dropped.
Comment 6 Agostino Sarubbo gentoo-dev 2012-12-18 16:04:31 UTC
amd64 stable
Comment 7 Agostino Sarubbo gentoo-dev 2012-12-18 16:05:51 UTC
x86 stable
Comment 8 Adam Randall 2012-12-18 17:30:20 UTC
A word of thanks for working on this. It's greatly appreciated!
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2012-12-20 15:09:57 UTC
Stable for HPPA.
Comment 10 Vicente Olivert Riera (RETIRED) gentoo-dev 2012-12-20 16:48:25 UTC
ppc : all fine here
Comment 11 Samuli Suominen (RETIRED) gentoo-dev 2012-12-20 17:23:56 UTC
(In reply to comment #10)
> ppc : all fine here

I tend to remember also 3.0.4 working on PowerPC from earlier testing. Thanks. Marked stable for ppc/ppc64.
Comment 12 Markus Meier gentoo-dev 2012-12-25 15:04:13 UTC
arm stable
Comment 13 Agostino Sarubbo gentoo-dev 2012-12-25 22:19:08 UTC
ia64 stable
Comment 14 Agostino Sarubbo gentoo-dev 2012-12-30 14:26:17 UTC
sparc stable
Comment 15 Agostino Sarubbo gentoo-dev 2012-12-30 20:45:19 UTC
alpha stable
Comment 16 Raúl Porcel (RETIRED) gentoo-dev 2013-01-06 16:58:39 UTC
s390/sh stable