iocmd.tf-24.17.bug3522560 error
Closed / Fixed9d19af7adb1b539f1330a7adfb121d05d76071caCreated 12 years agoUpdated 12 years ago
Descriptionplain2014-06-16 14:21:28
Occasionally when running the Tcl test suite, I see:
ioCmd.test
Test file error: tried to post events channel "rc158" is not interested in
while executing
"chan postevent $hi read"
(procedure "POST" line 3)
invoked from within
"POST rc158"
("after" script)
Examining ioCmd.test, it is clear that something can go
wrong with test iocmd.tf-24.17.bug3522560
Referenced by1
1f0a5df094[9d19af7adb] Make sure all timer events get canceled. check-in2014-07-24 17:17:41
dgp Ticket [9d19af7adb]: 3 changes
[History diff]2014-06-16 14:22:06
dgpplain2014-07-24 17:06:38
Ok, I think I see the problem here. The "watch" handler needs to [after cancel] and existing stream of read timer events in the $::timer variable before it creates one. If it doesn't then we lose the handle to the existing one, and it continues on rescheduling itself, until it fails because the channel has gone away. The failure isn't reliable, because it's all a matter of timing. Whether the watch handler is called more than once. Whether when it is called a 2nd time $::timer holds something active, etc. Another fix might be for the watch handler to just notice whether $::timer is already set and if so let the existing stream of read event pings continue to play out.
dgpplain2014-07-24 17:18:38
fixed on trunk.
Log in (anonymous is fine) to add a comment.