From owner-freebsd-xen@FreeBSD.ORG Tue Jan 4 11:40:12 2011 Return-Path: Delivered-To: freebsd-xen@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE4361065675 for ; Tue, 4 Jan 2011 11:40:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DD44F8FC17 for ; Tue, 4 Jan 2011 11:40:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p04BeCJh074590 for ; Tue, 4 Jan 2011 11:40:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p04BeCXx074589; Tue, 4 Jan 2011 11:40:12 GMT (envelope-from gnats) Date: Tue, 4 Jan 2011 11:40:12 GMT Message-Id: <201101041140.p04BeCXx074589@freefall.freebsd.org> To: freebsd-xen@FreeBSD.org From: Colin Percival Cc: Subject: Re: kern/153620: [xen] Xen guest system clock drifts in AWS EC2 (FreeBSD 9.0-CURRENT i386 T1-micro) X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Colin Percival List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jan 2011 11:40:13 -0000 The following reply was made to PR kern/153620; it has been noted by GNATS. From: Colin Percival To: bug-followup@FreeBSD.org, fbsd-9.0-aws-ec2-1293964000@holmberg.to Cc: Subject: Re: kern/153620: [xen] Xen guest system clock drifts in AWS EC2 (FreeBSD 9.0-CURRENT i386 T1-micro) Date: Tue, 04 Jan 2011 03:32:21 -0800 Ok, I think I see what's happening here: Under some conditions it seems that the clock stops running. If there are no interrupts from any source, the FreeBSD instance never gets scheduled; and the clock loses time in multiples of the timecounter period (2^41 ns) if it doesn't tick for that long. The reason this doesn't show up with an interactive login session open is that ssh generates enough network traffic to wake the kernel periodically; this is also provides a workaround for this bug: Send a ping to the instance once every 30 minutes. -- Colin Percival Security Officer, FreeBSD | freebsd.org | The power to serve Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid