From: David Laight <david.laight.linux@gmail.com>
To: Alexander Monakov <amonakov@ispras.ru>
Cc: Theodore Ts'o <tytso@mit.edu>, Al Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
linux-kernel@vger.kernel.org
Subject: Re: ETXTBSY window in __fput
Date: Sun, 31 Aug 2025 20:22:44 +0100 [thread overview]
Message-ID: <20250831202244.290823f2@pumpkin> (raw)
In-Reply-To: <6d37ce87-e6bf-bd3e-81a9-70fdf08b9c4c@ispras.ru>
On Wed, 27 Aug 2025 16:05:51 +0300 (MSK)
Alexander Monakov <amonakov@ispras.ru> wrote:
> On Wed, 27 Aug 2025, Theodore Ts'o wrote:
>
> > On Wed, Aug 27, 2025 at 10:22:14AM +0300, Alexander Monakov wrote:
> > >
> > > On Tue, 26 Aug 2025, Al Viro wrote:
> > >
> > > > Egads... Let me get it straight - you have a bunch of threads sharing descriptor
> > > > tables and some of them are forking (or cloning without shared descriptor tables)
> > > > while that is going on?
> > >
> > > I suppose if they could start a new process in a more straightforward manner,
> > > they would. But you cannot start a new process without fork. Anyway, I'm but
> > > a messenger here: the problem has been hit by various people in the Go community
> > > (and by Go team itself, at least twice). Here I'm asking about a potential
> > > shortcoming in __fput that exacerbates the problem.
> >
> > I'm assuming that the problem is showing up in real life when users
> > run a go problem using "go run" where the golang compiler freshly
> > writes the executable, and then fork/exec's the binary. And using
> > multiple threads sharing descriptor tables was just to make a reliable
> > reproducer?
>
> You need at least two threads: while one thread does open-write-close-fork,
> there needs to be another thread that forks concurrently with the write.
Is this made worse by the code that defers fput to a worker thread?
(or am I misremembering things again?)
David
>
> Alexander
>
next prev parent reply other threads:[~2025-08-31 19:22 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-26 21:05 ETXTBSY window in __fput Alexander Monakov
2025-08-26 22:00 ` Al Viro
2025-08-27 7:22 ` Alexander Monakov
2025-08-27 11:52 ` Theodore Ts'o
2025-08-27 13:05 ` Alexander Monakov
2025-08-31 19:22 ` David Laight [this message]
2025-09-01 8:44 ` Jan Kara
2025-08-27 13:16 ` Aleksa Sarai
2025-08-27 14:29 ` Alexander Monakov
2025-08-29 7:21 ` Alexander Monakov
2025-08-29 9:47 ` Christian Brauner
2025-08-29 10:17 ` Alexander Monakov
2025-08-29 11:07 ` Christian Brauner
2025-08-29 11:45 ` Alexander Monakov
2025-08-29 14:02 ` Jan Kara
2025-09-01 17:53 ` Alexander Monakov
2025-09-02 10:36 ` Jan Kara
2025-08-29 18:32 ` Colin Walters
2025-09-01 18:39 ` Mateusz Guzik
2025-09-01 19:57 ` Colin Walters
2025-09-01 20:22 ` Mateusz Guzik
2025-09-02 8:33 ` Christian Brauner
2025-09-02 8:44 ` Mateusz Guzik
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=20250831202244.290823f2@pumpkin \
--to=david.laight.linux@gmail.com \
--cc=amonakov@ispras.ru \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/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