From owner-freebsd-current@FreeBSD.ORG Sat Dec 26 15:38:23 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA65B1065672 for ; Sat, 26 Dec 2009 15:38:23 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 714308FC16 for ; Sat, 26 Dec 2009 15:38:23 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 3D29F73098; Sat, 26 Dec 2009 16:46:04 +0100 (CET) Date: Sat, 26 Dec 2009 16:46:04 +0100 From: Luigi Rizzo To: current@freebsd.org Message-ID: <20091226154604.GA6932@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: select() returning early from timeouts ? (on qemu, HEAD and RELENG_8) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Dec 2009 15:38:23 -0000 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