[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bus error in ps2pdf




I now have access to a Debian Sparc box, and I can reproduce the problem. The crash happens in the pthreads library, and I find it confusing that this should happen on Linux/Sparc, but no other platforms (that I'm aware of). Looking at the code, there's nothing immediately obvious, unless there is a bug packing unions into structs, causing a pointer alignment problem. Actually, that does seem to be the problem: the second union does not sit on a 64 bit aligned boundary.

Anyway, in the short term, the solution is to disable threading in Ghostscript (it's rarely used, and only if the caller actually asks for it). To do so, change the definition in the Makefile after configure (or in Makefile.in) of the SYNC setting. By default it is:
SYNC=posync

and changing it to:

SYNC=nosync

will disable threading.

And Ghostscript should run as expected.

I intend to add a "nosync" option to configure for the next release, and I will obviously investigate solving the alignment problem.

HTH,

Chris



Quoting Jonathan Nieder <jrnieder@gmail.com>:

Hi,

Stéphane Glondu wrote:

ocaml-melt currently FTBFS on sparc [1] because of a bus error
provoked by ps2pdf. The bus error is easily reproduced by running
ps2pdf on the file available at [2]. This bug is not present with the
previous version, 8.71~dfsg2-10.

Thanks for reporting it.  If anyone has time on a sparc, what might be
useful is

	apt-get build-dep ghostscript

	git clone git://git.ghostscript.com/ghostscript.git
	cd ghostscript/gs
	# configure to minimize features (hopefully speeding up build)
	./autogen.sh -C \
		--disable-fontconfig \
		--disable-freetype --disable-cups --disable-gtk \
		--enable-dynamic --with-system-libtiff \
		--without-ijs --without-jbig2dec --without-jasper
	make

	# [2]
	lib/ps2pdfwr /path/to/doc.ps

	git show -s HEAD

If that reproduces the error, it could be reported at
http://bugs.ghostscript.com and I'd be glad to hear about it.

	git bisect start
	git bisect bad HEAD
	git bisect good ghostscript-8.71

can guide through the bisection process afterwards to find the bad
patch (which is hopefully an underalignment problem or similar).

Any takers?
Jonathan

[1] https://buildd.debian.org/fetch.cgi?pkg=ocaml-melt&arch=sparc&ver=1.3.0-2&stamp=1297644449&file=log&as=raw
[2] http://glondu.net/tmp/doc.ps


--
To UNSUBSCRIBE, email to debian-sparc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: [🔎] 20110216115527.GA5516@elie">http://lists.debian.org/[🔎] 20110216115527.GA5516@elie




Reply to: