Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3648287ybp; Sun, 13 Oct 2019 11:12:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqyjb7/etLvWY5wdEzZQg5nayYgkY/vtvCGiRArYI/AmsrBKNZt7Bv3m3wB1W5VcTd4sk2ci X-Received: by 2002:a17:906:b245:: with SMTP id ce5mr24863545ejb.52.1570990324099; Sun, 13 Oct 2019 11:12:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570990324; cv=none; d=google.com; s=arc-20160816; b=LQpDGSs3S3OzUILPjeqEi9kINVfXM+WUv66unrtOLKuuR50DR07RMXrOQ9o6+xrc5Y 4usi+w1RxWZRdSJnsSbL56E8Ajx0pSLErfNQ3sAd6alfy5rX660qyjWYLWMg8ePhzDlH odIuzYGllXPkPp1zPUDLV43CXJ4rrR+DdH+dflWRpFJzr120D5HB7fDMfBcgw6irrgcK qvvVuzTmpFgjwJ1y2m4traQ2FGKV/qwX0nD4T5q44tuDzumqS3KnPFDWxISCCPtA59XJ 6/J+EakW6ui6BLpNF+7rSE92MEMWeLPHyIEbJ5/wy5urTZ/SO/SiFwTvjKakmPdrc6Pu Hkjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=8h+eu/mwmcfCsGSK1LEiQGyhYzavo+83TCypijowb9M=; b=i0QQLrk7k6HVFKj9uZCsaFF1ENfgQEP5JbI1mBScOAD8ZRDgK7I2SgZ00lI0lvkLZc /Iz3zT3U4L64HChRS+CmvOV/XXX14iXhYCV4SZaShf1CnzifFLCF00ooEB21nYIUnbSA tH+wPUb8taUGObV/orYzE/A9OXHNWTAOfb4c+CW+ULGseu01m56V6LTt6nsmdK9yFfID eKvpZwmaWLCk97z8CgQVOhi9NJaIG48+LU0X07KavAIwnc6q0fHpttGuDWL83hGJZsna lhZI+FoxdkNaVOyKV6jRXxmgvoPdmlRPOExWtgtXzQ5BLj7/pF6AO5mfGnGKeB43V98b AaQw== 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 u30si10525769edl.366.2019.10.13.11.11.40; Sun, 13 Oct 2019 11:12: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 S1728777AbfJMSLh (ORCPT + 99 others); Sun, 13 Oct 2019 14:11:37 -0400 Received: from vsmx012.vodafonemail.xion.oxcs.net ([153.92.174.90]:21364 "EHLO vsmx012.vodafonemail.xion.oxcs.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727141AbfJMSLh (ORCPT ); Sun, 13 Oct 2019 14:11:37 -0400 Received: from vsmx004.vodafonemail.xion.oxcs.net (unknown [192.168.75.198]) by mta-8-out.mta.xion.oxcs.net (Postfix) with ESMTP id 60551F34EB2; Sun, 13 Oct 2019 18:11:33 +0000 (UTC) Received: from lazy.lzy (unknown [93.212.126.195]) by mta-8-out.mta.xion.oxcs.net (Postfix) with ESMTPA id A68DE19AD8B; Sun, 13 Oct 2019 18:11:18 +0000 (UTC) Received: from lazy.lzy (localhost [127.0.0.1]) by lazy.lzy (8.15.2/8.14.5) with ESMTPS id x9DIBGb8003897 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 13 Oct 2019 20:11:16 +0200 Received: (from red@localhost) by lazy.lzy (8.15.2/8.15.2/Submit) id x9DIBG8h003896; Sun, 13 Oct 2019 20:11:16 +0200 Date: Sun, 13 Oct 2019 20:11:16 +0200 From: Piergiorgio Sartor To: Piergiorgio Sartor Cc: Alan Stern , Christoph Hellwig , Jens Axboe , USB list , linux-block@vger.kernel.org, Kernel development list Subject: Re: reeze while write on external usb 3.0 hard disk [Bug 204095] Message-ID: <20191013181116.GA3858@lazy.lzy> References: <20190929201332.GA3099@lazy.lzy> <20190930182501.GA4043@lazy.lzy> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190930182501.GA4043@lazy.lzy> User-Agent: Mutt/1.12.1 (2019-06-15) X-VADE-STATUS: LEGIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 30, 2019 at 08:25:01PM +0200, Piergiorgio Sartor wrote: > On Sun, Sep 29, 2019 at 09:01:48PM -0400, Alan Stern wrote: > > On Sun, 29 Sep 2019, Piergiorgio Sartor wrote: > > > > > On Wed, Sep 25, 2019 at 02:31:58PM -0400, Alan Stern wrote: > > > > On Wed, 25 Sep 2019, Piergiorgio Sartor wrote: > > > > > > > > > On Mon, Aug 26, 2019 at 07:38:33PM +0200, Piergiorgio Sartor wrote: > > > > > > On Tue, Aug 20, 2019 at 06:37:22PM +0200, Piergiorgio Sartor wrote: > > > > > > > On Tue, Aug 20, 2019 at 09:23:26AM +0200, Christoph Hellwig wrote: > > > > > > > > On Mon, Aug 19, 2019 at 10:14:25AM -0400, Alan Stern wrote: > > > > > > > > > Let's bring this to the attention of some more people. > > > > > > > > > > > > > > > > > > It looks like the bug that was supposed to be fixed by commit > > > > > > > > > d74ffae8b8dd ("usb-storage: Add a limitation for > > > > > > > > > blk_queue_max_hw_sectors()"), which is part of 5.2.5, but apparently > > > > > > > > > the bug still occurs. > > > > > > > > > > > > > > > > Piergiorgio, > > > > > > > > > > > > > > > > can you dump the content of max_hw_sectors_kb file for your USB storage > > > > > > > > device and send that to this thread? > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > for both kernels, 5.1.20 (working) and 5.2.8 (not working), > > > > > > > the content of /sys/dev/x:y/queue/max_hw_sectors_kb is 512 > > > > > > > for USB storage devices (2.0 and 3.0). > > > > > > > > > > > > > > This is for the PC showing the issue. > > > > > > > > > > > > > > In an other PC, which does not show the issus at the moment, > > > > > > > the values are 120, for USB2.0, and 256, for USB3.0. > > > > > > One thing you can try is git bisect from 5.1.20 (or maybe just 5.1.0) > > > > to 5.2.8. If you can identify a particular commit which caused the > > > > problem to start, that would help. > > > > > > OK, I tried a bisect (2 days compilations...). > > > Assuming I've done everything correctly (how to > > > test this? How to remove the guilty patch?), this > > > was the result: > > > > > > 09324d32d2a0843e66652a087da6f77924358e62 is the first bad commit > > > commit 09324d32d2a0843e66652a087da6f77924358e62 > > > Author: Christoph Hellwig > > > Date: Tue May 21 09:01:41 2019 +0200 > > > > > > block: force an unlimited segment size on queues with a virt boundary > > > > > > We currently fail to update the front/back segment size in the bio when > > > deciding to allow an otherwise gappy segement to a device with a > > > virt boundary. The reason why this did not cause problems is that > > > devices with a virt boundary fundamentally don't use segments as we > > > know it and thus don't care. Make that assumption formal by forcing > > > an unlimited segement size in this case. > > > > > > Fixes: f6970f83ef79 ("block: don't check if adjacent bvecs in one bio can be mergeable") > > > Signed-off-by: Christoph Hellwig > > > Reviewed-by: Ming Lei > > > Reviewed-by: Hannes Reinecke > > > Signed-off-by: Jens Axboe > > > > > > :040000 040000 57ba04a02f948022c0f6ba24bfa36f3b565b2440 8c925f71ce75042529c001bf244b30565d19ebf3 M block > > > > > > What to do now? > > > > Here's how to verify that the bisection got a correct result. First, > > do a git checkout of commit 09324d32d2a0, build the kernel, and make > > sure that it exhibits the problem. > > > > Next, have git write out the contents of that commit in the form of a > > patch (git show commit-id >patchfile), and revert it (git apply -R > > patchfile). Build the kernel from that tree, and make sure that it > > does not exhibit the problem. If it doesn't, you have definitely shown > > that this commit is the cause (or at least, is _one_ of the causes). > > I tried as suggested, i.e. jumping to commit > 09324d32d2a0843e66652a087da6f77924358e62, testing, > removing the patch, testing. > The result was as expected. > I was able to reproduce the issue with the commit, > I was not able to reproduce it without. > It seems this patch / commit is causing the problem. > Directly or indirectly. > > What are the next steps? Hi all, I tested kernel 5.3.5 (Fedora kernel-5.3.5-200.fc30.x86_64), with same problematic results. Again, what should be done now? Could you please revert the patch? Or is there something else to check? Thanks, bye, -- piergiorgio