Received: by 10.192.165.148 with SMTP id m20csp1334529imm; Fri, 27 Apr 2018 17:54:26 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrc1C20+XLYqKcC2Y84lAUnc84xvBgjGLdn0lzATnl/WsvX6bScGMhqv8ntIIOgW0pKUSTY X-Received: by 10.98.55.69 with SMTP id e66mr4005009pfa.253.1524876866002; Fri, 27 Apr 2018 17:54:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524876865; cv=none; d=google.com; s=arc-20160816; b=FAUogoaHZaMA3CjRx45R7wETbJJ0us4ull3dQBVPjwxkem8c8EC82jfn2bK8QkdXYw C9zTMPICSc/7/4zfklseuwGmNwqHypWcR+qCDUoP+ySIAo35WY1bfcFuAnRuwMNoFQbm qkBTaxjLt18Qxxd6aYaRc2mOK6zV3IeUMq+bNixmR6vLHIYDvaClJlFf3N1PG1LP7Ify YpwkkLcm48MMRSzrZyKunYG2AS9Mm7UlHRyh//NrsCmIpKxwoSPxgo4196odGAH9HDGe 0ac05kz3PS64rccsZvFcbMwWP8o0MJ3PUe7l6ZRNSH3JbhU1fGlUB5M9BreP48dkzVTI h9sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=w6ZGBEGWTsqcvaWCMw8aXA1pZfT86jWEkZ3e0oQBCN8=; b=dAZEhD+fFCRP4w5jpI9zv/8uCIyRq0qP1K0mRnwpRmy/V9sWyDKivkjjyyacjtfH4h NuTj/i7wcLuYVkgmGYAj71P8sabAKxawi350hatNbVMdvfBXIDS+moESLxx/reqv552Q uOpFDhabnhKzI6YT3kPUJIE5f8rikC0QKc76M4WS5y7bNcBD7TC6pqF+MkHvXBUxgiQQ Tsej4Sn1VP4tTP12UQe9/BsHngFSBCK2adG7W5S4VeNZ2WLtI/kkGFn+w4gu58T4ywIJ VeZNMPeOq1FzF9M2aphQyhcB7rvzBOd0/bSnUQUXFvAbVjYpGGbmQJXJigTYk9nASQkD Ga7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=z8zkU1M5; 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 u20si2313076pfm.70.2018.04.27.17.54.11; Fri, 27 Apr 2018 17:54:25 -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; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=z8zkU1M5; 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 S1759449AbeD1AxF (ORCPT + 99 others); Fri, 27 Apr 2018 20:53:05 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:42238 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755617AbeD1AxD (ORCPT ); Fri, 27 Apr 2018 20:53:03 -0400 Received: by mail-pf0-f195.google.com with SMTP id a11so2633614pfn.9 for ; Fri, 27 Apr 2018 17:53:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=w6ZGBEGWTsqcvaWCMw8aXA1pZfT86jWEkZ3e0oQBCN8=; b=z8zkU1M5Id3leoNN51xSbQCnXa1B9MtwdjyOZPJChyz5+guLkCMrgldYFinYTf8S/r KDvF3eGB7OSIeXy8kRQmUFRmkCjVLqZWV+nJa4ULXxDY2tpvmThvovO45wAEcGYJ0CVG sZM4841B/KFfvJW2bDS6G+QztXRO8QuxJy3MKWeDrPtFoycd7jlaWX8YnPe9Qp+bw06R 4gLE5hUEKxJ3zXn2TxKw84bXpHtx0h2l2GF2DF5/byhgWp9aC6KFgIENM9TYCze3K6NK 09ABUYwmG6UC3VdHyuZ2WVywJEYeUVylHkkT9J6U5x8XRWbhWaJ564NIjH8Qt4YwOd37 kwBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=w6ZGBEGWTsqcvaWCMw8aXA1pZfT86jWEkZ3e0oQBCN8=; b=Sexut6xK7N/drrfU0RefTxZXti6jgNUOrbGMyhpTQnBO+PLXDtJkQsnrt4A989j/Eo Is1TzkrAZGjdz74UBz5jM5d1NqP/+4b/qmBcleRKLv+jaKv6FDnwWSiLLB9Z+X6yQJDd yIMYsuARAYGosxI3LcPCnk7kb+ijkaLADJGX2EzmJ4rixud2jtiC7+549fW9B6w47m1L hiCnU0ryC5hHP+LPlSQnsbZ+U/gl1tkpW0ZbeGF9voKgyxgwLJfQ+04/5S/SLYtbzG8W +2obbUtDvd+tq2aVwi2KTLqrGcQIVjsNs3LoP8umDmSQt46cF7xT+IcJjsuUi5wHAiXT BWRw== X-Gm-Message-State: ALQs6tBdhmXLpSjoq6SgtH9QN/XJcB/PKTR749lL4H1TW+bIdJ7t1xye uU0J2rH1LSjy4xB4fbRUZ5Vpe9F3u9gJjg== X-Received: by 10.98.10.72 with SMTP id s69mr4040263pfi.134.1524876782545; Fri, 27 Apr 2018 17:53:02 -0700 (PDT) Received: from ?IPv6:2600:380:7617:99a7:f9f3:fac3:8411:734c? ([2600:380:7617:99a7:f9f3:fac3:8411:734c]) by smtp.gmail.com with ESMTPSA id p86sm4933176pfi.148.2018.04.27.17.52.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Apr 2018 17:53:00 -0700 (PDT) Subject: Re: ed74ae0342 ("blk-mq: Avoid that a completion can be ignored .."): BUG: kernel hang in test stage To: kernel test robot , Bart Van Assche Cc: LKP , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, wfg@linux.intel.com References: <5adf9ada.EgNO094GdvSdHQ3v%lkp@intel.com> From: Jens Axboe Message-ID: <07256b82-12b1-9ccf-c660-9dfbedfd3cac@kernel.dk> Date: Fri, 27 Apr 2018 18:52:58 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <5adf9ada.EgNO094GdvSdHQ3v%lkp@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/24/18 3:00 PM, kernel test robot wrote: > Greetings, > > 0day kernel testing robot got the below dmesg and the first bad commit is > > https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-linus > > commit ed74ae03424684a6ad8a973c3fa727c6b4162432 > Author: Bart Van Assche > AuthorDate: Thu Apr 19 09:43:53 2018 -0700 > Commit: Jens Axboe > CommitDate: Thu Apr 19 14:21:47 2018 -0600 > > blk-mq: Avoid that a completion can be ignored for BLK_EH_RESET_TIMER > > The blk-mq timeout handling code ignores completions that occur after > blk_mq_check_expired() has been called and before blk_mq_rq_timed_out() > has reset rq->aborted_gstate. If a block driver timeout handler always > returns BLK_EH_RESET_TIMER then the result will be that the request > never terminates. > > Fix this race as follows: > - Use the deadline instead of the request generation to detect whether > or not a request timer fired after reinitialization of a request. > - Store the request state in the lowest two bits of the deadline instead > of the lowest two bits of 'gstate'. > - Rename MQ_RQ_STATE_MASK into RQ_STATE_MASK and change it from an > enumeration member into a #define such that its type can be changed > into unsigned long. That allows to write & ~RQ_STATE_MASK instead of > ~(unsigned long)RQ_STATE_MASK. > - Remove all request member variables that became superfluous due to > this change: gstate, gstate_seq and aborted_gstate_sync. > - Remove the request state information that became superfluous due to this > patch, namely RQF_MQ_TIMEOUT_EXPIRED. > - Remove the code that became superfluous due to this change, namely > the RCU lock and unlock statements in blk_mq_complete_request() and > also the synchronize_rcu() call in the timeout handler. Any chance you can try with the newer version? https://github.com/bvanassche/linux/commit/4acd555fa13087 -- Jens Axboe