public inbox for [email protected]
 help / color / mirror / Atom feed
From: Florian Fischer <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Cc: [email protected]
Subject: Re: Tasks stuck on exit(2) with 5.15.6
Date: Fri, 3 Dec 2021 12:52:51 +0100	[thread overview]
Message-ID: <20211203115251.nbwzvwokyg4w3b34@pasture> (raw)
In-Reply-To: <[email protected]>

Hi Jens, 

> Thanks for the bug report, and I really appreciate including a reproducer.
> Makes everything so much easier to debug.

Glad I could help :)

> Are you able to compile your own kernels? Would be great if you can try
> and apply this one on top of 5.15.6.
> 
> 
> diff --git a/fs/io-wq.c b/fs/io-wq.c
> index 8c6131565754..e8f77903d775 100644
> --- a/fs/io-wq.c
> +++ b/fs/io-wq.c
> @@ -711,6 +711,13 @@ static bool io_wq_work_match_all(struct io_wq_work *work, void *data)
>  
>  static inline bool io_should_retry_thread(long err)
>  {
> +	/*
> +	 * Prevent perpetual task_work retry, if the task (or its group) is
> +	 * exiting.
> +	 */
> +	if (fatal_signal_pending(current))
> +		return false;
> +
>  	switch (err) {
>  	case -EAGAIN:
>  	case -ERESTARTSYS:

With your patch on top of 5.15.6 I can no longer reproduce stuck processes.
Neither with our software nor with the reproducer.
I ran both a hundred times and both terminated immediately without unexpected CPU usage.

Tested-by: Florian Fischer <[email protected]>

Florian Fischer

  reply	other threads:[~2021-12-03 11:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02 16:56 Tasks stuck on exit(2) with 5.15.6 Florian Fischer
2021-12-03  0:49 ` Jens Axboe
2021-12-03 11:52   ` Florian Fischer [this message]
2021-12-03 13:34     ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211203115251.nbwzvwokyg4w3b34@pasture \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox