Overview
| Artifact ID: | 7945c4b68e3693037ecb884b7a0f05a418bce794 |
|---|---|
| Ticket: | 780533ffffffffffffffffffffffffffffffffff
[fcopy] callback sometimes fails to trigger |
| User & Date: | msofer on 2003-07-30 21:45:03 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
Assigned to dgp for review, as it might have something to do with [Bug 218203]). What I see is: let $s be a socket, $f a normal file, $nBytes a "large" number (8kB or above seems to trigger the error with good probability), both channels with "-translation binary". Then the trouble is that fcopy $s $f -size $nBytes -command myCallback often fails to notice that $nBytes *were* already written to $f, and hence never calls myCallback. It might be an off-by-one heisenbug: as I said, it happens often but not always - and it seems never to happen if one more byte than promised comes through the socket. I attached here a script that produces the error with good probability; uncommenting line 72 does the "one more byte" trick. The script attached below produces the following results on RH7.2 (relevant??): [mig@mini test2]$ /CVS/tcl_SF_clean/unix/tclsh test.tcl /CVS/tcl_SF_clean/unix/tclsh - 8.5a0 client: done sending server: copying 16384 bytes to tempFile client: won't wait anymore ... server: [fcopy] wanted 16384, and got 16384 server: [fcopy] doesn't tell us we are finished, exit anyway whereas the correct output (uncommenting line 72) is [mig@mini test2]$ /CVS/tcl_SF_clean/unix/tclsh test.tcl /CVS/tcl_SF_clean/unix/tclsh - 8.5a0 server: copying 16384 bytes to tempFile client: done sending server: copied 16384 bytes to tempFile. server: all done
- foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "msofer"
- subsystem changed to: "None"
- title changed to: "[fcopy] callback sometimes fails to trigger"
- type changed to: "Bug"