Resets during user commands leads to hung task and controller stuck in connecting

Jonathan Derrick jonathan.derrick at linux.dev
Mon Nov 14 15:09:08 PST 2022



On 11/13/2022 4:03 AM, Sagi Grimberg wrote:
> 
> 
> On 11/11/22 23:50, Jonathan Derrick wrote:
>> Hi,
>>
>> I'm (again) seeing a hung task when doing resets and formats simultaneously.
>> Controller state is left in 'connecting'
>>
>> Using nvme.git/nvme-6.2 as of 'nvme: implement the DEAC bit for the Write Zeroes command',
>> but I have also repro'd with Christoph's latest reset/probe-split set
>>
>>
>> ctrl="nvme0"
>> nsid=1
>> pci="/sys/block/${ctrl}n${nsid}/device/"
>> echo 30 > /proc/sys/kernel/hung_task_timeout_secs
>> while true; do
>>          nvme format -f /dev/${ctrl}n${nsid} &
> 
> How long to it take the format to complete?
Well it's pretty immediate but I'm under the impression that the
nvme_dev_disable path leads to CC_EN disabling, interrupting any formats

> 
>>          echo 1 > $pci/reset_controller &
>> done
> 
> What happens if you set io_timeout to 20 instead of 30? (given
> that you bound hung tasks at 30 seconds...
It occurs with the standard 120s task timeout too
Also there's no I/O occurring at the moment; just admin work

I added a blktests for this:
http://lists.infradead.org/pipermail/linux-nvme/2022-November/036475.html



More information about the Linux-nvme mailing list