From owner-freebsd-bugs Thu Jan 13 14:50: 5 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id B17DA15271 for ; Thu, 13 Jan 2000 14:50:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id OAA08125; Thu, 13 Jan 2000 14:50:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from howland.udel.edu (howland.udel.edu [128.4.2.16]) by hub.freebsd.org (Postfix) with ESMTP id A78BC14BCE for ; Thu, 13 Jan 2000 14:48:13 -0800 (PST) (envelope-from stenn@howland.udel.edu) Received: (from stenn@localhost) by howland.udel.edu (8.9.3/8.9.3) id WAA01548; Thu, 13 Jan 2000 22:48:11 GMT (envelope-from stenn) Message-Id: <200001132248.WAA01548@howland.udel.edu> Date: Thu, 13 Jan 2000 22:48:11 GMT From: stenn@whimsy.udel.edu To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/16113: STABLE kernel page fault changing the timer frequency Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 16113 >Category: kern >Synopsis: Kernel page fault panic using sysctl to change timer frequency >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jan 13 14:50:01 PST 2000 >Closed-Date: >Last-Modified: >Originator: Harlan Stenn >Release: FreeBSD 3.4-20000105-STABLE i386 >Organization: >Environment: 3-STABLE (not 2-STABLE or -CURRENT) >Description: Wrote a perl script to wiggle the timer frequency, based on ntpd's /etc/ntp.drift file and input from PHK. It seems to work fine on 2-STABLE and -CURRENT, but it panics a 3-STABLE kernel with a page fault. >How-To-Repeat: Run ntpd long enough to get a valid /etc/ntp.drift file. Run the following script. #! /usr/bin/perl -w $driftfile = "/etc/ntp.drift"; open(DF, $driftfile) || die "Can't open driftfile ($driftfile): $!\n"; while() { chop; if (/^-?\d+\.\d+$/) { $drift = $_; } else { die "Bogus value in driftfile $driftfile: <$_>\n"; } } close(DF); print "drift is <$drift>\n"; $freq_adj = 1 - $drift / 1000000; print "freq_adj is <$freq_adj>\n"; chop($i8254_freq = `sysctl -n machdep.i8254_freq`); chop($tsc_freq = `sysctl -n machdep.tsc_freq 2> /dev/null`); print "i8254_freq is <$i8254_freq>\n"; print "tsc_freq is <$tsc_freq>\n"; if ($i8254_freq > 1) { $i8254_freq = int $i8254_freq * $freq_adj; print "i8254_freq -> <$i8254_freq>\n"; print "i8254: ".`sysctl -w machdep.i8254_freq=$i8254_freq`; } if ($tsc_freq > 1) { $tsc_freq = int $tsc_freq * $freq_adj; print "tsc_freq -> <$tsc_freq>\n"; print "tsc: ".`sysctl -w machdep.tsc_freq=$tsc_freq`; } >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message