Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140678 - media-gfx/imagemagick hangs due to threads when converting jpg files to pdf's
Summary: media-gfx/imagemagick hangs due to threads when converting jpg files to pdf's
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Karol Wojtaszek (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-16 11:53 UTC by Rodolphe Keller
Modified: 2007-04-17 18:08 UTC (History)
3 users (show)

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


Attachments
Strace output (imagemagick.strace,59.70 KB, text/plain)
2006-11-09 06:37 UTC, Boris Dusek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rodolphe Keller 2006-07-16 11:53:09 UTC
Hi, dear developers.

I'm experiencing that bug: when i try to convert jpg's files to pdf's, the convert command hangs, and nothing more happens. A pdf is created, but it doesn't growth over of 910 bytes (and is impossible to read, anyway).

Step to reproduce:
convert file.jpg file.pdf

Expected result: a pdf file, with the image in it.

Actual result: the convert command hangs, an the pdf file is useless. Its creation seems to block when it reaches 909-914 bytes.

I didnt try other versions of imagemagick. I'm going to try just now. I asked to some other people to try (2), and they have the exactly same problem.

emerge --info:
Portage 2.1.1_pre3 (default-linux/x86/2006.0, gcc-4.1.1/vanilla, glibc-2.4-r3, 2.6.17-gentoo-r2 i686)
=================================================================
System uname: 2.6.17-gentoo-r2 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz
Gentoo Base System version 1.12.1
app-admin/eselect-compiler: 2.0.0_rc2-r1
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: [Not Present]
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/eselect/compiler /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="fr_FR.UTF-8"
LC_ALL="fr_FR.UTF-8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X acpi alsa apache2 avi berkdb bitmap-fonts cdr cli crypt cups dlloader dri dvd dvdr eds emacs emboss encode firefox foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 imlib ipv6 isdnlog jpeg libg++ libwww lm_sensors mad mikmod motif mozilla mp3 mpeg ncurses nls nptl nptlonly nsplugin nvidia ogg opengl oss pam pcre pdflib perl png pppd python qt3 qt4 quicktime readline reflection sdl session spell spl ssl tcpd truetype truetype-fonts type1-fonts udev unicode usb vorbis win32codecs xml xmms xorg xv zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_nv"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 reisio 2006-07-16 13:08:56 UTC
Doesn't work here, either.  Used to in previous version, though.
Comment 2 Stephen Cavilia 2006-07-17 11:54:33 UTC
pdf output works on 6.2.5.5 and 6.2.6.0, but not 6.2.8.0 (recently marked stable... perhaps too soon?)
Comment 3 Stefan Schwarzer 2006-07-24 13:53:11 UTC
Possibly marking imagemagick-6.2.8.0 stable has to do with bug #136452. I had to downgrade libpng to version 1.2.8-r1 to get imagemagick-6.2.5.5 emerged.
Comment 4 Stefan Schwarzer 2006-07-25 02:02:53 UTC
Unfortunately, libpng 1.2.8-r1 has a security flaw, see http://www.gentoo.org/security/en/glsa/glsa-200607-06.xml .
Comment 5 Stefan Schwarzer 2006-07-25 10:17:44 UTC
An strace run shows that convert blocks at a futex call. By this, I found a workaround for using the recent stable versions for libpng and ImageMagick:

1. Update libpng (currently to version 1.2.12)

2. Change into directory /usr/portage/media-gfx/imagemagick/

3. Change the ebuild file imagemagick-6.2.8.0.ebuild to compile without threads, i. e. change the option --with-threads to --without-threads

4. Recalculate the digests:  ebuild imagemagick-6.2.8.0.ebuild digest

5. emerge -av imagemagick

Generating PDF files then worked for me. However, I needed to change the convert option "-page A4" to "-page 595x842" (see the numbers at http://studio.imagemagick.org/script/command-line-options.php#page ). I don't know if this anything to do with this bug #140678.
Comment 6 Boris Dusek 2006-11-09 06:35:31 UTC
The same problem here even after 2 months, with imagemagick 6.2.9.5, glibc 2.4-r3, kernel 2.6.18-r1 (gentoo-sources). I also ran strace on imagemagick (strace -f convert image.jpg image.pdf), the same problem as described above;

I attach the strace output.
Comment 7 Boris Dusek 2006-11-09 06:37:10 UTC
Created attachment 101537 [details]
Strace output
Comment 8 Bryan Østergaard (RETIRED) gentoo-dev 2007-04-17 18:08:21 UTC
Fixed in 6.3.3, please reopen if the issue still exists with that version.