DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 31st January 2013
mjcross mjcross is offline
New User
 
Join Date: Jan 2013
Posts: 8
Default ghostscript segfaulting

I've been researching today what appears to be the same issue.

I'm using OpenBSD 5.2 release, generic bsd.mp, no patches - plus unmodified release versions of cups, ghostscript-a4-gtk, splix and gstoraster.

Everything was very enigmatic until I decided to run the individual parts of the filter pipeline manually (annoyingly the forum rules mean i cant post urls yet) as per aitch tee tee pee dot fedoraproject.org/wiki/How_to_debug_printing_problems#Running_filters_by_ hand. You can work out the filter pipeline by studying /usr/local/share/cups/mime/mime.conv as per aitch tee tee pee ess discussions.apple.com/thread/2611692?start=0&tstart=0 and you can work out the rasteriser by studying the PPD file for your printer in /etc/cups/ppd.

For a plain text file the pipeline is texttops | pstops | pstoqpdl.

The first two filters run fine (you can view the intermediate results with gs - remember to set the paper size: -sPAPERSIZE=a4 if that's what you're using).

But calling pstoqpdl causes ghostscript to segfault and core dump. Even more interestingly, so does pstoraster (aliased to gstoraster on the release build) - that's significant because gstoraster is nothing to do with splix.

If you google "gstoraster segfault" you will find many links that make it clear this is a problem with the cups raster driver in older versus of ghostscript.

I note that current has an updated version of gs, but I'm not ready to try that yet.

Good luck MC

PS: the correct way to start and stop cups on a modern OBSD system is to do sudo /etc/rc.d/cupsd start (or stop). That will automatically take are of the ulpt ownership things that need to be done :-)
Reply With Quote
  #2   (View Single Post)  
Old 31st January 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Your shell's resource limits might be below what ghostscript requires. The default class limits are set very conservatively. The staff class limits are higher, and both the default and staff class limits vary by architecture. The daemon class removes datasize and maxproc limitations:
Code:
daemon:\
    :ignorenologin:\
    :datasize=infinity:\
    :maxproc=infinity:\
    :openfiles-cur=128:\
    :stacksize-cur=8M:\ ...
See your /etc/login.conf and the login.conf(5) man page

Last edited by jggimi; 31st January 2013 at 06:17 PM. Reason: added man page reference
Reply With Quote
  #3   (View Single Post)  
Old 1st February 2013
mjcross mjcross is offline
New User
 
Join Date: Jan 2013
Posts: 8
Default

Hmm - thanks for the suggestion; I'll have a look at that. But as per the OP I also get the ghostscript segfault when the filters are being run by CUPS, which is (I presume) running as class daemon - so I'm not so sure.

Next step for me will be to transplant some patches to ghostscript 9.05 I think, probably the ones that Til Kampeter has done for Ubuntu.
Reply With Quote
  #4   (View Single Post)  
Old 1st February 2013
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Welcome, mjcross!

Your inquiry has been separated from its parent thread because the direction of your questions were different from the original poster.

We find that most members of this site extensively use the archives for mining information. As such, we attempt to keep threads limited to a single topic as directed by the original poster. This is covered in the forum rules.
Reply With Quote
  #5   (View Single Post)  
Old 1st February 2013
mjcross mjcross is offline
New User
 
Join Date: Jan 2013
Posts: 8
Default

actually my post was on the original topic, but maybe that wasn't clear
Reply With Quote
  #6   (View Single Post)  
Old 1st February 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Quote:
Originally Posted by mjcross View Post
...I also get the ghostscript segfault when the filters are being run by CUPS, which is (I presume) running as class daemon...
Yes, the _cups userid is in class daemon. So resource limits are apparently not the root cause.
Reply With Quote
  #7   (View Single Post)  
Old 3rd February 2013
mjcross mjcross is offline
New User
 
Join Date: Jan 2013
Posts: 8
Default

Still hacking at this one. Built a clean system from current (snapshot 22jan13) which has ghostscript at 9.06p0, splix at 2.0.0p7 and cups at 1.6.1p5.

Now gs no longer segfaults, but gstoraster is still being obstinate. When I run it manually on the output from pdftops it shows some sensible debug information and tells me the command line with which it's invoking gs, but then hangs perpetually and there's a zombie gs state in the process table.

Digging into the gstoraster.c now but suspect that gs is terminating abnormally in some new and exciting way.
Reply With Quote
  #8   (View Single Post)  
Old 16th April 2013
mjcross mjcross is offline
New User
 
Join Date: Jan 2013
Posts: 8
Default

solved: this was an error in the ghostscript build options (fixed in OpenBSD current)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ImageMagick 6.3.6.10 on OpenBSD 4.3 ... ghostscript and fonts... superslot OpenBSD Packages and Ports 9 28th July 2008 09:36 AM


All times are GMT. The time now is 05:02 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick