From owner-freebsd-fs@freebsd.org Wed Jun 5 18:58:36 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C658B15B5E87 for ; Wed, 5 Jun 2019 18:58:35 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3B7408EB11; Wed, 5 Jun 2019 18:58:35 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lj1-x22a.google.com with SMTP id i21so9576995ljj.3; Wed, 05 Jun 2019 11:58:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+dFkNh7uYGL1WETmgWOey18o2r+KPP7CdUs6kFuy7HA=; b=tMqBgOdqrakrueEx6Nhj2zgivdtVPqByuJWPmGCDmBSRABEOfu2Ou1sVVOavPww9/T sBwIBN2SYG4zMLmRwRGtDcfeiqxSDE+jDRuQEoNdBiEOUDttRtgY/KE5K1bEME0w2Oi9 y86AkCAMTgkaHEUGAqlmA6v8lKzfGzIDFkuFMyFqStAqV2sbI+X/3BSIDjsbxdnYzR0f S8aKken9/lwUery3k48MEmdY1Glj8NkNZgsiU7ticA9JCf5Tlv1oJhd70YTm2EQg9HqJ ePEo5WuhuuuhmtRL8oN1zbK7q+LVFBLODZUJuSr6VI2LKduvPI/jIXjs9zkf2x39Yvyy UHgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+dFkNh7uYGL1WETmgWOey18o2r+KPP7CdUs6kFuy7HA=; b=dCzgn1pxlXc03+fyyMcev8ryFfu09mq2WOi1nig1hsV17FcDN3u1uXqE/pE91fB8qC lxswwjoIlNFOv3gdCuHZfk6Ql/fM/mdY+ntKe3dJEvO2mMrVQDlXUw3xz0Zyz7FzJeBh 2IIkcPjTC0eEKWGdrXnD1O4IQRo/gOY7UusiTMqjPnwhR3IjDvBEzsMPDmFRGpj/cMy9 Ry1sFkx/F1FTO0QPQEbW1AETeRyq0drGtnxPZhRKnAIlAmefu/Zydb1FZ/g7I0tNHZf6 E8Q0IOYVB8XiyJb0i9qzpaN0DxHCei8CuJsgA75dw2u9PWOabUexCn/HbiJBF4dOo3z9 6ydg== X-Gm-Message-State: APjAAAVpTnsRh2xgXJippjKx5xIDt2pB9bNpjsAs2WW75zqiM2vnnRVc viIfQFnFIe1aZy62K+7sIpUBhp63W0shsSB9xSI= X-Google-Smtp-Source: APXvYqy00Vksj48w6OiAcXFH0xwQmOJ7YPKtStEcjxXOr39WPZddRtCxgNOaZwG7Rk9lIor6XyroYh+O9qaxn1hOVp8= X-Received: by 2002:a2e:63d1:: with SMTP id s78mr22097181lje.166.1559761113612; Wed, 05 Jun 2019 11:58:33 -0700 (PDT) MIME-Version: 1.0 References: <20190605180552.GX75280@kib.kiev.ua> In-Reply-To: <20190605180552.GX75280@kib.kiev.ua> From: alan somers Date: Wed, 5 Jun 2019 12:58:21 -0600 Message-ID: Subject: Re: Regression test for vn_io_fault To: Konstantin Belousov Cc: Alan Somers , freebsd-fs X-Rspamd-Queue-Id: 3B7408EB11 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.93)[-0.932,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jun 2019 18:58:36 -0000 Thanks for the link. But I can't tell what the expected failure mode is. Is it supposed to run until it deadlocks? My idea is to rely on witness. It would just run once, and then query witness to see if there was a LOR. -Alan On Wed, Jun 5, 2019, 12:06 PM Konstantin Belousov wrote: > On Wed, Jun 05, 2019 at 10:29:35AM -0600, Alan Somers wrote: > > r236321 added vn_io_fault(), a mechanism for avoiding lock order > > reversals when a process reads from one file into a mmap()ed buffer > > backed by another file. From the description in the comments of > > vn_io_fault() it seems like it would be possible to write a reliable > > test that would trigger the LOR. But I can't find any evidence in > > svn, or bugzilla of such a test program. None in Phabricator either, > > which probably wasn't even running when that commit was made. Did > > anybody ever write a test program? If so, I volunteer to ATFify it. > The test program is in tools/test/upsdl. I object against removing > non-atf version on principle, atf tests are not debuggable. Also this is > racing test, so it is not as simple as doing N runs where N is fixed. > > Anyway, test for the ups@ race is included into stress2, where it belongs. >