Re: [Linux kernel bug] INFO: task hung in blk_mq_get_tag

From: Tetsuo Handa
Date: Wed May 15 2024 - 07:07:07 EST


On 2024/05/15 7:41, Hillf Danton wrote:
> On Tue, 14 May 2024 20:07:34 +0800 Sam Sun <samsun1006219@xxxxxxxxx>
>>
>> I tried to run
>>
>> # echo 0 > /proc/sys/kernel/hung_task_all_cpu_backtrace
>>
>> before running the reproducer, the kernel stops panic. But still, even
>> if I terminate the execution of the reproducer, kernel continues
>> dumping task hung logs. After setting bung_task_all_cpu_backtrace back
>> to 1, it panic immediately during next dump. So I guess it is still a
>> task hung instead of general protection fault.
>
> Given kworker/u10:2:53 blocked for more than 143 seconds, or the subject
> line, how could it trigger gpf?

Since CONFIG_CMDLINE in the attached config file includes sysctl.kernel.hung_task_all_cpu_backtrace=1 ,
khungtaskd calls trigger_all_cpu_backtrace() when a hung task is detected.

trigger_all_cpu_backtrace() is expected to be safe, but there seems a bug
which is triggering a general protection fault.