From owner-freebsd-current@FreeBSD.ORG Fri Oct 4 17:46:41 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C0037413; Fri, 4 Oct 2013 17:46:41 +0000 (UTC) (envelope-from bsam@passap.ru) Received: from forward3l.mail.yandex.net (forward3l.mail.yandex.net [IPv6:2a02:6b8:0:1819::3]) by mx1.freebsd.org (Postfix) with ESMTP id 4FFA42C31; Fri, 4 Oct 2013 17:46:41 +0000 (UTC) Received: from smtp14.mail.yandex.net (smtp14.mail.yandex.net [95.108.131.192]) by forward3l.mail.yandex.net (Yandex) with ESMTP id 978C0150107B; Fri, 4 Oct 2013 21:46:38 +0400 (MSK) Received: from smtp14.mail.yandex.net (localhost [127.0.0.1]) by smtp14.mail.yandex.net (Yandex) with ESMTP id 1DE491B6017F; Fri, 4 Oct 2013 21:46:38 +0400 (MSK) Received: from 87.249.28.58.tel.ru (87.249.28.58.tel.ru [87.249.28.58]) by smtp14.mail.yandex.net (nwsmtp/Yandex) with ESMTP id m09cnKrt4y-kbu0opF3; Fri, 4 Oct 2013 21:46:37 +0400 Message-ID: <524EFEFD.40805@passap.ru> Date: Fri, 04 Oct 2013 21:46:37 +0400 From: Boris Samorodov User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130811 Thunderbird/17.0.8 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: [10.0-amd64 host and 9.2-i386 jail] cpio: Can't update time for... References: <524C5781.9000500@passap.ru> <20131002174718.GY41229@kib.kiev.ua> <524C6384.6050508@passap.ru> <20131002191229.GZ41229@kib.kiev.ua> In-Reply-To: <20131002191229.GZ41229@kib.kiev.ua> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit Cc: Sunpoet Po-Chuan Hsieh , FreeBSD CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Fri, 04 Oct 2013 17:46:41 -0000 02.10.2013 23:12, Konstantin Belousov пишет: > On Wed, Oct 02, 2013 at 10:18:44PM +0400, Boris Samorodov wrote: >> 02.10.2013 21:47, Konstantin Belousov пишет: >>> On Wed, Oct 02, 2013 at 09:27:29PM +0400, Boris Samorodov wrote: >>>> (CCing to the maintainer) >>>> >>>> Hi All, >>>> >>>> I've come across a problem and can't diagnose it. Please give me >>>> an advice how to proceed. >>>> >>>> I have a fresh CURRENT amd64 host with 9.2 (9.1 behaves the same) >>>> i386 jail. The command "/usr/bin/find -d | /usr/bin/cpio >>>> -dumpl " ends with error with diagnostic "cpio: Can't update >>>> time for ". >>>> >>>> One can reproduce it by installing at 10-amd64 host poudriere, create >>>> a 9-i386 jail and try to build devel/tmake port. Full log is here: >>>> http://gw.wart.ru/bulk/91-i386-default/2013-10-02_14h52m08s/logs/errors/tmake-1.13.log >>>> >>>> I've managed to find out that the command...: >>>> ----- >>>> # /usr/bin/find -d /wrkdirs/usr/ports/devel/tmake/work/tmake-1.13/lib >>>> | /usr/bin/cpio -dumpl /destdir >>>> ----- >>>> >>>> ...fails with diagnostic: "cpio: Can't update time for >>>> /destdir/wrkdirs/usr/ports/devel/tmake/work/tmake-1.13/lib". >>>> >>>> However the following command succeeds (mind the /* after lib): >>>> ----- >>>> # /usr/bin/find -d /wrkdirs/usr/ports/devel/tmake/work/tmake-1.13/lib/* >>>> | /usr/bin/cpio -dumpl /destdir >>>> ----- >>>> >>>> The directory itself seems quite natural: >>>> ----- >>>> # ls -ldT /wrkdirs/usr/ports/devel/tmake/work/tmake-1.13/lib >>>> drwxr-xr-x 53 root wheel 3264 Jan 28 05:21:45 2004 >>>> /wrkdirs/usr/ports/devel/tmake/work/tmake-1.13/lib >>>> ----- >>>> >>>> There are no problems at 10-amd64 and 10-i386 jails. >>>> >>>> I'm out of ideas. Thanks for your help. >>> ktrace the failing invocation ? >> >> The relevant part is here: >> ftp://ftp.wart.ru/pub/misc/bsdcpio-error-cant-update-time-kdump.txt > > So lutimes(2) fails with EINVAL, and in fact futimes(2) failed just before > with the timeval array passed from the same address. Most likely, EINVAL > comes from the getutimes() check, which verifies that usec values are > non-negative and less than 100000. > > You probably have to debug this by looking at the timeval initialization > and understanding where the value come from. The bad value (for birthtim) came from lstat() syscall. So far it seems to be a bug in time conversion. Pure hosts without jails (both 10 and 9) are not affected. The simple testcase: ===== host-amd64% sudo touch /jail/root/afile host-amd64% ./test-utimes /jail/root/afile ---> /jail/root/afile atim: 1380907943.417817881, mtim: 1380907943.417817881, ctim: 1380907943.417817881, birthtim:1380907943.417817881 ... jail-i386# ./test-utimes /root/afile ---> /root/afile atim: 1380907943.417817881, mtim: 1380907943.417817881, ctim: 1380907943.417817881, birthtim:417817881.0 ===== Look at the birthtim results. The testing program just do a stat/lstat (the resulta are the same) and print the resulting values. -- WBR, Boris Samorodov (bsam) FreeBSD Committer, http://www.FreeBSD.org The Power To Serve