Bug 509615 - ps2pdf "Segmentation fault" on i686
ps2pdf "Segmentation fault" on i686
Status: CLOSED DUPLICATE of bug 509329
Product: Fedora
Classification: Fedora
Component: ghostscript (Show other bugs)
i686 Linux
low Severity medium
: ---
: ---
Assigned To: Tim Waugh
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-07-04 01:28 EDT by Paul F. Almquist
Modified: 2009-07-19 06:21 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-07-19 06:21:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
strace log file (145.87 KB, text/plain)
2009-07-17 20:17 EDT, armando
no flags Details

  None (edit)
Description Paul F. Almquist 2009-07-04 01:28:31 EDT
Description of problem:
ps2pdf dies with a segmentation fault message.

Version-Release number of selected component (if applicable):

How reproducible:
consistent, tried several different postscript files from various sources

Steps to Reproduce:
1. run program:  ps2pdf filename.ps
Actual results:
ps2pdf test.ps
Segmentation fault

Expected results:
successful conversion of ps file to pdf file

Additional info:
echo $?
Comment 1 Tim Waugh 2009-07-04 17:31:54 EDT
Please run 'strace -f ps2pdf test.ps 2>ps2pdf.log' and attach the ps2pdf.log file here.

One other thing: please don't upgrade/reinstall the ghostscript package as I would really like to track down this problem and only want to change one thing at a time while we stalk it.  Thanks!
Comment 2 armando 2009-07-17 20:17:04 EDT
Created attachment 354239 [details]
strace log file

I have reproduced this bug on a fresh and fully updated fedora 11 32bit i585 installation (core2duo laptop). I'm attaching the ps2pdf.log file from running the command you suggested (strace -f ps2pdf test.ps 2>ps2pdf.log). Please have a look, seems like some fonts are not where they should be... This is urgently needed by anyone writing papers in latex!

Best regards,

Comment 3 Tim Waugh 2009-07-18 05:43:59 EDT
Thank you.  Now please install the debuginfo package:

yum --enablerepo=fedora-debuginfo install ghostscript-debuginfo

Then please run this command (it's one long line):

gdb --args gs -dSAFER -dCompatibilityLevel=1.4 -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=%stderr -sOutputFile=test.pdf -dSAFER -dCompatibilityLevel=1.4 -c .setpdfwrite -f test.ps

and at the (gdb) prompt enter 'run'.  Hopefully it will still segfault, in which case please run these commands:


and then repeat these two until all the stack frames are done:

info locals

Please paste the result of all that in here.

Comment 4 armando 2009-07-18 18:35:08 EDT
Thanks for the prompt reply. Indeed, I still get a segfault and here is the output you asked for:

[...]# gdb --args gs -dSAFER -dCompatibilityLevel=1.4 -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=%stderr -sOutputFile=test.pdf -dSAFER -dCompatibilityLevel=1.4 -c .setpdfwrite -f test.ps                             
GNU gdb (GDB) Fedora (                                  
Copyright (C) 2009 Free Software Foundation, Inc.                               
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>   
This is free software: you are free to change and redistribute it.              
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"      
and "show warranty" for details.                                                
This GDB was configured as "i586-redhat-linux-gnu".                             
For bug reporting instructions, please see:                                     
(gdb) run                                                                       
Starting program: /usr/bin/gs -dSAFER -dCompatibilityLevel=1.4 -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=%stderr -sOutputFile=test.pdf -dSAFER -dCompatibilityLevel=1.4 -c .setpdfwrite -f test.ps                                        
[Thread debugging using libthread_db enabled]                                   

Program received signal SIGSEGV, Segmentation fault.
pdf_attach_charproc (pdev=<value optimized out>, pdfont=<value optimized out>, 
    pcp=0xa4bfffd2, glyph=134743966, char_code=0, gnstr=0xd040464c)            
    at base/gdevpdti.c:248                                                     
248         for (pcpo = pdfont->u.simple.s.type3.char_procs; pcpo != NULL; pcpo = pcpo->char_next) {                                                            
Missing separate debuginfos, use: debuginfo-install avahi-0.6.25-3.fc11.i586 cairo-1.8.6-2.fc11.i586 cups-libs-1.4-0.b2.18.fc11.i586 dbus-libs-1.2.12-1.fc11.i586 e2fsprogs-libs-1.41.4-10.fc11.i586 expat-2.0.1-6.i586 fontconfig-2.6.99.behdad.20090508-1.fc11.i586 freetype-2.3.9-3.fc11.i586 glibc-2.10.1-2.i686 gnutls-2.6.6-1.fc11.i586 jasper-libs-1.900.1-10.fc11.i586 keyutils-libs-1.2-5.fc11.i586 krb5-libs-1.6.3-20.fc11.i586 libICE-1.0.4-7.fc11.i586 libSM-1.1.0-4.fc11.i586 libX11-1.2.1-2.fc11.i586 libXau-1.0.4-5.fc11.i586 libXext- libXrender-0.9.4-5.fc11.i586 libXt-1.0.5-2.fc11.i586 libattr-2.4.43-3.fc11.i586 libcap-2.16-4.fc11.1.i586 libgcc-4.4.0-4.i586 libgcrypt-1.4.4-6.fc11.i586 libgpg-error-1.6-3.i586 libjpeg-6b-45.fc11.i586 libpng-1.2.37-1.fc11.i586 libselinux-2.0.80-1.fc11.i586 libstdc++-4.4.0-4.i586 libtasn1-1.8-2.fc11.i586 libtiff-3.8.2-13.fc11.i586 libxcb-1.2-4.fc11.i586 nss-softokn-freebl-3.12.3-4.fc11.i586 pixman-0.14.0-2.fc11.i586 zlib-1.2.3-22.fc11.i586
(gdb) bt
#0  pdf_attach_charproc (pdev=<value optimized out>,
    pdfont=<value optimized out>, pcp=0xa4bfffd2, glyph=134743966,
    char_code=0, gnstr=0xd040464c) at base/gdevpdti.c:248
#1  0x8c4012c0 in ?? ()
#2  0xa4bfffd2 in ?? ()
#3  0x0808079e in ?? ()
#4  0x00000000 in ?? ()
(gdb) info locals
pcpo = <value optimized out>
duplicate_char_name = <value optimized out>
(gdb) up
#1  0x8c4012c0 in ?? ()
(gdb) info locals
No symbol table info available.
(gdb) up
#2  0xa4bfffd2 in ?? ()
(gdb) info locals
No symbol table info available.
(gdb) up
#3  0x0808079e in ?? ()
(gdb) info locals
No symbol table info available.
(gdb) up
#4  0x00000000 in ?? ()
(gdb) info locals
No symbol table info available.
(gdb) up
Initial frame selected; you cannot go up.


Comment 5 Tim Waugh 2009-07-19 06:21:44 EDT
Thank you.  I'm going to mark this bug as a duplicate of another -- could you please confirm whether the PostScript test file from that bug (i.e. bug #509329 comment #4) also fails for you? (Please add comments to bug #509329 from now on.)

*** This bug has been marked as a duplicate of bug 509329 ***

Note You need to log in before you can comment on or make changes to this bug.