IO-Uring Archive mirror
 help / color / mirror / Atom feed
From: Andrew Udvare <audvare@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, Christian Heusel <christian@heusel.eu>
Cc: regressions@lists.linux.dev, io-uring <io-uring@vger.kernel.org>
Subject: Re: [REGRESSION] ETXTBSY when running Yarn (Node) since af5d68f
Date: Tue, 21 May 2024 15:30:23 -0400	[thread overview]
Message-ID: <5a1649cb-2711-4767-8313-0f6bfe0e4cd7@gmail.com> (raw)
In-Reply-To: <0ec1d936-ee3f-4df2-84df-51c15830091b@kernel.dk>


[-- Attachment #1.1: Type: text/plain, Size: 1374 bytes --]

On 21/05/2024 14:29, Jens Axboe wrote:
> On 5/21/24 12:25 PM, Jens Axboe wrote:
>> Outside of that, only other thing I can think of is that the final
>> close would be punted to task_work by fput(), which means there's also
>> a dependency on the task having run its kernel task_work before it's
>> fully closed.
> 
> Yep I think that's it, the below should fix it.
> 
> 
> diff --git a/io_uring/sqpoll.c b/io_uring/sqpoll.c
> index 554c7212aa46..68a3e3290411 100644
> --- a/io_uring/sqpoll.c
> +++ b/io_uring/sqpoll.c
> @@ -241,6 +241,8 @@ static unsigned int io_sq_tw(struct llist_node **retry_list, int max_entries)
>   			return count;
>   		max_entries -= count;
>   	}
> +	if (task_work_pending(current))
> +		task_work_run();
>   
>   	*retry_list = tctx_task_work_run(tctx, max_entries, &count);
>   	return count;
> 

This patch works for me on 6.9.1.

  $ yarn
yarn install v1.22.22
warning package.json: "test" is also the name of a node core module
info No lockfile found.
warning test@1.0.0: "test" is also the name of a node core module
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 3.32s.

  $ uname -a
Linux limelight 6.9.1-gentoo-limelight #2 SMP PREEMPT_DYNAMIC TKG Tue 
May 21 15:21:33 EDT 2024

--
Andrew

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  parent reply	other threads:[~2024-05-21 19:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <313824bc-799d-414f-96b7-e6de57c7e21d@gmail.com>
2024-05-21 16:16 ` [REGRESSION] ETXTBSY when running Yarn (Node) since af5d68f Jens Axboe
2024-05-21 16:22   ` Jens Axboe
2024-05-21 18:17     ` Christian Heusel
2024-05-21 18:25       ` Jens Axboe
2024-05-21 18:29         ` Jens Axboe
2024-05-21 19:05           ` Jens Axboe
2024-05-21 19:07           ` Christian Heusel
2024-05-21 19:11             ` Jens Axboe
2024-05-21 19:30           ` Andrew Udvare [this message]
2024-05-21 19:32             ` Jens Axboe
2024-05-21 19:33           ` Andrew Udvare
2024-05-21 19:36             ` 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=5a1649cb-2711-4767-8313-0f6bfe0e4cd7@gmail.com \
    --to=audvare@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=christian@heusel.eu \
    --cc=io-uring@vger.kernel.org \
    --cc=regressions@lists.linux.dev \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).