* [9fans] Weird timeout thing in smtpd? @ 2004-11-16 2:07 Dan Cross 2004-11-16 2:15 ` Russ Cox 0 siblings, 1 reply; 7+ messages in thread From: Dan Cross @ 2004-11-16 2:07 UTC (permalink / raw) To: 9fans Is anyone else using upas/smtpd to send mail from a `normal' [sic] client like the Apple Mail.app program? I get weird timeout's sending email with an error message of `(null)' and then my recipients get duplicates. I'm trying to understand why, as it's starting to get annoying for them. - Dan C. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] Weird timeout thing in smtpd? 2004-11-16 2:07 [9fans] Weird timeout thing in smtpd? Dan Cross @ 2004-11-16 2:15 ` Russ Cox 2004-11-16 2:35 ` Dan Cross 0 siblings, 1 reply; 7+ messages in thread From: Russ Cox @ 2004-11-16 2:15 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs > Is anyone else using upas/smtpd to send mail from a `normal' [sic] client > like the Apple Mail.app program? I get weird timeout's sending email with > an error message of `(null)' and then my recipients get duplicates. I'm > trying to understand why, as it's starting to get annoying for them. is your client connecting from a trusted ip address? if not, it's subject to /mail/lib/validatesender, which may be taking too long for your client. russ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] Weird timeout thing in smtpd? 2004-11-16 2:15 ` Russ Cox @ 2004-11-16 2:35 ` Dan Cross 2004-11-16 4:44 ` Dan Cross 0 siblings, 1 reply; 7+ messages in thread From: Dan Cross @ 2004-11-16 2:35 UTC (permalink / raw) To: Russ Cox, Fans of the OS Plan 9 from Bell Labs Russ Cox <russcox@gmail.com> writes: > is your client connecting from a trusted ip address? > if not, it's subject to /mail/lib/validatesender, which > may be taking too long for your client. Maybe that's it. I'm connected from whatever IP address my DSL provider gives me, which is certainly not trusted in any way that I know about. However, I'm authenticating to the server, which I thought would turn off such things. - Dan C. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] Weird timeout thing in smtpd? 2004-11-16 2:35 ` Dan Cross @ 2004-11-16 4:44 ` Dan Cross 2004-11-16 5:56 ` Dan Cross 0 siblings, 1 reply; 7+ messages in thread From: Dan Cross @ 2004-11-16 4:44 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs Dan Cross <cross@math.psu.edu> writes: > > Russ Cox <russcox@gmail.com> writes: > > is your client connecting from a trusted ip address? > > if not, it's subject to /mail/lib/validatesender, which > > may be taking too long for your client. > > Maybe that's it. I'm connected from whatever IP address my DSL > provider gives me, which is certainly not trusted in any way that I > know about. However, I'm authenticating to the server, which I thought > would turn off such things. Hmm, a little more digging shows that it's hanging on reading the output of /bin/upas/send in data() in smtpd.c. I worked around that by only reading send's stderr output if status is non-zero. Moving beyond that, it seems to hang forever in proc_wait(), which is sort of strange. That would be, I think, waiting for send's exit status. This is a bit complex for me as I'm debugging this over SSH using ed, so the more productivly enhancing tools are unavailable at the moment. - Dan C. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] Weird timeout thing in smtpd? 2004-11-16 4:44 ` Dan Cross @ 2004-11-16 5:56 ` Dan Cross 2004-11-16 12:31 ` Russ Cox 0 siblings, 1 reply; 7+ messages in thread From: Dan Cross @ 2004-11-16 5:56 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs Dan Cross <cross@math.psu.edu> writes: > Hmm, a little more digging shows that it's hanging on reading the > output of /bin/upas/send in data() in smtpd.c. I worked around that by > only reading send's stderr output if status is non-zero. Moving > beyond that, it seems to hang forever in proc_wait(), which is sort > of strange. That would be, I think, waiting for send's exit status. > This is a bit complex for me as I'm debugging this over SSH using > ed, so the more productivly enhancing tools are unavailable at the > moment. Well, this is starting to make some sense. Send is taking a *really* long time to do anything. I think what's happening is that send is running so long that the client times out and spits out an error message and resolves to retry later. However, on the server side, send is still running, and eventually the mail gets delivered. At some point, the client retries sending the mail, and send works very quickly at that point, so the client is happy but a duplicate message gets sent. So, the question is: what would cause send to take a *really* long time? I mean, on the order of seconds.... And, more to the point, how can I fix that? - Dan C. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] Weird timeout thing in smtpd? 2004-11-16 5:56 ` Dan Cross @ 2004-11-16 12:31 ` Russ Cox 2004-11-16 21:09 ` Dan Cross 0 siblings, 1 reply; 7+ messages in thread From: Russ Cox @ 2004-11-16 12:31 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs > So, the question is: what would cause send to take a *really* long > time? I mean, on the order of seconds.... And, more to the point, > how can I fix that? run send by hand and then run acid on it and look around. ;-) ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] Weird timeout thing in smtpd? 2004-11-16 12:31 ` Russ Cox @ 2004-11-16 21:09 ` Dan Cross 0 siblings, 0 replies; 7+ messages in thread From: Dan Cross @ 2004-11-16 21:09 UTC (permalink / raw) To: Russ Cox, Fans of the OS Plan 9 from Bell Labs Russ Cox <russcox@gmail.com> writes: > > > So, the question is: what would cause send to take a *really* long > > time? I mean, on the order of seconds.... And, more to the point, > > how can I fix that? > > run send by hand and then run acid on it and look around. ;-) Following Russ's suggestion, we discovered that send was hanging out waiting for /mail/lib/qmail to finish, which was in turn waiting on runq. On systems with backlogged mail, runq can take a long time to complete. Running runq in the background makes the problem go away. The fix is now on sources. - Dan C. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-11-16 21:09 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-11-16 2:07 [9fans] Weird timeout thing in smtpd? Dan Cross 2004-11-16 2:15 ` Russ Cox 2004-11-16 2:35 ` Dan Cross 2004-11-16 4:44 ` Dan Cross 2004-11-16 5:56 ` Dan Cross 2004-11-16 12:31 ` Russ Cox 2004-11-16 21:09 ` Dan Cross
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).