[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

premature #hungry message


	The problem I described in the previous message actually
turned out to be premature #hungry diagnostic from smtp client.
Imagine a thread for cerain host has been run and connection timed
out. You've got diagnostic with retryat delay set. Imagine now that
before that delay is due the thread being awoke again (lets say
by ETRN or very short retry interval) In smtp.c:

<           if (host && strcasecmp(host,s)==0) {
<             extern time_t retryat_time;
<             if (now < retryat_time) {
<               /* Same host, we don't touch on it for a while.. */
<               sleep(2);
<               if (logfp && verbosity > 1) {
<                 fprintf(logfp,"%s#\t(too soon trying to touch on host with 'retryat' diagnostic -- flushing job queue..host='%s')\n",logtag(),host);
<               }
<               continue;
<             }
<           }

	This code would just skip the host and issue another #hungry
diagnostic immediately. Thus proc->overfed will be decreased and the
process will be marked idle. On other hand it is not update()ed, but
the thread is already idled. With the following doagenda() it will
be thread_start()ed again.

	What I have done by now is removed the lines above from
smtp.c -- anyhow it is business of scheduler to decide when to
restart delivery to any particular destination. But, well, I think
we should have safeguard in pick_next_vertex() for this as well.
	 	Don't question why she needs to be so free...