Subject: smtp busylooping

From: Eugene Crosser <[email-masked]>
Date: 16 Jul 2002 15:31:52 +0400

Every now and then, I get a few smtp agents busylooping.  System is
Linux, source is couple months' old CVS:

_sfexcept (f=0x8086a40, type=2, io=-1, disc=0xbfff9c38)
    at /usr/local/src/zmailer/zmailer/sfio/src/lib/sfio/sfexcept.c:78
78                      return SF_ECONT;
(gdb) l
73
74              if(errno == EINTR)
75              {       /* if just an interrupt, we can continue */
76                      errno = 0;
77                      f->flags &= ~(SF_EOF|SF_ERROR);
78                      return SF_ECONT;
79              }
80
81      chk_stack:
82              if(local && f->push &&
(gdb) bt
#0  _sfexcept (f=0x8086a40, type=2, io=-1, disc=0xbfff9c38)
    at /usr/local/src/zmailer/zmailer/sfio/src/lib/sfio/sfexcept.c:78
#1  0x80668cb in sfwr (f=0x8086a40, buf=0x8099000, n=345,
disc=0xbfff9c38)
    at /usr/local/src/zmailer/zmailer/sfio/src/lib/sfio/sfwr.c:209
#2  0x805f21a in _sfflsbuf (f=0x8086a40, c=-1)
    at /usr/local/src/zmailer/zmailer/sfio/src/lib/sfio/sfflsbuf.c:72
#3  0x8061a5f in sfsync (f=0x8086a40)
    at /usr/local/src/zmailer/zmailer/sfio/src/lib/sfio/sfsync.c:100
#4  0x80526a6 in smtpwrite (SS=0xbfff93f8, saverpt=1, strbuf=0x806aa54
".",
    pipelining=0, syncrp=0x0)
    at /usr/local/src/zmailer/zmailer/transports/smtp/smtp.c:4157
#5  0x804e501 in deliver (SS=0xbfff93f8, dp=0x8082140,
startrp=0x8097c30,
    endrp=0x0) at
/usr/local/src/zmailer/zmailer/transports/smtp/smtp.c:1780
#6  0x804cc34 in process (SS=0xbfff93f8, dp=0x8082140, smtpstatus=0,
    host=0x8086ba0 "vesta.ru", noMX=0)
    at /usr/local/src/zmailer/zmailer/transports/smtp/smtp.c:957
#7  0x804c984 in main (argc=5, argv=0xbffffed4)
    at /usr/local/src/zmailer/zmailer/transports/smtp/smtp.c:860
#8  0x401bf2eb in __libc_start_main (main=0x804b80c <main>, argc=5,
    ubp_av=0xbffffed4, init=0x804a614 <_init>, fini=0x8069a9c <_fini>,
    rtld_fini=0x4000c130 <_dl_fini>, stack_end=0xbffffecc)
    at ../sysdeps/generic/libc-start.c:129

-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to [email-masked]

---

From: Matti Aarnio <[email-masked]>
Date: Tue, 16 Jul 2002 15:03:45 +0300

> Linux, source is couple months' old CVS:

  This might be related:

2002-06-18  Matti Aarnio  <[email-masked]>
	* transports/smtp/smtp.c:
	    Fix the call parameters to "select_sleep()" so that there
	    is explicite knowledge of when the select is for writing,
	    and when it is for reading.

  But   strace   run at a busy-looping SMTP-TA could reveal a bit more
  data for me.

-- 
/Matti Aarnio	<[email-masked]>
-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to [email-masked]

---

From: Eugene Crosser <[email-masked]>
Date: 16 Jul 2002 16:11:38 +0400

> 	    and when it is for reading.

I'll check when I have an opportunity to upgrade the production system.

>   But   strace   run at a busy-looping SMTP-TA could reveal a bit more

read(-1, 0xbfff610c, 512)               = -1 EBADF (Bad file descriptor)
time([1026821312])                      = 1026821312
select(2, [], [1], NULL, {0, 0})        = 1 (out [1], left {0, 0})
read(-1, 0xbfff610c, 512)               = -1 EBADF (Bad file descriptor)
time([1026821312])                      = 1026821312
select(2, [], [1], NULL, {0, 0})        = 1 (out [1], left {0, 0})
read(-1, 0xbfff610c, 512)               = -1 EBADF (Bad file descriptor)
time([1026821312])                      = 1026821312
select(2, [], [1], NULL, {0, 0})        = 1 (out [1], left {0, 0})
read(-1, 0xbfff610c, 512)               = -1 EBADF (Bad file descriptor)
...

Eugene

-