Re: settimeofday function taking 24 - 30 minutes to complete



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

M. Warner Losh wrote:
In message: <45889598.3030408@xxxxxxxxxxxxxxxx>
Garrett Cooper <youshi10@xxxxxxxxxxxxxxxx> writes:
: Scot Hetzel wrote:
: > On 12/19/06, Mark Kirkwood <markir@xxxxxxxxxxxxxxx> wrote:
: >> Mark Kirkwood wrote:
: >>
: >> > Just tried out this on 6-STABLE
: >>
: >> > I can't get the hang at all (with or without thee extra includes):
: >> >
: >> > # time ./settimetest
: >> > INFO: Saved current time
: >> > INFO: settimeofday completed sucessfully
: >> > INFO: Reset time to original value
: >> > 0.000u 0.002s 0:00.00 0.0% 0+0k 0+0io 0pf+0w
: >> >
: >>
: >> Oops - thought I was reading -stable instead of -current list
: >> (doh).. sorry! Well at least you know it can work on *some* version of
: >> FreeBSD!....(I don't have any machines running -current at the moment to
: >> test).
: >>
: >
: > Here's the time for the test on FreeBSD/amd64 -CURRENT, update yesterday.
: >
: > hp010# date ; time ./t1 ; date
: > Tue Dec 19 19:07:33 CST 2006
: > INFO: Saved current time
: > INFO: settimeofday completed sucessfully
: > INFO: Reset time to original value
: > 0.000u 1469.241s 0:00.00 0.0% 5+175k 0+0io 0pf+0w
: > Tue Dec 19 19:07:33 CST 2006
: > hp010# date 200612191933
: > Tue Dec 19 19:33:00 CST 2006
: >
: > Scot
: Well, I'll find a random unused machine, setup FreeBSD on it with vmware
: and then try that out. Seems interesting that it takes 30 minutes to run
: instead of being done almost instantaneously.

It does run almost instantly if you use a time from 2000. The date
command also causes the lockup if you say 'date 1970010100140' as
well. Looks like there's a loop in the kernel to do division, but I
can't quite find where it is.

If you have a good test setup, maybe you can do a binary search in the
settimeofday code to find why a large leap backwards causes problems.

Warner

Why not just enabling debugging in the kernel and your source, and step
through a much as possible using gdb to find the problem?
Finally got back to installing FBSD in a virtual machine, so I could
figure out where you are in current :D. The only other problem is that I
don't have a 64-bit box and you do..
- -Garrett
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFigGTEnKyINQw/HARAmy4AJ46UUe0d4czoqWn0o8nUSCgFQXhawCfV4pv
lbsH583vT7zn9VGSUSa+9TI=
=SCBA
-----END PGP SIGNATURE-----
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Consistent file system hang with RELENG_6 of today ...
    ... On Thu, 28 Jul 2005, Scot Hetzel wrote: ... >> system that the jail directory hierarchy happens to be mounted on though ... > compatibilty code in the kernel. ...
    (freebsd-stable)
  • Re: 6.0 BETA1 hangs at boot (ahd(4) broken ??)
    ... > Scot Hetzel wrote: ... > exactly the same problems and the same hard-hang. ... the bootonly.iso doesn't seem to support a serial console... ... working kernel, just incase a kernel fails to boot. ...
    (freebsd-stable)
  • Re: 4.7->5.0, ran out of space on /
    ... On Mon, 2004-09-27 at 09:34, Scot Hetzel wrote: ... If Scot's advice doesn't do it, as a last resort, delete the kernel you ...
    (freebsd-questions)