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(). ¯\_(ツ)_/¯
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#191354):
https://lists.openembedded.org/g/openembedded-core/message/191354
Mute This Topic: https://lists.openembedded.org/mt/102826186/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-