Bug 2368 - lpd hangs if printer is turned off, and print jobs are pending
lpd hangs if printer is turned off, and print jobs are pending
Product: Red Hat Linux
Classification: Retired
Component: lpr (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Crutcher Dunnavant
: 2416 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 1999-04-26 07:25 EDT by pere
Modified: 2008-05-01 11:37 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 1999-08-27 16:03:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description pere 1999-04-26 07:25:29 EDT
Using RedHat 5.2 and lpr 0.33.

During reboot, and when ever lpd is started, lpd will hang
without collecting print jobs, if the following is true:

 - One of the network printers in /etc/printcap is turned
 - There is print jobs waiting to be sent to this printer

After reading thru the source, I discovered that lpd will
try to empty the queue before starting to receive new print
jobs.  If one of the printers is down, it will never make
contact with it, and lpd will hang forever.
Comment 1 Bill Nottingham 1999-05-24 16:22:59 EDT
*** Bug 2416 has been marked as a duplicate of this bug. ***

I have several systems running 5.2 RH Linux on an Intel
platform and it seems that the systems which have remote
printers configured on them have problems bringin the lpd
services back online after a shutdown.

I have noticed several articles on this while searching the
FAQs but there does not seem to be a solution for it.

Here is what I find when I reboot one of these systems if i
go out and look for all the lpd processes I find the
current process and the previous process still hanging out
there. If I go into the /var/spool/lpd/ directory and more
out the lpd.lock file it still contains the old PID from
the previous boot. If i remove this file and kill all the
lpd processes and remove any hung print jobs and then
restart the lpd process and run <lpc restart> on the
printers it seems to be fine. I have hacked the lpd script
in /etc/rc.d/init.d and have it removing the lpd.lock file
when the system is shutdown and have it doing an extra
killproc on all lpd processes when the system starts back
up and this seemed to work on one clien's system but only

I can be reached at 281-922-4222 ex 134 or email me at

Thank you for your time!
Comment 2 Tom Cross 1999-05-24 16:30:59 EDT
I had these exact problems until I upgraded to lpr-0.36 on
notting@redhat.com's web page.  I had trouble with lpr-0.36 running on
my RedHat 5.2 box, but it appears to work just fine in RedHat 6.0 with
Comment 3 Daniel Rogers 1999-07-30 20:01:59 EDT
Also, it attempts to contact the remote lpds before listening on its
port and socket.  This means that if two systems print to each other
and both reboot at the same time, neither lpd will come back up.
Comment 4 Preston Brown 1999-08-27 16:03:59 EDT
this has been resolved by lpd 0.36 and later.
Comment 5 M Glass 2001-04-27 10:47:49 EDT
This bug still exists/has resurface in the latest lpr-0.50-(4 to 7.6.x) package 
for RH 6.2.
The problem is that if a printer is down, the startup() procedure never returns 
because it is blocking on waitpid().  The child process never exits because it 
keeps getting a network error (host unreachable) that causes it to continually 
retry.  Thus the two listening sockets are not created, noone prints, etc...

Note You need to log in before you can comment on or make changes to this bug.