Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 134446 - ghostscript AFPL 8.54 always seg-faults on many pdf files
Summary: ghostscript AFPL 8.54 always seg-faults on many pdf files
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High critical (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-26 12:13 UTC by ivo welch
Modified: 2006-05-31 05:00 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ivo welch 2006-05-26 12:13:06 UTC
earlier afpl worked fine.  to see what the problem was, I edited the ps2pdfwr file to invoke gdb:

# ps2pdf14 -dPDFSETTINGS=/printer de.PDF
-dSAFER -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -q -dNOPAUSE -dBATCH
-sDEVICE=pdfwrite -sOutputFile=de.PDF.pdf -dSAFER -dCompatibilityLevel=1.4
-dPDFSETTINGS=/printer -c .setpdfwrite -f de.PDF
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) run -dSAFER -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -q -dNOPAUSE
-dBATCH -sDEVICE=pdfwrite -sOutputFile=de.PDF.pdf -dSAFER
-dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -c .setpdfwrite -f de.PDF
Starting program: /usr/bin/gs -dSAFER -dCompatibilityLevel=1.4
-dPDFSETTINGS=/printer -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite
-sOutputFile=de.PDF.pdf -dSAFER -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer
-c .setpdfwrite -f de.PDF
(no debugging symbols found)
...
(no debugging symbols found)
AFPL Ghostscript 8.54: Set UseCUEColor for UseDeviceIndependentColor to work
properly.

Program received signal SIGSEGV, Segmentation fault.
0x00000000005a1046 in png_set_write_fn ()
(gdb) bt
#0  0x00000000005a1046 in png_set_write_fn ()
#1  0x00002b435a7da2c9 in bsearch () from /lib/tls/libc.so.6
#2  0x00002b435a7da284 in bsearch () from /lib/tls/libc.so.6
#3  0x00002b435a7da284 in bsearch () from /lib/tls/libc.so.6
#4  0x00002b435a7da284 in bsearch () from /lib/tls/libc.so.6
#5  0x00002b435a7da569 in qsort () from /lib/tls/libc.so.6
#6  0x00000000005a1155 in png_set_write_fn ()
#7  0x000000000058e268 in png_set_write_fn ()
#8  0x0000000000590b88 in png_set_write_fn ()
#9  0x000000000059c9e9 in png_set_write_fn ()
#10 0x000000000059ca43 in png_set_write_fn ()
#11 0x0000000000564875 in png_set_write_fn ()
#12 0x00000000005c1496 in png_set_write_fn ()
#13 0x0000000000469c09 in jpeg_idct_islow ()
#14 0x00000000004081f6 in ?? ()
#15 0x00002b435a7c6644 in __libc_start_main () from /lib/tls/libc.so.6
#16 0x00000000004080ea in ?? ()
#17 0x00007ffffff4cac8 in ?? ()
#18 0x000000000000001c in ?? ()
#19 0x0000000000000010 in ?? ()
#20 0x00007ffffff4e08b in ?? ()
#21 0x00007ffffff4e097 in ?? ()
#22 0x00007ffffff4e09f in ?? ()
#23 0x00007ffffff4e0b8 in ?? ()
#24 0x00007ffffff4e0cf in ?? ()
#25 0x00007ffffff4e0d2 in ?? ()
#26 0x00007ffffff4e0dc in ?? ()
#27 0x00007ffffff4e0e4 in ?? ()
#28 0x00007ffffff4e0f6 in ?? ()
#29 0x00007ffffff4e10e in ?? ()
#30 0x00007ffffff4e116 in ?? ()
#31 0x00007ffffff4e12f in ?? ()
#32 0x00007ffffff4e146 in ?? ()
#33 0x00007ffffff4e149 in ?? ()
#34 0x00007ffffff4e156 in ?? ()
#35 0x00007ffffff4e159 in ?? ()
#36 0x0000000000000000 in ?? ()
(gdb) The program is running.  Exit anyway? (y or n) y

ortage 2.0.54-r2 (default-linux/amd64/2006.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.16.4 x86_64)
=================================================================
System uname: 2.6.16.4 x86_64 AMD Athlon(tm)64 X2 Dual Core Processor  3800+
Gentoo Base System version 1.6.14
distcc 2.12.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5-r2, 2.4.2
dev-python/pycrypto: [Not Present]
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -pipe -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib64/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-march=athlon64 -pipe -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://mirror.datapipe.net/gentoo ftp://ftp.gtlib.cc.gatech.edu/p ub/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo"
LC_ALL="POSIX"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib acl acpi alsa amd64 arts atlas audiofile avi berkdb bitmap-fonts blas bonobo bzip2 bzlib calendar cdr cli crypt cups curl directfb dri dv dvd dvdr eds emacs emboss encode esd exif expat f77 fam fbcon ffmpeg flac foomaticdb fortran ftp g77 gd gdbm ggi gif glut gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile idn ieee1394 imagemagick imlib ipv6 isdnlog java javascript jpeg kde kdeenablefinal lcms ldap libedit libwww lm_sensors lzw lzw-tiff mad mbox mikmod mime mng motif mozilla mp3 mpeg mval mysql nas ncurses nls nptl nsplugin ogg opengl pam pcre pdflib perl png postgres ppds pppd python qt quicktime readline reflection ruby samba scanner sdl session slang snmp soap spell spl ssl symlink tcltk tcpd tetex tidy tiff truetype truetype-fonts type1-fonts udev usb vorbis xine xinerama xml xml2 xmms xorg xpm xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS, PORTDIR_OVERLAY


PS: They are now at one more incremental version, 8.55.  maybe it fixes this problem, but 8.55 is not in the portage tree.
Comment 1 Stefan Schweizer (RETIRED) gentoo-dev 2006-05-26 12:48:57 UTC
can you please report this upstream to bugs.ghostscript.com and post the link here?

Where is this 8.55 release? I cannot find it, sorry
Comment 2 ivo welch 2006-05-26 13:00:52 UTC
sorry, mea culpa.  their main page lists 8.54 as the current release.  the current stable release page lists 8.53 as the current release.  and their bug reporting system goes up to 8.55, so I assumed that it exists.

/iaw
Comment 3 ivo welch 2006-05-28 15:15:12 UTC
please take a look at

  http://bugs.ghostscript.com/show_bug.cgi?id=688721

the nice folks at AFPL have made some fixes, which hopefully resolve this.  if you offer a new build, is there a way to offer an ebuild that builds this with a "-g" switch, so that if I still get a segfault, I can tell the folks over there more?

PS: I am just trying to help.  alas, I am not a hacker, so my knowledge is very, very limited.

regards,

/iaw
Comment 4 ivo welch 2006-05-29 16:19:03 UTC
ok, they fixed it.  here is what is needed:

Replace  sizeof(int) to sizeof(*a)
in the file gxfcopy.c, line
qsort(a, cfdata->num_glyphs, sizeof(int), compare_glyph_names);

regards,

/iaw
Comment 5 Stefan Schweizer (RETIRED) gentoo-dev 2006-05-31 05:00:16 UTC
thanks, fixed in -r1