This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 5540 - Print jobs goes to the queue and hangs.
Print jobs goes to the queue and hangs.
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: lpr (Show other bugs)
6.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
www.mayfieldj.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-10-04 19:45 EDT by jim
Modified: 2008-05-01 11:37 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-03-21 21:48:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description jim 1999-10-04 19:45:46 EDT
Verified as normal user and as root.  When printing,
regardless of whether from an application or from the
command line the first print job will print.  Subsequent
print jobs will go to the queue and stall.  Using lpc you
can see all print jobs in the queue, including the first
print job which was not removed from the queue after being
sent to the printer, but is now of zero length. Using lpc to
clean all will remove the zero length job and then you can
print another single job with the results being the same as
above.  Due to my low experience with Unix/Linux printing I
do not have enough knowledge to troubleshoot this problem.
Comment 1 Bill Nottingham 1999-10-05 12:05:59 EDT
Could you grab the latest lpr RPM from Raw Hide
(ftp://ftp.redhat.com/pub/rawhide/i386/) and see
if that works for you?
Comment 2 dirvine 1999-10-07 16:41:59 EDT
It seems this might be more system level than just lpr. Durring a
clean install, the installer does not notice printers connected to the
local machine (as it did in the RH 6.0 installer), nor does printtool
see any devices attached to lp0,lp1,lp2 (where in 6.0 it would for my
machine:Dell Dimension XPT P 3 500 mhz )
Comment 3 Bill Nottingham 1999-10-08 10:44:59 EDT
Oh, there are multiple issues here.

If local printing is broken on a new install,
add

alias parport_lowlevel parport_pc

to /etc/conf.modules. This should fix that part of it.

I've had a few reports of remote printing breaking, none of which
I can duplicate; that's why I'm trying to get feedback on whether
the lpr in Raw Hide fixes it for these people.
Comment 4 Bill Nottingham 1999-10-08 13:24:59 EDT
Actually, if you could test the lpr RPMs at
(ftp|http)://people.redhat.com/notting/lpr/
Comment 5 Bill Nottingham 1999-10-08 14:48:59 EDT
That should read 'if you could try these RPMs and let us
know if they work for you'. :)
Comment 6 Bill Nottingham 1999-10-17 23:19:59 EDT
should be fixed in the errata release. (0.43-2)
Comment 7 Jim Kingdon 1999-10-20 17:02:59 EDT
I have this problem too and upgrading to lpr-0.44-1 has not fixed
it.  Another workaround is:
$ rm /var/spool/lpd/lp/lock
$ /etc/rc.d/init.d/lpd restart


------- Additional Comments From   10/21/99 22:03 -------
Yes -- after upgrading to lpr-0.44-1, I have a similar problem.
The lpd is still running, but not responding (I am using
a remote printer). lpq says "warning: no daemon running", and has
a funny entry "0 bytes" at the end of the queue listing. Stopping
and restarting lpd fixes the problem. This only happened once,
though, and I don't know how to reproduce it.

------- Additional Comments From   10/27/99 18:20 -------
I have the same problems with RH6.1.  I haven't been able to get any
of the RPM packages to work, including lpr-0.46-1 and even backing off
to lpr-0.35-1 from RH6.0.  I have not tried installing the
rhs-printfilters and print-tools packages from RH6.0 in addition to
the lpr-0.35-1 RPM.  What is curious is that we have RH6.0 machines
that seem to function best with lpr-0.46-1, while installing
lpr-0.46-1 on my RH6.1 box still leaves lpr broken.

The symptom (with 0.46-1) is in trying to (remotely) print to an Intel
NetPort Express 10/100 print server going to a HP LaserJet 4050, I get
the familiar zero length jobs and hung jobs.
Comment 8 Bill Nottingham 1999-10-29 14:37:59 EDT
What are the contents of the files in the queue?
Comment 9 michael 1999-11-01 05:03:59 EST
Similar problems here. lp0 worked fine in previous installs,
When I try to print something, the light on the printer blinks a few
times, but nuffin prints. I've tried the EOF fix in the control panel,
but there was no dif. nor did 'cat file >/dev/lp0' do anything but
blink the light.
I've compiled lp0 into the kernel, but no joy there either. How do I
make similar settings to those suggested when it's a compiled-in
device (alias parport_lowlevel parport_pc)
Comment 10 Bill Nottingham 1999-11-01 11:54:59 EST
Hmm... what happens if you remove the old files from the queue
and restart lpd?
Comment 11 Bill Nottingham 1999-11-01 12:19:59 EST
Hmm... is there a child lpd process running? If so, what
does strace say it is doing?
Comment 12 kloeke 1999-11-03 22:17:59 EST
I hav run into the same problem. Printing was working fine until I
tried to print an email from netscape 4.61. It didn't work, and the
print job just sat in the queue. I restarted the printer daemon
(/etc/rc.d/init.d/lpd restart). Then I was told that there was no
printer daemon for lp so I started one (lpc start lp). Now the print
jobs go to the queue and sit there. Removing all the entries in
printcap and re-installing the printer gave no joy. There are two
daemon processes running. Strace on highest PID (child lpd) one gives:

rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
open("/dev/lp0", O_WRONLY)              = -1 EBUSY (Device or resource
busy
)
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_IGN}, 8) = 0
nanosleep({32, 0}, {32, 0})             = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
open("/dev/lp0", O_WRONLY)              = -1 EBUSY (Device or resource
busy

etc etc

strace on lower PID gives:

select(20, [4 5], NULL, NULL, NULL

and hangs...

The paraport alias is in /etc/conf.modules

Any ideas?
Comment 13 Bill Nottingham 1999-11-04 11:53:59 EST
Hmm... what does 'fuser /dev/lp0' say?
(and what program is the resulting pid, if there is one?)
Comment 14 Bernhard Rosenkraenzer 1999-11-28 08:27:59 EST
Does lpr 0.47 (current rawhide) fix this?
Comment 15 Scott Sharkey 1999-12-31 08:18:59 EST
This APPEARS to be a problem with the permissions
and ownership of the lock file in the spool directory.
The lpd daemon is running as "daemon", not root.
The lock file in /var/spool/lpd/lp is created
-rw-r--r-- and uid/gid root:root.  If you change
the lock file to -rw-rw-r-- and ownership to
root:daemon then it appears to be working (so far).

-Scott
Comment 16 michael 2000-01-10 17:47:59 EST
Hi. Not sure all these lp problems are the same thing:
One problem is hung jobs killing the queue. I've seen that on RH5.2
The other problem is printing not working, even though the light on the printer
blinks.
Help, I would like to print occasionally! What information or tests would you
like me to run so we can sus this out?

Michael
Comment 17 Greg Retkowski 2000-02-08 15:01:59 EST
We are experiencing the same problem here. We have ~25 Linux workstations, and
have had problems with about 5 of them with recurring printing problems. They
print over the network to a LaserJet 4050N with a JetDirect card.

The applications the users are running include Netscape communicator, Star
Office, and enscript. All systems are RH 6.1/i386

When they hang lpq shows a print job with a 0 byte size at the top of the queue.
Using lprm removes the line from the lpq output but appends a line at the bottom
that only says '0 Bytes' (other job info dissapears). lprm does not unhang the
print-queue.

Things that I've tried but do not work include: Upgrading to the latest lpr RPM
in the errata (lpr-0.48-1), changing the print driver (Generic Postscript / HP
Laserjet).

The temporary fix is to remove all zero length files in the queue directory
(find /var/spool/lpd/lp -size 0 -exec rm -f {} \;) and restart lpd
(/etc/rc.d/init.d/lpd restart). This fixes the problem temporaraly.

The problem appears to be intermittent, and I have had little sucess finding its
cause, however it appears to occur on the same 4-5 systems without affecting the
others (it could be that these are the users with the largest volume of print
jobs).

Hope this information helps...
Comment 18 henikoff 2000-02-24 20:37:59 EST
Only root can print on my 6.1 system, other users get the error:
lpr:Cannot create /var/spool/lpd/lp/.seq
I put general write on /var/spool/lpd/lp/, and then they get:
lpr:connect:Connection refused couldn't start daemon

I've run /etc/rc.d/init.d/lpd several times, changed the permissions on
the lock file to root:daemon; still only root can print. Once root does
print something, all the jobs queued by non-root users then print.
Everything worked find under 6.0.
Comment 19 henikoff 2000-02-24 21:26:59 EST
I was successful in getting lpr to work for non-root users as follows:
	1. installed lpr-0.50-3
	2. /etc/rc.d/init.d/lpd restart
	3. manually deleted everything from the print queue with lprm
So far so good (I have one printer attached to /dev/lp0)
Comment 20 jsk 2000-03-21 21:48:59 EST
Count me in on people having the same problem -- 0 byte files
appearing and hanging the queue.  This is with a stock RH 6.1
distribution.

We have an HP 40xx series printer with a network
card (that is, the printer has its own IP address).

My printcap entry is:

lp:\
        :sd=/var/spool/lpd/lp:\
        :mx#0:\
        :rm=rf:\
        :rp=raw:\
        :lp=:
Comment 21 Bernhard Rosenkraenzer 2000-07-17 11:14:12 EDT
This is fixed in rawhide with the move to LPRng.

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