Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2067330imm; Fri, 7 Sep 2018 10:17:04 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda5TG6677meTeBES6JgrLf3LG6mytT7eEyhKGpbfLThGk7hpd0WSRiUeQUt9Yn1q5gB59zy X-Received: by 2002:a62:778c:: with SMTP id s134-v6mr9627258pfc.189.1536340624661; Fri, 07 Sep 2018 10:17:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536340624; cv=none; d=google.com; s=arc-20160816; b=X6IwkI37iGlEFbtvRZVvgUyVhsOuGf3j3s/OcJiFUvkYKQNc/AunwC1/imq8axWYgW jGUpXZbQ0eie7u8liNdtsvMPJyYk+mt/TGBVpnvejiXfYY56aiL0uQAKF9QmFkrvAtTk 1CkyRN+mitWqzuRDrZeQMS+diLK6c+sEYMvkrWKjp24Cc0NX7caY8y2VLTsEDLrMitl4 r6gCgq3KoZq1stRtSZFoRIwZsga/ORxEVzPWHftv+E9MgR6gsUNZXFMqdWGRmvsDmBjs 9xDz4g/+qvXX9BOQ2szaNtQk12FHx2rYgOXNr9zjTtWdR4Kd/tqcwi5peEdKVMAw0enz nlZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:cc:to:from :date; bh=Uta+ADjcbJT3sxVMnugT8iP59g2req3x7nH0qO88MO8=; b=I7VF+MTFfwmWGchgaYJQlJZXkAwlj3paugOu9DzSqFVrcUt7DuOzpWFeTO5lZ994K5 OMxp97Qo4JwrDNV5eXgnO8P0r38zMYcjlEoV2qokWxj/s3bWFi+9PRsRnSEm7EjD8yoH jGTHwBT8GfH4pb5ebVgQ6DxmdS57XTtT4PwVKX1kzw5xsueHIeCfiIDjjhNLDKARewHO WAiPhVDgK4xcN/vu/K1WPi1mi5KkhfT7BIOwPXJy7qPR7r537ieufSwnbhyGHcALtubP CskTIM2o51D+kWq5nTsspRMHwicAoDfAnonu0SZ25szsWhfV2Has1ow5yJAH418LruqM lrTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5-v6si9526762pgt.361.2018.09.07.10.16.49; Fri, 07 Sep 2018 10:17:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727597AbeIGV47 (ORCPT + 99 others); Fri, 7 Sep 2018 17:56:59 -0400 Received: from mail.CARNet.hr ([161.53.123.6]:40275 "EHLO mail.carnet.hr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726370AbeIGV47 (ORCPT ); Fri, 7 Sep 2018 17:56:59 -0400 Received: from [2001:b68:ff:12::131] (port=50902 helo=gavran.carpriv.carnet.hr) by mail.carnet.hr with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fyKLT-0005UR-Ub; Fri, 07 Sep 2018 19:15:00 +0200 Received: by gavran.carpriv.carnet.hr (Postfix, from userid 1000) id C4B75202E0; Fri, 7 Sep 2018 19:14:59 +0200 (CEST) Date: Fri, 7 Sep 2018 19:14:59 +0200 From: Valentin Vidic To: drbd-user@lists.linbit.com Cc: Jens Axboe , Konrad Rzeszutek Wilk , linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-block@vger.kernel.org, xen-devel@lists.xenproject.org, Roger Pau =?iso-8859-1?Q?Monn=E9?= Message-ID: <20180907171459.GO26705@gavran.carpriv.carnet.hr> References: <20180829065214.23546-1-Valentin.Vidic@CARNet.hr> <20180905103649.edugijsjx4v2fbxd@mac.bytemobile.com> <20180905162756.GA26705@gavran.carpriv.carnet.hr> <20180907120337.GB11834@soda.linbit> <20180907121348.GM26705@gavran.carpriv.carnet.hr> <20180907132828.GC11834@soda.linbit> <20180907164500.GN26705@gavran.carpriv.carnet.hr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180907164500.GN26705@gavran.carpriv.carnet.hr> User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:b68:ff:12::131 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on rigel.CARNet.hr X-Spam-Level: X-Spam-Status: No, score=-2.9 required=10.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.2 Subject: Re: [DRBD-user] [PATCH] xen-blkback: Switch to closed state after releasing the backing device X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 07, 2018 at 06:45:00PM +0200, Valentin Vidic wrote: > Adding a dump_stack in drbd_release gives two possible code paths, > both from xen_blkback and the first one from workqueue being the > problematic one: In fact the first one is the original code path before I modified blkback. The problem is it gets executed async from workqueue so it might not always run before the call to drbdadm secondary. > [ 530.698782] CPU: 0 PID: 4 Comm: kworker/0:0 Tainted: G O 4.9.0-8-amd64 #1 Debian 4.9.110-3+deb9u4 > [ 530.698783] Hardware name: HP ProLiant BL460c Gen9, BIOS I36 09/12/2016 > [ 530.698784] Workqueue: events xen_blkif_deferred_free [xen_blkback] > [ 530.698785] 0000000000000000 ffffffff81331e54 ffff883f82143800 ffff883f741b5660 > [ 530.698787] ffffffffc03a309e ffff883f741b5580 ffffffff81245ca8 0000000281a186b5 > [ 530.698789] 000000008935f100 8412ffa31a64cc4c 000000000000020a ffff883fa6218280 > [ 530.698791] Call Trace: > [ 530.698792] [] ? dump_stack+0x5c/0x78 > [ 530.698805] [] ? drbd_release+0x1e/0x40 [drbd] > [ 530.698810] [] ? __blkdev_put+0x1e8/0x2a0 > [ 530.698813] [] ? xen_vbd_free.isra.9+0x48/0x60 [xen_blkback] > [ 530.698814] [] ? xen_blkif_deferred_free+0x27/0x70 [xen_blkback] > [ 530.698816] [] ? process_one_work+0x18a/0x420 > [ 530.698817] [] ? worker_thread+0x4d/0x490 > [ 530.698818] [] ? process_one_work+0x420/0x420 > [ 530.698820] [] ? kthread+0xd9/0xf0 > [ 530.698822] [] ? kthread_park+0x60/0x60 > [ 530.698823] [] ? ret_from_fork+0x57/0x70 -- Valentin