From owner-freebsd-emulation@FreeBSD.ORG Tue Oct 21 08:01:37 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0DF510657D4 for ; Tue, 21 Oct 2008 08:01:36 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from services.ipt.ru (services.ipt.ru [194.62.233.110]) by mx1.freebsd.org (Postfix) with ESMTP id 962458FC24 for ; Tue, 21 Oct 2008 08:01:36 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from [85.173.17.41] (helo=moosa) by services.ipt.ru with esmtpa (Exim 4.54 (FreeBSD)) id 1KsCBG-0001dq-UN; Tue, 21 Oct 2008 12:01:31 +0400 To: "Jeremy Messenger" References: <48FD5EB8.9030405@delphij.net> From: Boris Samorodov Date: Tue, 21 Oct 2008 12:01:24 +0400 In-Reply-To: (Jeremy Messenger's message of "Tue\, 21 Oct 2008 01\:10\:56 -0500") Message-ID: <16667467@ipt.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-emulation@freebsd.org, d@delphij.net Subject: Re: Linux compat 2.6.16 reports time incorrect? X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Oct 2008 08:01:37 -0000 On Tue, 21 Oct 2008 01:10:56 -0500 Jeremy Messenger wrote: > On Mon, 20 Oct 2008 23:46:48 -0500, Xin LI wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Jeremy Messenger wrote: > >> Hello folks, > >> > >> I have updated RELENG_7 recently, and switched to 2.6.26 and f8 at the > >> same time. I am not sure which I am supposed to blame on. :-) Anyway, > >> now my linux-opera M2 (mail) client reports time incorrect. So I have > >> checked with date(1) and it does indeed report different. > >> > >> ---------------------------------- > >> # /bin/date > >> Mon Oct 20 22:28:35 CDT 2008 > >> # /compat/linux/bin/date > >> Tue Oct 21 03:28:38 UTC 2008 > >> ---------------------------------- > >> > >> I do not remember for have to configure the date correct for Linux 2.4 > >> stuff before I update RELENG_7 and switched to newer 2.6.16 stuff. I am > >> wondering if I have to do that now for configure time or it's not > >> normal? > > > > Looks like you don't have a proper /etc/localtime setting? I think > > tzsetup would help... > I don't think so. FreeBSD's orignal /bin/date reports correct, but > /compat/linux/bin/date reported different. I have downgraded Linux > compat back to 2.4 and linux_base-fc4 stuff, now I have this: > ---------------------------------- > # /bin/date > Tue Oct 21 01:03:20 CDT 2008 > # /compat/linux/bin/date > Tue Oct 21 01:03:23 CDT 2008 > ---------------------------------- > Which is correct. So.. Must be either a bug in Linux compat 2.6.16 or > linux_base-f8 or it's new that I have to configure in /compat/linux/* > for time stuff? Ktrace/linux_kdump for "/compat/linux/bin/date" with 2.6.16 and f8 give: ----- ... 66771 date NAMI "/compat/linux/etc/localtime" 66771 date NAMI "/etc/localtime" 66771 date RET linux_open 3 66771 date CALL linux_fstat64(0x3,0xbfbfea18,0x281d7ff4) 66771 date RET linux_fstat64 0 66771 date CALL linux_fstat64(0x3,0xbfbfe868,0x281d7ff4) 66771 date RET linux_fstat64 0 66771 date CALL linux_mmap2(0,0x1000,0x3,0x22,0xffffffff,0) 66771 date RET linux_mmap2 671551488/0x28071000 66771 date CALL read(0x3,0x28071000,0x1000) 66771 date GIO fd 3 read 815 bytes "TZif\0\0\0\0\0\0\0\0\0\0\0\0" 66771 date RET read 815/0x32f 66771 date CALL read(0x3,0x28071000,0x1000) 66771 date GIO fd 3 read 0 bytes "" 66771 date RET read 0 66771 date CALL close(0x3) 66771 date RET close 0 66771 date CALL munmap(0x28071000,0x1000) 66771 date RET munmap 0 66771 date CALL linux_open(0x281ab044,0,0x1b6) 66771 date NAMI "/compat/linux/etc/localtime" 66771 date NAMI "/etc/localtime" 66771 date RET linux_open 3 66771 date CALL linux_fstat64(0x3,0xbfbfe3ac,0x281d7ff4) 66771 date RET linux_fstat64 0 66771 date CALL linux_fstat64(0x3,0xbfbfe1fc,0x281d7ff4) 66771 date RET linux_fstat64 0 66771 date CALL linux_mmap2(0,0x1000,0x3,0x22,0xffffffff,0) 66771 date RET linux_mmap2 671551488/0x28071000 66771 date CALL read(0x3,0x28071000,0x1000) 66771 date GIO fd 3 read 815 bytes "TZif\0\0\0\0\0\0\0\0\0\0\0\0" 66771 date RET read 815/0x32f 66771 date CALL read(0x3,0x28071000,0x1000) 66771 date GIO fd 3 read 0 bytes "" 66771 date RET read 0 66771 date CALL close(0x3) 66771 date RET close 0 66771 date CALL munmap(0x28071000,0x1000) 66771 date RET munmap 0 66771 date CALL linux_fstat64(0x1,0xbfbfe4b0,0x281d7ff4) 66771 date RET linux_fstat64 0 66771 date CALL linux_mmap2(0,0x1000,0x3,0x22,0xffffffff,0) 66771 date RET linux_mmap2 671551488/0x28071000 66771 date CALL linux_open(0x281ab044,0,0x1b6) 66771 date NAMI "/compat/linux/etc/localtime" 66771 date NAMI "/etc/localtime" 66771 date RET linux_open 3 66771 date CALL linux_fstat64(0x3,0xbfbfe3ac,0x281d7ff4) 66771 date RET linux_fstat64 0 66771 date CALL linux_fstat64(0x3,0xbfbfe1fc,0x281d7ff4) ... ----- The file /etc/localtime is accessed three times and every time is rejected. May be the structure of this file has been changed for linux since 2.4.2? WBR -- bsam