Bug 691707 - ghostscript-gpl : segmentation fault at any launch
Summary: ghostscript-gpl : segmentation fault at any launch
Status: RESOLVED INVALID
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Build Process (show other bugs)
Version: 0.00
Hardware: PC Linux
: P4 normal
Assignee: Chris Liddell (chrisl)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-22 12:54 UTC by Andrei
Modified: 2011-09-13 10:53 UTC (History)
3 users (show)

See Also:
Customer:
Word Size: ---


Attachments
strace gs (15.05 KB, application/octet-stream)
2010-10-22 12:54 UTC, Andrei
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei 2010-10-22 12:54:29 UTC
Created attachment 6819 [details]
strace gs

All my printers stopped working suddenly. I watched logs
dmesg:
gs[18910]: segfault at 1008 ip 0810b477 sp bfc16
/var/log/cups/error_log:
E [13/Oct/2010:10:38:19 +0400] PID 18910 (/usr/libexec/cups/filter/pstoraster)
crashed on signal 11!
--SKIP--
D [13/Oct/2010:21:50:22 +0400] [Job 635] Set job-printer-state-message to
"SpliX Cannot open job", current level=ERROR
--SKIP--
D [13/Oct/2010:21:50:22 +0400] [Job 635] printer-state-message="SpliX Error
while rendering the request. Check the previous message"

I've tried this versions of software
cups-1.4.4-r2, cups-1.3.11-r2
ghostscript-gpl 8.71 and 9.00
spix-2.0.0
gutenprint-5.2.5-r1

If I try to run gs fron console, it segfauts all times except I run it with
--help option
I can't connect this bug to any software update

I use Gentoo linux
Portage 2.1.9.16 (selinux/v2refpolicy/x86/hardened, gcc-4.4.4, glibc-2.12.1-r1,
2.6.32-hardened-r1 i686)
Comment 1 Ray Johnston 2010-10-22 15:51:20 UTC
Please provide a command line that fails with 9.00, and a test input file used
with the command line.
Comment 2 Andrei 2010-10-23 15:27:11 UTC
It fails with any command line
$ gs
Segmentation fault
$ pdf2ps file.pdf file.ps # doesn't depend on file. Only segfaults
Segmentation fault

It just segfaults with any file and with any command line, except `gs --help`

But 
$ gsx file.pdf 
works ok
Comment 3 Chris Liddell (chrisl) 2010-10-23 16:25:36 UTC
I'll assume you are using the Gentoo Ghostscript package, rather than the Ghostscript sources distributed by us?

If so, can I suggest you download the source directly from our site:
http://ghostscript.com/releases/

Build that, and try it exactly as we ship it. If it still shows the problem, we'll work with you to get the information we need to reproduce and fix the issue.

If a build of Ghostscript from our distribution doesn't fail, that would suggest it's a issue with the Gentoo packaging, and you'll need to report it to the Gentoo maintainers.

Thanks.
Comment 4 Andrei 2010-10-27 14:10:12 UTC
The problem is solved _for me_ by downgrading some packages.

>If so, can I suggest you download the source directly from our site:
>http://ghostscript.com/releases/
I can't build it :)

node 'Resource/Init/opdfread.ps' len=142772 9 blocks, compressed size=36608
node 'Resource/Init/pdf_cslayer.ps' len=4058 1 blocks, compressed size=1396
Total %rom% structure size is 7893864 bytes.
gcc  -DHAVE_MKSTEMP -DHAVE_HYPOT -DHAVE_FILE64 -DHAVE_MKSTEMP64 -DHAVE_FONTCONFIG  -DHAVE_SETLOCALE -O2 -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement -fno-builtin -fno-common -DHAVE_STDINT_H -DGX_COLOR_INDEX_TYPE="unsigned long long"  -DUSE_LIBPAPER  -I./obj -I./base  -o ./obj/gsromfs1.o -c ./obj/gsromfs1.c
./obj/echogs -w ./obj/ldt.tr -n - gcc  -o ./bin/gs
./obj/echogs -a ./obj/ldt.tr -n -s ./obj/gsromfs1.o ./obj/gs.o -s
cat ./obj/ld.tr >>./obj/ldt.tr
./obj/echogs -a ./obj/ldt.tr -s - -ldl -lm  -lpaper -rdynamic -ldl -lfontconfig   -lpthread -lm
if [ x != x ]; then LD_RUN_PATH=; export LD_RUN_PATH; fi; \
	XCFLAGS= XINCLUDE= XLDFLAGS= XLIBDIRS= XLIBS= \
	FEATURE_DEVS= DEVICE_DEVS= DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3= \
	DEVICE_DEVS4= DEVICE_DEVS5= DEVICE_DEVS6= DEVICE_DEVS7= DEVICE_DEVS8= \
	DEVICE_DEVS9= DEVICE_DEVS10= DEVICE_DEVS11= DEVICE_DEVS12= \
	DEVICE_DEVS13= DEVICE_DEVS14= DEVICE_DEVS15= DEVICE_DEVS16= \
	DEVICE_DEVS17= DEVICE_DEVS18= DEVICE_DEVS19= DEVICE_DEVS20= \
	DEVICE_DEVS_EXTRA= \
	/bin/sh <./obj/ldt.tr
./obj/tif_jbig.o: In function `JBIGEncode':
tif_jbig.c:(.text+0x36d): undefined reference to `jbg_enc_init'
tif_jbig.c:(.text+0x375): undefined reference to `jbg_enc_out'
tif_jbig.c:(.text+0x37d): undefined reference to `jbg_enc_free'
./obj/tif_jbig.o: In function `JBIGDecode':
tif_jbig.c:(.text+0x5f6): undefined reference to `jbg_dec_init'
tif_jbig.c:(.text+0x60e): undefined reference to `jbg_newlen'
tif_jbig.c:(.text+0x632): undefined reference to `jbg_dec_in'
tif_jbig.c:(.text+0x648): undefined reference to `jbg_dec_getimage'
tif_jbig.c:(.text+0x652): undefined reference to `jbg_dec_getsize'
tif_jbig.c:(.text+0x670): undefined reference to `jbg_dec_free'
tif_jbig.c:(.text+0x694): undefined reference to `jbg_strerror'
collect2: выполнение ld завершилось с кодом возврата 1
make: *** [bin/gs] Ошибка 1
Comment 5 Chris Liddell (chrisl) 2010-10-27 16:39:39 UTC
Well, it's good that you worked around the problem, but obviously it's worrying that you could not build the package directly from us.

Could you let us know what packages you downgraded to get it work?

And could you tell us what (if any) steps you took to try to build GS from our archive (like configure options, or whatever)?

Thanks.
Comment 6 Andrei 2010-10-28 16:09:49 UTC
I just downgraded this packages (versions I have now)
app-text/ghostscript-gpl-8.71-r4
app-text/libpaper-1.1.23  (app-text/libpaper)
media-libs/fontconfig-2.8.0  (media-libs/fontconfig)
media-libs/jpeg-8b  (>=media-libs/jpeg-6b)
media-libs/libpng-1.4.3  (>=media-libs/libpng-1.2.42)
media-libs/tiff-3.9.4  (>=media-libs/tiff-3.9.2)
sys-libs/zlib-1.2.3-r1  (>=sys-libs/zlib-1.2.3)
app-text/djvu-3.5.22-r1  (app-text/djvu)
x11-libs/cairo-1.8.10  (>=x11-libs/cairo-1.2.0)
net-print/cups-1.3.11-r2  (>=net-print/cups-1.3.8)
x11-libs/gtk+-2.20.1-r1  (>=x11-libs/gtk+-2.0)
sys-devel/automake-1.10.3  (=sys-devel/automake-1.10*)
media-fonts/urw-fonts-2.4.9  (>=media-fonts/urw-fonts-2.4.9)
Comment 7 Hin-Tak Leung 2010-11-01 21:30:22 UTC
(In reply to comment #6)
> I just downgraded this packages (versions I have now)
> app-text/ghostscript-gpl-8.71-r4
> app-text/libpaper-1.1.23  (app-text/libpaper)
> media-libs/fontconfig-2.8.0  (media-libs/fontconfig)
> media-libs/jpeg-8b  (>=media-libs/jpeg-6b)
> media-libs/libpng-1.4.3  (>=media-libs/libpng-1.2.42)
> media-libs/tiff-3.9.4  (>=media-libs/tiff-3.9.2)
> sys-libs/zlib-1.2.3-r1  (>=sys-libs/zlib-1.2.3)
> app-text/djvu-3.5.22-r1  (app-text/djvu)
> x11-libs/cairo-1.8.10  (>=x11-libs/cairo-1.2.0)
> net-print/cups-1.3.11-r2  (>=net-print/cups-1.3.8)
> x11-libs/gtk+-2.20.1-r1  (>=x11-libs/gtk+-2.0)
> sys-devel/automake-1.10.3  (=sys-devel/automake-1.10*)
> media-fonts/urw-fonts-2.4.9  (>=media-fonts/urw-fonts-2.4.9)

There are at least two incompatibities with gs 8.71. see Bug 691475 for jpeg 8b, and Bug 691111 for libpng 1.4.x .
Comment 8 Chris Liddell (chrisl) 2010-11-17 09:05:23 UTC
This is obviously more of a build related problem, so reassigning to me.
Comment 9 Chris Liddell (chrisl) 2011-09-13 10:53:59 UTC
I believe Gentoo now has working packages of the latest Ghostscript release.