[ia64] Ghostscript always crashes immediately on ia64, causing several build failures

Bug #130842 reported by Matthias Klose
4
Affects Status Importance Assigned to Milestone
GS-GPL
Invalid
Critical
ghostscript (Ubuntu)
Fix Released
High
Till Kamppeter

Bug Description

Binary package hint: ghostscript

this is seen on the ia64 buildds, for example:

  http://launchpadlibrarian.net/8709874/buildlog_ubuntu-gutsy-ia64.snort_2.7.0-2ubuntu1_FAILEDTOBUILD.txt.gz

Ghostscript does not work at all on ia64. It crashes immediately with a segfault, independent of the command line options. Also "gs" or "gs -h" crashes.

Revision history for this message
Matthias Klose (doko) wrote :

confirmed on the buildds, setting to high, although its a community architecture

Changed in ghostscript:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Can you post some test Postscript files on which 64-bit ps2pdf crashes? And can you reproduce the crash on a Ubuntu desktop machine to trigger Apport, so that we can get a backtrace (and than mark the report of apport as a duplicate of this bug). Then I will make an upstream bug report.

Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

Moving milestone.

Changed in ghostscript:
assignee: nobody → till-kamppeter
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I cannot reproduce this bug. I tried it by rebuilding the snort package on a system with the current Ghostscript installed. The build simply works for me.

Matthias, can you attach some Postscript files on which ps2pdf segfaults? Otherwise I cannot do anything here.

Changed in ghostscript:
assignee: till-kamppeter → doko
status: Confirmed → Incomplete
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Some additional observations:

- This problem does not occur with amd64 (x86_64), only with ia64.

- On ia64 Ghostscript does not work at all, calls like "gs" or "gs -h" already segfault.

description: updated
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Doko has given me access to an ia64 box (I have only amd64) and I could reproduce the bug.

Upstream is informed about the problem.

Changed in ghostscript:
assignee: doko → till-kamppeter
status: Incomplete → Confirmed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Here is a gdb backtrace, generated on doko's ia64 box:

--------------------------------------------------------------------------------
...
Program terminated with signal 11, Segmentation fault.
#0 0x200000000178b000 in strncat () from /lib/libc.so.6.1
(gdb) bt
#0 0x200000000178b000 in strncat () from /lib/libc.so.6.1
#1 0x20000000003b8b50 in gs_main_init_with_args (minst=0x6000000000004230, argc=1,
    argv=0x60000fffff01fa58) at ./src/imainarg.c:214
--------------------------------------------------------------------------------
.

Changed in ghostscript:
assignee: till-kamppeter → giles-xiph
assignee: giles-xiph → giles-ghostscript
Changed in gs-gpl:
status: Unknown → Confirmed
Revision history for this message
Alex Cherepanov (alex-cherepanov) wrote :

I cannot reproduce this problem on 3 ia64 boxes provided by HP testdrive: Red Hat 5, SUSE 10, FreeBSD. Ghostscript compiles and works just fine.
To fix this problem I need to access a box where it can be reproduced.
My public ssh key is available at http://www.ghostscript.com/~alexcher/alexcher.pub

Revision history for this message
Ralph Giles (giles-ghostscript) wrote :

Alex: did you only try the default build? It's perhaps not clear, but the issue is with the Ubuntu package, which uses a (patched) so build.

Till provides the following instructions:

apt-get source ghostscript

to download the source package of Ghostscript.

Then enter the package source directory

cd ghostscript-8.60*

See the patches in debian/patches/ build instructions in debian/rules
and the build via

dpkg-buildpackage -rfakeroot

Allow core dumping with

ulimit -c 999999999999

Then execute the program with

LD_LIBRARY_PATH=./sobin/ sobin/gsx
and start the debugger with

LD_LIBRARY_PATH=./sobin/ gdb -c core sobin/gsx

Under Ubuntu Ghostscript is built for maximum flexibility. The
./configure command line is:

LDFLAGS="-lpaper" ./configure --prefix=/usr --mandir=/usr/share/man \
        --infodir=/usr/share/info \
        --with-ijs --with-jbig2dec --with-jasper --with-x \
        --disable-gtk \
        --enable-dynamic --with-omni --enable-cups \
        --disable-compile-inits \
        --with-drivers=ALL \
--with-fontpath=/var/lib/defoma/gs.d/dirs/fonts:/usr/share/cups/fonts:/usr/share
+/ghostscript/fonts:/usr/local/lib/ghostscript/fonts:/usr/share/font

Note that for our package to build we do not use a simple "make" after
"./configure" but

make so
make obj/X11.so

Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

Moving milestone to beta.

Revision history for this message
Ralph Giles (giles-ghostscript) wrote :

The problem is that 06_libpaper_support.dpatch calls systempapersize() from libpaper without including paper.h. The return value is then read as an int instead of a pointer, which apparently doesn't work on ia64.

I've attached an updated patch. Please verify and update the package as appropriate.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Thank you for the fix, I will make a new Ubuntu package of Ghostscript soon.

Changed in ghostscript:
assignee: giles-ghostscript → till-kamppeter
status: Confirmed → In Progress
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Doko, thanks for the test accounts, these made us really able to fix this bug.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Here are new Ghostscript packages for testing

http://www.linux-foundation.org/~till/tmp/ubuntu/gutsy/ghostscript/

They will soon appear in Gutsy.

Changed in ghostscript:
status: In Progress → Fix Committed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

ghostscript (8.61.dfsg.1~svn8187-0ubuntu2) gutsy; urgency=low

  * debian/patches/06_libpaper_support.dpatch: Added missing
    "#include <paper.h>", this made Ghostscript not working at all
    on IA64 (Fixes LP: #130842, thanks to Ralph Giles from ghostscript.com
    for the fix and to Matthias Klose for the IA64 test machine).
  * debian/ghostscript.links: Bumped version number in link for CJK fonts
    (Fixes LP: #139911).

 -- Till Kamppeter <email address hidden> Tue, 18 Sep 2007 10:00:58 +0100

Changed in ghostscript:
status: Fix Committed → Fix Released
Changed in gs-gpl:
status: Confirmed → Invalid
Changed in gs-gpl:
importance: Unknown → Critical
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.