Skip to content
Tcl Source Code Artifact [7945c4b68e]
Login

Artifact [7945c4b68e]

Artifact 7945c4b68e3693037ecb884b7a0f05a418bce794:

Ticket change [7945c4b68e] - New ticket [780533ffffffffff|780533ffff] <i>[fcopy] callback sometimes fails to trigger</i>. by msofer on 2003-07-30 21:45:03.
D 2003-07-30T21:45:03
J assignee nobody
J cmimetype text/plain
J comment Assigned\sto\sdgp\sfor\sreview,\sas\sit\smight\shave\ssomething\nto\sdo\swith\s[Bug\s218203]).\n\nWhat\sI\ssee\sis:\slet\s$s\sbe\sa\ssocket,\s$f\sa\snormal\sfile,\n$nBytes\sa\s"large"\snumber\s(8kB\sor\sabove\sseems\sto\strigger\nthe\serror\swith\sgood\sprobability),\sboth\schannels\swith\n"-translation\sbinary".\sThen\sthe\strouble\sis\sthat\n\s\sfcopy\s$s\s$f\s-size\s$nBytes\s-command\smyCallback\noften\sfails\sto\snotice\sthat\s$nBytes\s*were*\salready\nwritten\sto\s$f,\sand\shence\snever\scalls\smyCallback.\n\nIt\smight\sbe\san\soff-by-one\sheisenbug:\sas\sI\ssaid,\sit\nhappens\soften\sbut\snot\salways\s-\sand\sit\sseems\snever\sto\nhappen\sif\sone\smore\sbyte\sthan\spromised\scomes\sthrough\sthe\nsocket.\n\nI\sattached\shere\sa\sscript\sthat\sproduces\sthe\serror\swith\ngood\sprobability;\suncommenting\sline\s72\sdoes\sthe\s"one\nmore\sbyte"\strick.\s\n\nThe\sscript\sattached\sbelow\sproduces\sthe\sfollowing\nresults\son\sRH7.2\s(relevant??):\n\s[mig@mini\stest2]$\s/CVS/tcl_SF_clean/unix/tclsh\stest.tcl\s\n\s/CVS/tcl_SF_clean/unix/tclsh\s-\s8.5a0\n\sclient:\sdone\ssending\n\sserver:\scopying\s16384\sbytes\sto\stempFile\n\sclient:\swon't\swait\sanymore\s...\n\sserver:\s[fcopy]\swanted\s16384,\sand\sgot\s16384\n\sserver:\s[fcopy]\sdoesn't\stell\sus\swe\sare\sfinished,\sexit\nanyway\n\nwhereas\sthe\scorrect\soutput\s(uncommenting\sline\s72)\sis\n\s[mig@mini\stest2]$\s/CVS/tcl_SF_clean/unix/tclsh\stest.tcl\s\n\s/CVS/tcl_SF_clean/unix/tclsh\s-\s8.5a0\n\sserver:\scopying\s16384\sbytes\sto\stempFile\n\sclient:\sdone\ssending\n\sserver:\scopied\s\s16384\sbytes\sto\stempFile.\n\sserver:\sall\sdone\n
J foundin None
J priority 5\sMedium
J resolution None
J status Open
J submitter msofer
J subsystem None
J title [fcopy]\scallback\ssometimes\sfails\sto\strigger
J type Bug
K 780533ffffffffffffffffffffffffffffffffff
U msofer
Z 6d7d33b574915a8f1d67efda7c88c73a