Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2004-09-09
21:07 • Ticket [1016023fff] latest tcl 8.5 timer.test test suite case 2.1 fails stat... artifact: eee0eb1f70 user: dkf
2004-09-08
02:12 • Ticket [1016023fff]: 7 changes artifact: 18f460be90 user: kennykb
02:12 • Closed ticket [1016023fff]. artifact: f5e50014af user: kennykb
2004-08-25
21:51 • Ticket [1016023fff]: 4 changes artifact: 73644dcb9c user: dkf
14:36 • New ticket [1016023fff]. artifact: ba60afd000 user: lvirden

latest tcl 8.5 timer.test test suite case 2.1 fails

Closed / Fixed1016023fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2004-08-25 14:36:07
platform: sparc solaris 8, sun c compiler, cvs snapshot
from aug 24, 2004

configuration: --enable-stubs --enable-symbols
--enable-shared 

timer.test

==== timer-2.1 Tcl_DeleteTimerHandler procedure FAILED
==== Contents of test case:

    foreach i [after info] {
        after cancel $i
    }
    set x ""
    foreach i {100 200 300 50 150} {
        after $i lappend x $i
    }
    after cancel lappend x 150
    after cancel lappend x 50
    after 200
    update
    set x

---- Result was:
100 200 300
---- Result should have been (exact matching):
100 200
==== timer-2.1 FAILED
dkfplain2004-08-25 21:51:04
Logged In: YES 
user_id=79902

The problem can be summed up by this snipped from a session
with the CVS HEAD on Linux...

 % time {after 200}
 190820 microseconds per iteration

(i.e. it slept for 10ms less than we asked).  Note that this
is not reliably reproducable; the jitter in the time taken
is quite a lot, but the requested value definitely isn't a
lower bound. :^(
kennykb Closed ticket [1016023fff]. [History diff]2004-09-08 02:12:50
kennykbplain2004-09-08 02:12:51
Logged In: YES 
user_id=99768

The symptoms are consistent with 
the process being hung for >100 ms
because of an overloaded machine. 
(Essentially, if the [after 200] sleeps
for 300 ms or longer, we'll see this 
behaviour.)  They are not consistent
with dkf's reported problem, where
[after 200] slept too little, rather than
too much.

I've changed the test case to (one 
hopes!) be more resilient in the face
of system load.

Donal, can we track your issue separately?
I've tried on the Unix machines that I have,
and can't seem to make it fail.  The only way
that I can see for it to happen is if the system
clock were to run backwards between the
Tcl_GetTime call inside the loop in Tcl_Sleep
and the second Tcl_GetTime call in
Tcl_TimeObjCmd.  I suppose that can happen
if ntpd backs the clock up or something, but
that would be pretty strange.
dkfplain2004-09-09 21:07:42
Logged In: YES 
user_id=79902

I could believe annoying ntpd problems; I've been having
some persistent problems with our local ntpd systems in
other contexts...
Log in (anonymous is fine) to add a comment.