On Wed, Sep 02, 2009 at 11:11:39 -0600, Michael Burk wrote: > This was a good idea; I tried it with one modification: I determined > earlier that the failure happens without indexing also, so I added just the > line: > fcntl(datafd, F_GETFL, 0); > and that fixed the problem as well. So I guess this is truly the minimal > patch! >
I tried to understand the program flow for sendbackup.c and sendbackup_dump.c, and I agree with Dustin that it is "pretty crazy", but as far as I can tell the only place that would generate the message "index tee cannot write [" is from the following code found in the "start_index()" function in sendbackup.c: just_written = full_write(3, ptr, bytes_read); if (just_written < (size_t)bytes_read) { error(_("index tee cannot write [%s]"), strerror(errno)); /*NOTREACHED*/ } else { Tracing backwards from there, it appears that the file descriptor #3 in this chunck of code will point to the same file as the "datafd" referenced in the patch you have been trying only if client-side compression is not turned on. If it is turned on, it looks like fd #3 will instead point to the input side of the process that is doing the compression. So, if other avenues of research don't lead to a solution first, it might be interesting to try turning on client side compression (both with and without the one-line patch applied), to see if a similar error occurs in that case (and if so, whether the error is still in the index- tee-write operation or if the compression process complains instead). Also, when switched to your one-line patch (where you call fnctl() on "datafd" only), did you start getting the strange(?): sed: stdout: Resource temporarily unavailable messages in the log file again? Nathan ---------------------------------------------------------------------------- Nathan Stratton Treadway - natha...@ontko.com - Mid-Atlantic region Ray Ontko & Co. - Software consulting services - http://www.ontko.com/ GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt ID: 1023D/ECFB6239 Key fingerprint = 6AD8 485E 20B9 5C71 231C 0C32 15F3 ADCD ECFB 6239