NetBSD Problem Report #24718
Received: (qmail 14563 invoked by uid 605); 9 Mar 2004 14:41:35 -0000
Message-Id: <200403091441.i29EfVq2013173@night-porter.duskware.de>
Date: Tue, 9 Mar 2004 15:41:31 +0100 (CET)
From: Martin Husemann <martin@duskware.de>
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: martin@duskware.de
To: gnats-bugs@gnats.NetBSD.org
Subject: rtc_offset changes do not fix up process start time
X-Send-Pr-Version: 3.95
>Number: 24718
>Category: kern
>Synopsis: rtc_offset changes do not fix up process start time
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: martin
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Mar 09 14:42:00 +0000 2004
>Closed-Date:
>Last-Modified: Thu Mar 11 03:10:00 +0000 2004
>Originator: Martin Husemann
>Release: NetBSD 1.6ZK
>Organization:
>Environment:
System: NetBSD night-porter.duskware.de 1.6ZK NetBSD 1.6ZK (PORTER) #1: Sun Mar 7 00:59:25 CET 2004 martin@night-porter.duskware.de:/usr/src/sys/arch/i386/compile/PORTER i386
Architecture: i386
Machine: i386
>Description:
When sysctl changes kern.rtc_offset it tries to cover up it's traces,
but not good enough: the "start" time of already running processes is not
fixed up.
(yeah, Perry said the current handling is insufficient ...)
>How-To-Repeat:
On a machine with /etc/localtime != UTC and rtclocaltime=YES in /etc/rc.conf
check the output of "ps -axuk start" - and wonder why kernel threads are
sorted "wrong".
>Fix:
On write to rtc_offset, walk the process list and adjust the start field?
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->martin
Responsible-Changed-By: martin
Responsible-Changed-When: Tue Mar 9 14:42:19 UTC 2004
Responsible-Changed-Why:
I'll handle this.
From: enami tsugutomo <enami@but-b.or.jp>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@gnats.NetBSD.org
Subject: Re: kern/24718: rtc_offset changes do not fix up process start time
Date: Wed, 10 Mar 2004 06:37:04 +0900 (JST)
> >Fix:
> On write to rtc_offset, walk the process list and adjust the start field?
So, are you going to fixup other timestamps like mtime of modified
files before set? IMHO, allowing to set rtc_offset using sysctl after
boot is wrong approach.
enami.
From: Martin Husemann <martin@duskware.de>
To: enami tsugutomo <enami@but-b.or.jp>
Cc: gnats-bugs@gnats.NetBSD.org
Subject: Re: kern/24718: rtc_offset changes do not fix up process start time
Date: Tue, 9 Mar 2004 22:49:09 +0100
On Wed, Mar 10, 2004 at 06:37:04AM +0900, enami tsugutomo wrote:
> So, are you going to fixup other timestamps like mtime of modified
> files before set? IMHO, allowing to set rtc_offset using sysctl after
> boot is wrong approach.
I see your point. No, I'm not suggesting to do anything more - and maybe
we should just leave it as it is.
Modifiying rtc_offset at kernel runtime *is* breaking the rules,
and you pay for that. But:
- it mostly works and you hardly notice
- something like this is needed, for the kind of setups this is designed
for (i.e. dual booting with windows)
- there has been no better alternative proposed so far
Maybe we should just close this PR and live with the current state - or find
something better and close the PR too.
Martin
From: enami tsugutomo <enami@but-b.or.jp>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@gnats.NetBSD.org
Subject: Re: kern/24718: rtc_offset changes do not fix up process start time
Date: Wed, 10 Mar 2004 07:08:59 +0900 (JST)
> - something like this is needed, for the kind of setups this is designed
> for (i.e. dual booting with windows)
> - there has been no better alternative proposed so far
What's wrong with patching rtc_offset in /netbsd?
enami.
From: Martin Husemann <martin@duskware.de>
To: enami tsugutomo <enami@but-b.or.jp>
Cc: gnats-bugs@gnats.NetBSD.org
Subject: Re: kern/24718: rtc_offset changes do not fix up process start time
Date: Tue, 9 Mar 2004 23:18:54 +0100
On Wed, Mar 10, 2004 at 07:08:59AM +0900, enami tsugutomo wrote:
> What's wrong with patching rtc_offset in /netbsd?
Nothing, besides the fact that you need to do it manually whenever DST
changes.
Martin
From: enami tsugutomo <enami@but-b.or.jp>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@gnats.NetBSD.org
Subject: Re: kern/24718: rtc_offset changes do not fix up process start time
Date: Wed, 10 Mar 2004 08:00:17 +0900 (JST)
> Nothing, besides the fact that you need to do it manually whenever DST
> changes.
Who changes the rtc? Windows?
enami.
From: enami tsugutomo <enami@but-b.or.jp>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@gnats.NetBSD.org
Subject: Re: kern/24718: rtc_offset changes do not fix up process start time
Date: Wed, 10 Mar 2004 09:56:57 +0900 (JST)
btw, is it hard to let boot loader optionally to read /etc/localtime
and pass rtc_offset? Of course, the file needs to be regular file.
enami.
From: Martin Husemann <martin@duskware.de>
To: enami tsugutomo <enami@but-b.or.jp>
Cc: gnats-bugs@gnats.NetBSD.org
Subject: Re: kern/24718: rtc_offset changes do not fix up process start time
Date: Wed, 10 Mar 2004 09:07:05 +0100
On Wed, Mar 10, 2004 at 08:00:17AM +0900, enami tsugutomo wrote:
> Who changes the rtc? Windows?
Yes. Some other OSes do it too, as I've been told - which is why it's
not named something windows specific. There was a thread around it
that ended in the current (way underdocumented) option later. It
started here:
http://mail-index.netbsd.org/tech-kern/2003/04/18/0005.html
The current implementation is still imperfect for people actively writing
FAT/NTFS (heh!) partitions, since noone implemented a cron @timeshift
directive to make the rtc_offset adjustment script run again whenever
DST ends/starts while NetBSD is running. (Those file systems store
timestamps in local time, IIUC.) But this would mean we would be
willing to think about more rtc_offset runtime changes.
> btw, is it hard to let boot loader optionally to read /etc/localtime
> and pass rtc_offset? Of course, the file needs to be regular file.
I have no idea how hard this would be. If doable, it would be a better
solution, indeed. At least for the common cases where /etc/localtime
is not on NFS.
Should we move this discussion somewhere else?
Martin
From: enami tsugutomo <enami@but-b.or.jp>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@gnats.NetBSD.org
Subject: Re: kern/24718: rtc_offset changes do not fix up process start time
Date: Thu, 11 Mar 2004 12:09:36 +0900 (JST)
> The current implementation is still imperfect for people actively writing
> FAT/NTFS (heh!) partitions, since noone implemented a cron @timeshift
> directive to make the rtc_offset adjustment script run again whenever
> DST ends/starts while NetBSD is running. (Those file systems store
> timestamps in local time, IIUC.) But this would mean we would be
> willing to think about more rtc_offset runtime changes.
Isn't it better to introduce another variable to describe UTC -> local
time conversion? For me it sounds they are different problem.
> > btw, is it hard to let boot loader optionally to read /etc/localtime
> > and pass rtc_offset? Of course, the file needs to be regular file.
>
> I have no idea how hard this would be. If doable, it would be a better
> solution, indeed. At least for the common cases where /etc/localtime
> is not on NFS.
IIRC, recent boot has an ability to read file by name. Even NFS.
> Should we move this discussion somewhere else?
Probably, since there is no trivial way.
enami.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.