All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Böszörményi Zoltán" <zboszor@gmail.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
	Martin Jansa <martin.jansa@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] bitbake-server does not exit after build ends
Date: Tue, 28 Nov 2023 11:31:16 +0100	[thread overview]
Message-ID: <d1479bd9-163c-4958-b1e2-6eb066fbe41a@gmail.com> (raw)
In-Reply-To: <ab819301dbf2bf4a669dfdbd937b21f0c7ec719c.camel@linuxfoundation.org>

2023. 11. 28. 11:00 keltezéssel, Richard Purdie írta:
> On Tue, 2023-11-28 at 10:26 +0100, Böszörményi Zoltán wrote:
>> So it's not just Fedora, but Python 3.12 in general.
>>
>> Googling for problem with threads + fork reveals that
>> it is indeed an issue even in C / POSIX: only the thread
>> executing fork() will become part of the new process,
>> but not the main process starting the thread or any
>> other threads from the original process.
>>
>> The warning is justified, and apparently the issue
>> not occurring in bitbake with previous Python versions
>> is pure luck.
> I'm not sure that is entirely true/fair.

Maybe not fair. Still, true. See this piece:

http://www.doublersolutions.com/docs/dce/osfdocs/htmls/develop/appdev/Appde193.htm

Other discussions, like this one confirm the same:
https://stackoverflow.com/questions/39890363/what-happens-when-a-thread-forks

>   The way bitbake has executed
> processes and handled threads was very carefully written deliberately
> to avoid some of these kinds of issues so it wasn't "pure luck". What I
> don't know is what changed in 3.12 to mean this now is potentially
> breaking.

The warning only occurs if os.fork() is called when
there are already Python threads.

I guess the general performance uplift in Python 3.12
can trigger a pre-existing issue in bitbake more easily.

It is entirely possible that the threads bitbake creates do not
exist yet with Python 3.11 and earlier at the time of executing
os.fork(). ¯\_(ツ)_/¯



  parent reply	other threads:[~2023-11-28 10:31 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-27  9:52 bitbake-server does not exit after build ends Böszörményi Zoltán
2023-11-27 10:41 ` [OE-core] " Alexander Kanavin
2023-11-27 10:52 ` Richard Purdie
2023-11-27 11:29   ` Böszörményi Zoltán
2023-11-27 13:14     ` Martin Jansa
2023-11-28  9:26       ` Böszörményi Zoltán
2023-11-28 10:00         ` Richard Purdie
2023-11-28 10:02           ` Alexander Kanavin
2023-11-28 10:31           ` Böszörményi Zoltán [this message]
2023-11-28 14:50             ` Alexander Kanavin
2023-11-29  8:51               ` Böszörményi Zoltán
2023-12-21 18:47         ` Randy MacLeod
2023-12-21 18:56           ` Martin Jansa
2023-12-21 23:06             ` Randy MacLeod
2023-12-31 10:03               ` Alexander Kanavin
2024-01-05 16:05                 ` Martin Jansa
     [not found]                 ` <17A77F200F38338C.25044@lists.openembedded.org>
2024-01-05 16:54                   ` Martin Jansa
2024-01-05 17:01                     ` Steve Sakoman
2024-01-05 17:14                     ` Joshua Watt
     [not found]                     ` <17A7822E21CAE9E6.25044@lists.openembedded.org>
2024-01-06  2:20                       ` Steve Sakoman
2024-01-08 15:15                     ` Böszörményi Zoltán
     [not found] <179B721D67836847.32091@lists.openembedded.org>
2023-11-27  9:56 ` Böszörményi Zoltán

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=d1479bd9-163c-4958-b1e2-6eb066fbe41a@gmail.com \
    --to=zboszor@gmail.com \
    --cc=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.