Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Nov 2003 21:32:30 -0400 (AST)
From:      "Marc G. Fournier" <scrappy@hub.org>
To:        freebsd-current@freebsd.org
Cc:        freebsd-stable@freebsd.org
Subject:   Time jumping on both 4.x and 5.x ...
Message-ID:  <20031128212342.G99096@ganymede.hub.org>

next in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-464178111-1070069550=:99096
Content-Type: TEXT/PLAIN; charset=US-ASCII


In trying to isolate an issue where the PostgreSQL 'explain analyze' is
showing "odd results" (namely, negative time estimates on queries), Tom
Lane wrote a quick C program to test gettimeofday() (program attached) ...
the results on a 4.9-PRERELEASE kernel of Sep 20 14:16:48 ADT 2003 shows:

neptune# time ./timetest
out of order tv_sec: 1070068479 99040, prev 1070069174 725235
out of order tv_usec: 1070068479 99040, prev 1070069174 725235
out of order tv_sec: 1070069175 19687, prev 1070068479 99040
out of order tv_usec: 1070069175 19687, prev 1070068479 99040
out of order tv_sec: 1070068499 99377, prev 1070069194 625573
out of order tv_usec: 1070068499 99377, prev 1070069194 625573
out of order tv_sec: 1070069194 808542, prev 1070068499 99377
^C1.171u 23.461s 0:24.68 99.7%  5+169k 1+0io 0pf+0w

One person on the list has tried the same script on a 5.2 kernel, and
reports seeing similar results, but after a longer period of time (~30min)
...

In most (all?) cases, the offset appears to be ~+/-695 secs ... Linux ppl
on the list, running the same problem, seem to be able to reproduce the
issue, except they are only finding differences of 1 microsecond, and then
only on older kernels (2.2.x, apparently) ... those running newer Linux
kernels are reporting a clean run ...

Known problem?

----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: scrappy@hub.org           Yahoo!: yscrappy              ICQ: 7615664
--0-464178111-1070069550=:99096
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="timetest.c"
Content-Transfer-Encoding: BASE64
Content-ID: <20031128213230.Q99096@ganymede.hub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XJ0aW1l
LnR2X3VzZWMgPCBwcmV2dGltZS50dl91c2VjICYmDQoJCQljdXJ0aW1lLnR2
X3NlYyAhPSBwcmV2dGltZS50dl9zZWMgKyAxKQ0KCQkJZnByaW50ZihzdGRl
cnIsICJvdXQgb2Ygb3JkZXIgdHZfdXNlYzogJWxkICVsZCwgcHJldiAlbGQg
JWxkXG4iLA0KCQkJCQkobG9uZyBpbnQpIGN1cnRpbWUudHZfc2VjLA0KCQkJ
CQkobG9uZyBpbnQpIGN1cnRpbWUudHZfdXNlYywNCgkJCQkJKGxvbmcgaW50
KSBwcmV2dGltZS50dl9zZWMsDQoJCQkJCShsb25nIGludCkgcHJldnRpbWUu
dHZfdXNlYyk7DQoNCgkJcHJldnRpbWUgPSBjdXJ0aW1lOw0KCX0NCg0KCXJl
dHVybiAwOw0KfQ0K

--0-464178111-1070069550=:99096--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031128212342.G99096>