On 3/1/02 4:01 PM, "dman" <[EMAIL PROTECTED]> wrote: > On Fri, Mar 01, 2002 at 01:42:00PM -0500, Michael Brown wrote: > | I've come across a problem in the spamc/spamass-milt combo when sending > large > | mail messages (>2MB in my case). > | > | From what I can see, the way spamc works is that a message is passed to it > on > | stdin, then stdin is closed. After stdin is closed, spamc sends it > | to spamd for processing. > | > | It looks like spamc starts to send back the (unprocessed, yes I know. I got > | the size limitation part) message before stdin is closed, and data is still > | coming in on stdin. This leads to a deadlock when the pipes are full - both > | spamc and its parent are blocking on their write() calls. > > If it is a deadlock then it is both their fault. The reason is that > they are both waiting for each other. If one gives up the "fight" > (and releases whatever resource is being watied for) then the other > will stop waiting and make progress.
I don't understand the source of the problem. Is there a limit on the "pipe size" that I wasn't aware of? In that case, you could solve the problem by introducing an intermediary buffer using buffer(1) or mbuffer(1) or something. I don't really see how spamc could avoid this without creating the buffer itself. It's actually doing quite well by interleaving reads and writes. The fact that the milter isn't reading until it's completely done writing doesn't seem like spamc's fault. C _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk