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.

2023. 11. 27. 14:14 keltezéssel, Martin Jansa írta:
I can confirm the same on gentoo with python-3.12.

On Mon, Nov 27, 2023 at 12:29 PM Zoltan Boszormenyi <[email protected]> wrote:

    2023. 11. 27. 11:52 keltezéssel, Richard Purdie írta:
    > Is there anything interesting in the bitbake-cookerdaemon.log file?

    Actually, yes.

    This is obviously the most suspicious:

    /usr/lib64/python3.12/multiprocessing/popen_fork.py:66: DeprecationWarning: 
This
    process
    (pid=1605202) is multi-threaded, use of fork() may lead to deadlocks in the 
child.
       self.pid = os.fork()
    /home/zozo/test-yocto-4.3/bitbake/bin/bitbake-worker:210: 
DeprecationWarning: This
    process
    (pid=1605590) is multi-threaded, use of fork() may lead to deadlocks in the 
child.
       pid = os.fork()
    /home/zozo/test-yocto-4.3/bitbake/bin/bitbake-worker:210: 
DeprecationWarning: This
    process
    (pid=1607833) is multi-threaded, use of fork() may lead to deadlocks in the 
child.
       pid = os.fork()

    There are a few other deprecation warnings, too,
    which are not relevant to this particular problem
    but may be interesting for the future, nevertheless:

    /home/zozo/test-yocto-4.3/bitbake/lib/bb/codeparser.py:260: 
DeprecationWarning:
    ast.Str is
    deprecated and will be removed in Python 3.14; use ast.Constant instead
       if name in self.containsfuncs and isinstance(node.args[1], ast.Str):
    /home/zozo/test-yocto-4.3/bitbake/lib/bb/codeparser.py:263: 
DeprecationWarning:
    Attribute
    s is deprecated and will be removed in Python 3.14; use value instead
       self.contains[varname].add(node.args[1].s)

    ruby.bbclass has a lot of these at different line numbers:

    
/home/zozo/test-yocto-4.3/conf/../layers/meta-cloud-services/classes/ruby.bbclass:28:
    SyntaxWarning: invalid escape sequence '\.'
       r = re.compile("ruby ([0-9]+\.[0-9]+\.[0-9]+)*")

    These lines occur at the end (probably normal):

    1605202 10:39:58.854287 Parse cache valid
    1605202 10:40:13.098694 Registering idle function <function
    BBCooker.buildTargets.<locals>.buildTargetsIdle at 0x7fa3e22e79c0>
    1605202 10:40:13.098736 Removing idle function <bound method 
Command.runAsyncCommand of
    <bb.command.Command object at 0x7fa41259d580>>
    1605202 12:17:02.357378 Running command ['stateShutdown']
    1605202 12:17:02.357622 Sending reply (None, None)
    1605202 12:17:02.357819 Command Completed (socket: True)

    And the remaining child processes:

    $ ps auxw | grep bitb | grep -v grep
    zozo     1605202  2.3  3.5 1333384 1151808 ?     Sl   10:39 2:29 
/usr/bin/python3
    /home/zozo/test-yocto-4.3/bitbake/bin/bitbake-server decafbad 3 5
    /home/zozo/test-yocto-4.3/bitbake-cookerdaemon.log
    /home/zozo/test-yocto-4.3/bitbake.lock
    /home/zozo/test-yocto-4.3/bitbake.sock 0 0 None 0
    zozo     1605208  0.0  1.4 559372 466260 ?       S    10:39 0:00 
/usr/bin/python3
    /home/zozo/test-yocto-4.3/bitbake/bin/bitbake-server decafbad 3 5
    /home/zozo/test-yocto-4.3/bitbake-cookerdaemon.log
    /home/zozo/test-yocto-4.3/bitbake.lock
    /home/zozo/test-yocto-4.3/bitbake.sock 0 0 None 0



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#191349): 
https://lists.openembedded.org/g/openembedded-core/message/191349
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]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to