On Fri, Mar 01, 2002 at 06:53:05PM -0800, Craig Hughes wrote: | 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?
Yeah. To demonstrate, make a GUI app that spews lots of text on stdout. Then run it, but pipe stdout to 'less'. After a while (if you don't scroll in less) the gui will stop responding. When you scroll down in less (and read more out of the pipe) the gui will respond again. Been there, done that. ("print" is the best debugger, ya know ;-)) | 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. I don't have those manpages, and I don't think spamc should be creating arbitrarily large buffers. Keep system resource usage at a (reasonable) minimum by moving the data sooner rather than using a "store-and-forward" technique. | 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. I don't use sendmail or milter. If milter is simply not reading anything until it is done writing, then I agree that the fault is there. -D -- Dishonest money dwindles away, but he who gathers money little by little makes it grow. Proverbs 13:11 _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk