Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jan 2002 14:45:38 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Skye Poier <skye@ffwd.cx>
Cc:        FreeBSD 31337 H4X0RZ <freebsd-hackers@freebsd.org>
Subject:   Re: Possible problem with timeouts?
Message-ID:  <3C3F6B12.452655E3@mindspring.com>
References:  <20020111132615.A36583@ffwd.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
Skye Poier wrote:
> It seems that it is possible to call untimeout and then have your timer
> called immediately thereafter. However, we haven't actually seen this in
> practice, this is a theoretical bug. If this is indeed the case, it will
> break lots of our code (misunderstood semantics..)

Yes, this can happen.  No, it doesn't break anything.

Timeouts wake on an address, and if your code is no longer sleeping
on it, then it doesn't matter.

The only complex case is the case where you have multiple things
sleeping ont he same address, and you expect "wake one" instead
of "wakeup" behaviour (your expectation is incorrect, if this is
the case).

If you are using a non-generic callout, then it's possible, if
you do not do proper guarding of your code, to have a callout
called at the wrong priority.  This will only happen if you
untimeout at a priority different than the priority of the
code being awoken (coding error).  Otherwise, the fact of the
priority level blocking against itself should be enough to save
you.

Arew you observing an error in this regard?

> Now, its possible that this has been fixed since we took a snapshot of
> -current way back around Feb/Mar 2001.

Wow.  That's *really* old.  All bets are off, since that is
incredibly unknown-to-the-rest-of-us code you are running,
there...


> If anyone has some insight into this it would be much appreciated.  I
> have a second question around softclock but I'll save it for later..

If it's about the ineffeciencies in the fixed intervals for
a large number of simultaneous TCP connections, we already
know...

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C3F6B12.452655E3>