[prev in list] [next in list] [prev in thread] [next in thread]
List: lprng
Subject: Re: LPRng: lengthy delay between one job finishing and another one starting
From: Patrick Powell <papowell () astart ! com>
Date: 2003-12-18 1:01:54
[Download RAW message or body]
> From lprng@www.lprng.com Mon Dec 15 03:36:49 2003
> Date: Mon, 15 Dec 2003 10:46:45 +0000 (GMT)
> From: Toby Blake <toby@inf.ed.ac.uk>
> To: lprng@lprng.com
> Subject: Re: LPRng: lengthy delay between one job finishing and another one
> starting
>
> > If you are using your own filters, then make sure you close
> > the STDOUT/STDIN, etc., and make sure you exit.
>
> I'm almost 100% certain that the problem is *not* related to our
> filters. As you can see below, the psif filter happily finishes at
> 15:27:59, however there is a further delay of 7 minutes while lpd is
> waiting for the subserver to exit:
>
> IF filter 'psif' filter finished at 2003-12-09-15:27:59.884 ## A=user@host+602 \
> number=602 process=23168 printing finished at 2003-12-09-15:27:59.884 ## \
> A=user@host+602 number=602 process=23168 accounting at end at \
> 2003-12-09-15:27:59.910 ## A=user@host+602 number=602 process=23168 finished \
> 'user@host+602', status 'JSUCC' at 2003-12-09-15:27:59.910 ## A=user@host+602 \
> number=602 process=23168 waiting for subserver to exit at 2003-12-09-15:34:58.800 \
> ## A=<NULL> number=0 process=23164 subserver pid 23168 exit status 'JSUCC' at \
> 2003-12-09-15:34:58.800 ## A=<NULL> number=0 process=23164
> Note that these subserver lpd processes appear in output from top as
> 'defunct' and won't be killed even by a kill -9 but are killed somehow
> after the delay above.
>
> I also only seem to see this problem when there are a lot of jobs in
> the queue - in this case, in excess of 40 on one printer and 20+ on
> another printer, both served by this server - as the queue sizes go
> down, the delay goes down too. Can the size of the queue be affecting
> this?
>
> Toby
These processes are 'zombies' waiting for the main LPD process to
harvest (wait) for them. The LPD code is waiting in a select
loop for either a process to exit or for a connection.
Setup_waitpid_break();
errno = 0;
fd_available = select( max_socks,
FD_SET_FIX((fd_set *))&readfds,
FD_SET_FIX((fd_set *))0,
FD_SET_FIX((fd_set *))0, timeout );
err = errno;
Setup_waitpid();
plp_signal_t sigchld_handler (int signo)
{
signal( SIGCHLD, SIG_DFL );
write(Lpd_request,"\n", 1);
}
void Setup_waitpid (void)
{
signal( SIGCHLD, SIG_DFL );
}
void Setup_waitpid_break (void)
{
(void) plp_signal_break(SIGCHLD, sigchld_handler);
}
So under load, the LPD server will probably wait in the select for
a while.
Patrick
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to majordomo@lprng.com (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to majordomo@lprng.com
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest myname@host.org
unsubscribe LIST <mailaddr> | unsubscribe lprng myname@host.org
If you have major problems, send email to papowell@astart.com with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic