On Sat, Feb 09, 2013 at 04:39:00PM +0000, Mattias Killian wrote:
> Can you provide such a crashing ps file? I dont' use cups so I don't
> know the exact parameters it invokes all the commands to create it.

Sure no problem. Copy of pstops.ps at http://pastie.org/6108635 and copy
of CLP-500.ppd at http://pastie.org/6108749.

[BTW, apols if you have received a couple of copies of this already but 
I've had a few issues with my mail server].

> Here (gs-0.06 on amd64, with a current OpenBSD), I don't even see
> a debug message mentioning cups_set_color_info. So I really need a
> test file.

OK so I've now moved to a fresh install of 5.3/i386 current from the 08
Feb snapshot, and installed the following snapshot packages:
ghostscript-9.06p0-a4
cups-1.6.1p13
splix-2.0.0p7

So all the following and the backtrace below is now from current, with
ghostscript 9.06p0 (snapshot 8 Feb).

FYI the pstops.ps file is just the result of manually running the 
sequence of filters that are run by cups on a simple text file, as 
follows:

$ export PPD=/etc/cups/ppd/CLP-500.ppd

$ cat test.txt
Mary had a little lamb
its fleece was white as snow
and everywhere that Mary went
the lamb was sure to go

$ /usr/local/libexec/cups/filter/texttopdf 1 martin '' 1 '' <test.txt 
>texttopdf.pdf
[...]

$ /usr/local/libexec/cups/filter/pdftopdf 1 martin '' 1 '' <texttopdf.pdf 
>pdftopdf.pdf
[...]

$ /usr/local/libexec/cups/filter/pdftops 1 martin '' 1 '' <pdftopdf.pdf 
>pdftops.ps
[...]

$ /usr/local/libexec/cups/filter/pstops 1 martin '' 1 '' <pdftops.ps >pstops.ps
[...]

At this point ghostscript seems quite happy to render pstops.ps to the
screen (with gs -dSAFER -dBATCH pstops.ps) and the result looks fine.

But when I try to rasterise pstops.ps with the cups device, gstoraster 
hangs and ghostscript produces a core dump:

$ /usr/local/libexec/cups/filter/gstoraster 1 martin '' 1 '' <pstops.ps 
>gstoraster.ras 
DEBUG: PPD uses qualifier 'CMYK.OFF.600dpi'
WARN: not compiled with DBus support
INFO: no profiles specified in PPD
DEBUG: Ghostscript command line: /usr/local/bin/gs -dQUIET -dPARANOIDSAFER 
-dNOPAUSE -dBATCH -dNOINTERPOLATE -dNOMEDIAATTRS -sDEVICE=cups -sstdout=%stderr 
-sOutputFile=%stdout -I/usr/share/cups/fonts -c -f -_
DEBUG: envp[0]="_=/usr/local/libexec/cups/filter/gstoraster"
DEBUG: envp[1]="WINDOWPATH=5"
DEBUG: envp[2]="LOGNAME=martin"
DEBUG: envp[3]="FVWM_MODULEDIR=/usr/X11R6/lib/X11/fvwm"
DEBUG: envp[4]="WINDOWID=14680077"
DEBUG: envp[5]="XTERM_SHELL=/bin/ksh"
DEBUG: envp[6]="HOME=/home/martin"
DEBUG: 
envp[7]="PKG_PATH=http://www.mirrorservice.org/pub/OpenBSD/snapshots/packages/i386/";
DEBUG: envp[8]="XTERM_VERSION=XTerm/OpenBSD(287)"
DEBUG: envp[9]="DISPLAY=:0"
DEBUG: envp[10]="PPD=/etc/cups/ppd/CLP-500.ppd"
DEBUG: 
envp[11]="PATH=/home/martin/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games:."
DEBUG: envp[12]="TERM=xterm"
DEBUG: envp[13]="HOSTDISPLAY=openbsd.wlan.crossleys.biz:0"
DEBUG: envp[14]="SHELL=/bin/ksh"
DEBUG: 
envp[15]="DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/dbus-UA35bncHIF,guid=92020df85b3cce30ad6b7418511769a4"
DEBUG: envp[16]="USER=martin"
DEBUG: envp[17]="XTERM_LOCALE=C"
^C

> Providing backtraces from ghostscript 9.05 doesn't help me.

OK, understood, so here's a backtrace of the core file from
an unstripped version of ghostscript 9.06p0 and libgs.so.15.0:

$ gdb gs gs.core
[...]
Core was generated by `gs'.
Program terminated with signal 11, Segmentation fault.
[...]
#0  0x081ee02f in gsicc_set_device_profile () from /usr/local/lib/libgs.so.15.0
(gdb) bt
#0  0x081ee02f in gsicc_set_device_profile () from /usr/local/lib/libgs.so.15.0
#1  0x08358040 in cups_set_color_info () from /usr/local/lib/libgs.so.15.0
#2  0x083594dd in cups_put_params () from /usr/local/lib/libgs.so.15.0
#3  0x08371dcc in gs_putdeviceparams () from /usr/local/lib/libgs.so.15.0
#4  0x0817eb40 in zcolor_remap_one () from /usr/local/lib/libgs.so.15.0
#5  0x08150496 in gs_interpret () from /usr/local/lib/libgs.so.15.0
#6  0x08144674 in gs_push_boolean () from /usr/local/lib/libgs.so.15.0
#7  0x081454b6 in gs_main_init2aux () from /usr/local/lib/libgs.so.15.0
#8  0x08145671 in gs_main_init2 () from /usr/local/lib/libgs.so.15.0
#9  0x08146b84 in gs_main_run_start () from /usr/local/lib/libgs.so.15.0
#10 0x08147d83 in gs_main_init_with_args () from /usr/local/lib/libgs.so.15.0
#11 0x08148ebe in gsapi_init_with_args () from /usr/local/lib/libgs.so.15.0
#12 0x1c000ba3 in main ()

> Ciao,
>       Kili

Many thanks for your time on this. Let me know any further info or
testing you want.

MARTIN

Reply via email to