From owner-freebsd-bugs@FreeBSD.ORG Tue Sep 22 12:30:05 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F4BC1065670 for ; Tue, 22 Sep 2009 12:30:05 +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 DF4158FC12 for ; Tue, 22 Sep 2009 12:30:04 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8MCU4Tv011547 for ; Tue, 22 Sep 2009 12:30:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8MCU468011544; Tue, 22 Sep 2009 12:30:04 GMT (envelope-from gnats) Resent-Date: Tue, 22 Sep 2009 12:30:04 GMT Resent-Message-Id: <200909221230.n8MCU468011544@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Daniel Braniss Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECBB61065672 for ; Tue, 22 Sep 2009 12:25:19 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id A5EAC8FC0C for ; Tue, 22 Sep 2009 12:25:19 +0000 (UTC) Received: from sunfire.cs.huji.ac.il ([132.65.16.80]) by kabab.cs.huji.ac.il with esmtp id 1Mq4Qo-000187-DQ for FreeBSD-gnats-submit@freebsd.org; Tue, 22 Sep 2009 15:25:18 +0300 Received: from danny by sunfire.cs.huji.ac.il with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1Mq4Qo-0003Dk-C3 for FreeBSD-gnats-submit@freebsd.org; Tue, 22 Sep 2009 15:25:18 +0300 Message-Id: Date: Tue, 22 Sep 2009 15:25:18 +0300 From: Daniel Braniss To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/139059: zfs(64bit) nfs server fails open(..., O_WRONLY|O_CREAT|O_EXCL, ...) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Braniss List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2009 12:30:05 -0000 >Number: 139059 >Category: kern >Synopsis: zfs(64bit) nfs server fails open(..., O_WRONLY|O_CREAT|O_EXCL, ...) >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 22 12:30:04 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Daniel Braniss >Release: FreeBSD 7.2-STABLE amd64 >Organization: >Environment: System: FreeBSD sunfire 7.2-STABLE FreeBSD 7.2-STABLE #29: Tue Jun 30 13:04:10 IDT 2009 danny@sunfire:/r+d/obj/sunfire/r+d/7/sys/HUJI amd64 >Description: if client's ip address last octet is > 127(0x7f), an open(2) with flag O_EXCL fails. This is true for zfs server running 64 bit 8-RC, 7-STABLE. the problem (as far as we can tell) is the "create verifier" field in the NFS packet. FreeBSD client uses for this field the IP address followed by a serial (that is incremented by every call), but the server treats it as a timespec value using the first four bytes (in network order) as seconds and the next four as nanoseconds. when the last octet of the IP address is larger than 127 the resulting timespec seconds value is negative (larger than 0x7fffffff) and that probably (haven't looked into the ZFS code) causes problem with the ZFS layer (this value is passed to the ZFS as the atime for the newly created file) >How-To-Repeat: use the code from http://www.freebsd.org/cgi/query-pr.cgi?pr=138803, on an zfs/nfs server running amd64, from a client whose IP address is n.n.n.m where m is > 127 >Fix: >Release-Note: >Audit-Trail: >Unformatted: