Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Dec 2009 16:46:04 +0100
From:      Luigi Rizzo <rizzo@iet.unipi.it>
To:        current@freebsd.org
Subject:   select() returning early from timeouts ? (on qemu, HEAD and RELENG_8)
Message-ID:  <20091226154604.GA6932@onelab2.iet.unipi.it>

next in thread | raw e-mail | index | archive | help
Hi,
while doing some tests with picobsd images on qemu, i noticed
that "ping" runs too fast (approx every 0.4s instead of 1s)
Upon investigation, the problem seems related to
	retval =  select(..., &timeout)
returning a retval of 0 way before the timeout has elapsed
(at least, according to a gettimeofday which is run right after).

My host system is FreeBSD 7.2-stable i386 with qemu.
In the guest (which is built using picobsd 'bridge') i set
	kern.timecounter.hardware=i8254
A guest based on RELENG_7 works fine, whereas HEAD and RELENG_8
exhibit the problem.
Easy way to check:

	time ping -c 21 localhost
(or, on picobsd "date; ping -c 21 localhost; date" )

you should see a real time of 20 seconds (I see 8s on my system).

I was wondering if someone can try the above on real hardware
and let me know.

Even if just related to qemu or some ACPI/timecounter config, it
would be good to know where this comes from.

BTW I don't think this is related to the bug reported in september
of timeouts firing one tick late.

I am going to try various HEAD versions to see where the issue came
out, but it might be a bit time-consuming so if you have suggestions
on possible causes I'd be glad to know.

thanks
luigi



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