Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2014-07-24
17:18 • Closed ticket [9d19af7adb]: iocmd.tf-24.17.bug3522560 error plus 7 other cha... artifact: 294153cd41 user: dgp
17:17
[9d19af7adb] Make sure all timer events get canceled. check-in: 1f0a5df094 user: dgp tags: trunk
17:06 • Ticket [9d19af7adb] iocmd.tf-24.17.bug3522560 error status still Open with 3... artifact: 4fa2aa850e user: dgp
2014-06-16
14:22 • Ticket [9d19af7adb]: 3 changes artifact: 4cbdb0b8f1 user: dgp
14:21 • New ticket [9d19af7adb]. artifact: c00c862333 user: dgp

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
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.