Re: [6.5-rc5 regression] core dump hangs (was Re: [Bug report] fstests generic/051 (on xfs) hang on latest linux v6.5-rc5+)

From: Jens Axboe
Date: Mon Jun 12 2023 - 12:45:14 EST


On 6/12/23 10:42?AM, Linus Torvalds wrote:
> On Mon, Jun 12, 2023 at 9:38?AM Jens Axboe <axboe@xxxxxxxxx> wrote:
>>
>> Quick peek would suggest that it's because io-wq clears PF_IO_WORKER on
>> exit, and now we fail the check in coredump_task_exit() that was added.
>
> Oh, that makes sense.
>
> Well, it makes sense for the bug, but that whole
>
> preempt_disable();
> current->flags &= ~PF_IO_WORKER;
> preempt_enable();
>
> thin in io_worker_exit() does *not* make sense to me.
>
> Does removing those three lines make things "JustWork(tm)"?

You snipped the suspicion in my reply on why that exists, to avoid
io_wq_worker_sleeping() triggering. But arguably this should be covered
by the RUNNING flag. I'll poke at it shortly, and yeah then we should
just remove the PF_IO_WORKER clearing.

Or maybe I'm just smoking crack and it's no longer needed at all. Will
test and send a patch.

--
Jens Axboe