From owner-freebsd-current@FreeBSD.ORG Sat Feb 11 10:45:26 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A64B01065674; Sat, 11 Feb 2012 10:45:26 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8986C8FC0A; Sat, 11 Feb 2012 10:45:25 +0000 (UTC) Received: by lagz14 with SMTP id z14so4458061lag.13 for ; Sat, 11 Feb 2012 02:45:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=A8Q1vSDn5IBFl03nLA6gaSWkNKpXJYRV265nK4CX4vY=; b=V1wUr0SnKxMmJQEeQjvXrp0pDbUYH3X2UmwzbkkueWI6NnF6I0U+km9ig57y7AWtLG i02wUXieT+c24FrfrQ7l/zRpQirkcy0A4HOn81wvE8V8c+ERDGIMzYngFfkO/u3uvmiA lmHpyxg+XMWmZ1qdkfT0ShM+if4oj9ideKu6Q= Received: by 10.152.128.230 with SMTP id nr6mr4380084lab.27.1328955597293; Sat, 11 Feb 2012 02:19:57 -0800 (PST) Received: from localhost ([78.157.92.5]) by mx.google.com with ESMTPS id w10sm7253104lbe.14.2012.02.11.02.19.56 (version=SSLv3 cipher=OTHER); Sat, 11 Feb 2012 02:19:56 -0800 (PST) Date: Sat, 11 Feb 2012 12:20:06 +0200 From: Gleb Kurtsou To: Florian Smeets Message-ID: <20120211102006.GA1274@reks> References: <4F358F01.1090508@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4F358F01.1090508@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Konstantin Belousov , decke@FreeBSD.org, "current@freebsd.org" Subject: Re: Processes getting stuck in state tmpfs X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 11 Feb 2012 10:45:26 -0000 On (10/02/2012 22:41), Florian Smeets wrote: > Hi, > > if you set WRKDIRPREFIX to a tmpfs mountpoint and try to build audio/gsm > from ports one of the mv processes gets stuck in state tmpfs quite > often. Traces from a kernel with WITTNESS and DEBUG_VFS_LOCKS are > available here http://tb.smeets.im/~flo/tmpfs.txt It's because of incorrect vnode locking order in tmpfs_rename. Issue is known and tmpfs is not the only file system suffering from it (e.g. ext2). There two ways of working around it in tree: * UFS: try locking vnode, unlock all vnodes on failure, restart, relookup vnodes needed. * ZFS: introduce directory entry locks to guarantee fvp won't disappear, fdvp can be safely traversed, etc. That won't be easy.. UFS-way would be a good temporal solution, but I think we should work on improving VOP_RENAME() in a long run. I'll try to prepare a patch in several days. Thanks, Gleb.