From owner-freebsd-fs@FreeBSD.ORG Sun Feb 1 15:48:05 2015 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C5317FF for ; Sun, 1 Feb 2015 15:48:05 +0000 (UTC) Received: from mail.myota.org (mail.myota.org [85.10.206.105]) by mx1.freebsd.org (Postfix) with ESMTP id 2C24228B for ; Sun, 1 Feb 2015 15:48:04 +0000 (UTC) Received: from mobile.client (95.75.167.190.d.dyn.codetel.net.do [190.167.75.95] (may be forged)) (authenticated bits=128) by mail.myota.org (8.14.9/8.14.9) with ESMTP id t11Fjwqe088048; Sun, 1 Feb 2015 16:46:06 +0100 (CET) (envelope-from andre@fbsd.ata.myota.org) Received: from submit.client ([127.0.0.1]) by schlappy.local (8.14.9/8.14.9) with ESMTP id t11FjpEx001673; Sun, 1 Feb 2015 16:45:52 +0100 (CET) (envelope-from andre@fbsd.ata.myota.org) Received: (from user@localhost) by schlappy.local (8.14.9/8.14.9/Submit) id t11Fjpg6001672; Sun, 1 Feb 2015 16:45:51 +0100 (CET) (envelope-from andre@fbsd.ata.myota.org) Date: Sun, 1 Feb 2015 16:45:51 +0100 From: Andre Albsmeier To: freebsd-fs@freebsd.org Subject: [unionfs] deadlocking a 9-STABLE machine with two unionfs mounts onto the same mountpoint Message-ID: <20150201154551.GA1633@schlappy> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Echelon: 757, Submarine, 707, Sears, anarchy X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Not delayed on 85.10.206.105, ACL: AUTH(59), Origin: DO, OS: FreeBSD 9.x X-Virus-Scanned: clamav-milter 0.98.6 at colo X-Virus-Status: Clean Cc: andre@fbsd.ata.myota.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Feb 2015 15:48:05 -0000 I can reliably deadlock a 9.3-STABLE by the following procedure: Let's assume that /tmp is a standard swap-backed file system already. First let's set up what we need: mkdir /tmp/1 /tmp/2 mount -v -t unionfs /tmp/1 /usr/local mount -v -t unionfs /tmp/2 /usr/local No let's lock the system: mkdir /tmp/2/bla while :; do echo go tar -cC /usr/src/etc -f - . | tar -xpC /tmp/2/bla -f - done It survives about 3 or 4 rounds, sometimes more, sometimes only 2. It is important to use tar to copy the stuff. If we replace the tar line by e.g. cp -pR /usr/src/etc/* /tmp/2/bla things are all well. The system doesn't lock up entirely, you can move the mouse and ping it but no fs access is possible anymore. One can switch to the console and enter the debugger but a reboot with ctrl-alt-del doesn't work... The interesting part is that all this worked pretty well on 9-STABLE until approx. 2 months ago. But nothing had been committed to unionfs for a long time so I really have no idea what's going on. It also reminds us of https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=161511 but this stuff had been merged to 9-STABLE already... Anything I can do to get this fixed?