Now this is a strange one I have since the last upgrade of ghostsctript [ebuild R ] app-text/ghostscript-7.07.1-r8 [ebuild R ] net-print/apsfilter-7.2.5 [ebuild R ] net-print/lprng-3.8.27-r1 apsfilter-setup successfully prints the test page, but when printing via lpr, lpq says "done" for the printjob, but nothing happens. I investigated a bit and found out that lprng had run apsfilter with /usr/etc/apsfilter/basedir/bin/apsfilter -Aroot@hostname+753 -CA -D2005-06-11-01:00:13.608 -Ff -Hhostname -Jtest.ps -Ntest.ps -Plp -Qlp -a/var/spool/lpd/lp/acct -b14419 -d/var/spool/lpd/lp -edfA753hostname -ftest.ps -hhostname -j753 -kcfA753hostname -l66 -nroot -sstatus -t2005-06-11-01:00:13.000 -w80 -x0 -y0 /var/spool/lpd/lp/acct and supplied the to be printed postscript file on stdin apsfilter when issued with these gives back /usr/etc/apsfilter/basedir/bin/apsfilter: line 1859: read: read error: 0: Is a directory Error: /undefined in untdictstack Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:1065/1417(ro)(G)-- --dict:0/20(G)-- --dict:69/200(L)-- --dict:85/200(L)-- Current allocation mode is local ESP Ghostscript 7.07.1: Unrecoverable error, exit code 1 while apsfilter itself gave back a success (0) return code though! this obviously is the cause for the loss of the print job without notice I found out apsfilter runs ghostscript itself with: /usr/bin/gs -q -dNOPAUSE -dSAFER -dPARANOIDSAFER -sstdout=%stderr -sDEVICE=lj4dith -sPAPERSIZE=a4 -r600x600 -sOutputFile=- - (and the postscriptfile again goes to stdin) however ghostscript run with those parameters and input manually runs successfully without error !!! I then wrote a wrapper script like this: /usr/bin/gs: #!/bin/sh echo gs $@ >>/tmp/error.log cat >/tmp/tmperror.log cat /tmp/tmperror.log | /usr/bin/gs.alt $@ where gs.alt is the normal gs ELF executeable and surprise !!!!! despite some debug information stored in temporary files, printing suddenly works successfully (even with lpr), however apsfilter still prints the following to stderr: /usr/etc/apsfilter/basedir/bin/apsfilter: line 1859: read: read error: 0: Ist ei n Verzeichnis fixps: error: the file seems not to be PostScript. I guess those errors occured before and just nobody noticed since printing itself works flawlessly - thus Im filing this bug to ghostscript, and not to apsfilter summary: ghostscript run by apsfilter crashes but ghostscript run manually with the same parameters and input, or run by a wrapper script which itself is run by apsfilter runs smoothly ! Any suggestions? Reproducible: Didn't try Steps to Reproduce: 1. setup a printer via lprng, apsfilter, ghostscript for use with ljet4 driver 2. print with lpr <file> Actual Results: lpq says "done" for the printjob, but nothing is sent to the printer Expected Results: print something out $ emerge info Portage 2.0.51.19 (default-linux/x86/2005.0/2.4, gcc-3.3.5-20050130, glibc-2.3.4 .20041102-r1, 2.4.28-gentoo-r8 i686) ================================================================= System uname: 2.4.28-gentoo-r8 i686 AMD Athlon(tm) Processor Gentoo Base System version 1.4.16 Python: dev-lang/python-2.2.3-r5,dev-lang/python-2.3.5 [2.3.5 (#1, May 2 2005, 14:04:34)] dev-lang/python: 2.2.3-r5, 2.3.5 sys-apps/sandbox: [Not Present] sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.5, 1.9.5, 1.8.5-r3, 1.7.9-r1, 1.6.3, 1.4_p6 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.16 virtual/os-headers: 2.4.19-r1, 2.4.22-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=athlon -O2 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/ 3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/t exmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/pla tex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks fixpackages sandbox sfperms str ict" GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http:// gentoo.oregonstate.edu/ http://distro.ibiblio.org/pub/Linux/distributions/gentoo " LANG="de_DE@euro" LC_ALL="de_DE@euro" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X aalib alsa apm avi berkdb bitmap-fonts bonobo cdparanoia cdr crypt cs cope curl dga dillo divx4linux doc dvd emboss encode evo extensions fam fbcon fl ac flash foomaticdb fortran gd gdbm gif gpm gtk gtk2 gtkhtml guile imagemagick i mlib java jpeg kde libg++ libwww live mad maildir mbox mikmod motif mozilla mp3 mpeg mysql ncurses network nls nvidia ogg oggvorbis opengl oss pam pdflib perl p ng python qt quicktime readline samba scanner sdl slang smime speex spell ssl sv ga tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts v4l vorbis xine xin erama xml xml2 xmms xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CBUILD, CTARGET, LDFLAGS, LINGUAS, PORTDIR_OVERLAY printcap: lp|lj4dith;r=600x600;q=medium;c=gray;p=a4;m=auto:\ :lp=/dev/lp0:\ :if=/usr/etc/apsfilter/basedir/bin/apsfilter:\ :sd=/var/spool/lpd/lp:\ :lf=/var/spool/lpd/lp/log:\ :af=/var/spool/lpd/lp/acct:\ :mx#0:\ :sh:
I did some more testing with the wrapper script: while this one runs without errors: #!/bin/sh cat >/tmp/tmperror.log cat /tmp/tmperror.log | /usr/bin/gs.alt $@ this one triggers the error: #!/bin/sh cat | /usr/bin/gs.alt $@ I have no idea how to debug this further - its like quantum theory - single electrons interfere behind the doublegap until you try to find out through which gap they went ...
what about apsfilter-7.2.6 / lprn-3.8.27-r2 / ghostscript-7.07.1-r9?
Can you please try with the following versions? apsfilter-7.2.6 / lprn-3.8.27-r2 / ghostscript-7.07.1-r9 Reopen if this bug still occurs for you.