Technical article 105828

lpstat -t and lpstat -o give "memory fault" message after info on Nth printer is displayed.

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4

Written · Last revised

Problem

I have several remote printers configured on my OpenServer 5.0.x system and am experiencing one or more of the following problems:

1. lpstat -t starts to list available printers, gets to a certain printer, then gives the message "memory fault" and returns the prompt.

2. lpstat -t starts to list available printers, gets to a certain printer, then gives the message "memory fault" and the system hangs.

3. lpstat -t starts to list available printers, gets to a certain printer, then gives the messages "memory fault" and "core dumped".

Similar behavior is seen with lpstat -o.

Cause

This could be caused by improper printer configuration, unrecognized
printer data being returned by non-UNIX printers, or corrupt lpd,
lpstat, or lp binaries. Follow the steps below to troubleshoot the
problem.

Solution

1. Does scoadmin list available printers correctly? Use scoadmin to list available printers: scoadmin -> printers -> printer manager. If the configured printers are not displayed correctly, remove and reinstall the printers incorrectly displayed.

2. Check the /usr/spool/lp/admins/lp/printers directory for entries that do not correspond to a printer you have configured. Remove these entries from the directory.

3. Check permissions on /etc/printcap (should be 644 owner:root group:sys), /usr/lib/lpd (should be 4711 owner:root group:bin), /usr/lpd/remote/lpstat (should be 6711 owner:root group:daemon). After updating these permissions and ownerships (which can also be done via software -> system -> verify), stop and start nfs and TCP/IP:

# nfs stop; tcp stop
# tcp start; nfs start

4. Run lpstat -t -l on each printer configured. In each set of output, check for a blank line under the line that starts with "Description:". If you see a blank line, do the following (see TA104681, "Lpstat -t gives memory fault/core dump; other options work for lpstat."):

# cd /usr/spool/lp/admins/lp/printers/printer_name
# vi comment (this is the description field)

Remove the extra line, and save the file. Do this for each printer where output showed the blank line.

5. Check the file named "configuration" that lives in each printer's directory: /usr/spool/lp/admins/lp/printers/printer_name. If the line beginning with the word "Device" is commented out, remove the comment, and save the file.

6. Check each line of the /etc/printcap file for extra characters or other discrepancies. If there are several, zero-out the file, remove all printers and reconfigure them one at a time, checking lpstat -t and the /etc/printcap file in between each one.

7. If you have Novell NetWare printers (or other non-UNIX printers)
configured, the "memory fault" error could be caused by these foreign
printers returning information that lpstat cannot interpret. To test
for this, remove all non-UNIX printers and test lpstat -t. If
successful, reinstall each non-UNIX printer one at a time, testing
lpstat -t after each one.

8. If the above solutions do not solve the problem, install Support Level Supplement (SLS) OSS449F, which has updated versions of lpstat, lpd, and lp.

See also

TA104681, "Lpstat -t gives memory fault/core dump; other options work for lpstat."

TA107704, "What is the SLS OSS449F Network Maintenance Supplement?"

From the Xinuos technical article database, record 105828. Reproduced with permission. The original is at www.sco.com/ta/105828, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.