netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Chris Friesen" <cfriesen@nortel.com>
To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: wacky select timeout behaviour in strace
Date: Thu, 26 Jun 2008 10:48:42 -0600	[thread overview]
Message-ID: <4863C86A.4080903@nortel.com> (raw)

I've got something odd in a couple of recent strace logs (running on an 
older kernel, I haven't yet tried to reproduce in mainline).

First case:

20418 22:06:50.583303 select(19, [7 11 12 13 14 15 16 17 18], NULL, 
NULL, {0, 498508}) = 1 (in [11], left {0, 0}) <5.074137>

select() was called with a timeout of half a second.  Five seconds later 
it returns with zero time left and a single socket readable.  Why 
wouldn't it have returned after half a second with a timeout?



Second case:

18383 01:46:23.572951 select(16, [15], NULL, NULL, {1, 0}) = 1 (in [15], 
left {0, 732000}) <1.337443>

Here we call select with a timeout of 1 sec, then 1.3337 sec later we 
return saying that we have 732ms left to sleep.

In addition, there was an interval timer set up to fire every 500ms, and 
it didn't interrupt the select call.  It did fire 60ms after the select 
call returned.  Interestingly, the timing of that firing (x.97 sec) 
didn't match the normal times (x.07 and x.57), but it then returned to 
the normal times after the single abnormal firing.

Anyone have any ideas what's going on?  This doesn't appear to be an 
strace artifact, as I can reproduce it without tracing the process in 
question.  It also doesn't appear to be a system-wide artifact as I know 
from instrumentation that other tasks are running during this interval.

Thanks,

Chris

                 reply	other threads:[~2008-06-26 17:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4863C86A.4080903@nortel.com \
    --to=cfriesen@nortel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).