<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/server, branch scarthgap-5.0.15</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=scarthgap-5.0.15</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=scarthgap-5.0.15'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2025-09-17T22:36:44+00:00</updated>
<entry>
<title>bitbake: Use a "fork" multiprocessing context</title>
<updated>2025-09-17T22:36:44+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>JPEWhacker@gmail.com</email>
</author>
<published>2025-08-21T22:40:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f00c4968ff34c6a23f2467f310b5aae31ab4947c'/>
<id>urn:sha1:f00c4968ff34c6a23f2467f310b5aae31ab4947c</id>
<content type='text'>
Python 3.14 changes the default multiprocessing context from "fork" to
"forkserver"; however bitbake heavily relies on "fork" to efficiently
pass data to the child processes. As such, make "fork" context in the bb
namespace and use it in place of the normal multiprocessing module.

Note that multiprocessing contexts were added in Python 3.4, so this
should be safe to use even before Python 3.14

[YOCTO #15858]

(Bitbake rev: 15d7448e04aa78c827d2cef9eb1a62bd6e0dd119)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
Signed-off-by: Martin Jansa &lt;martin.jansa@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>bitbake: process/server: Fix typo</title>
<updated>2024-02-10T15:25:22+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2024-02-10T15:17:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=babd5fea4a61d722b505e9efeb1701a70b4b5413'/>
<id>urn:sha1:babd5fea4a61d722b505e9efeb1701a70b4b5413</id>
<content type='text'>
Ensure the message matches the filenames the code actually uses.

(Bitbake rev: deb7db2e2b125c6a6732db4f185f4de5926494fd)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: process: Add profile logging for main loop</title>
<updated>2024-02-10T14:13:51+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2024-02-09T23:55:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0f50f21151f302d4b4db115866a907628bcd4e3c'/>
<id>urn:sha1:0f50f21151f302d4b4db115866a907628bcd4e3c</id>
<content type='text'>
When the idle/main loop was added, we didn't include profiling information
for it. There is a performance issue in there, add logging for it.

(Bitbake rev: d8d5cd43a60560f67e86f4f625113b0f73b944c0)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server/process: catch and expand multiprocessing connection exceptions</title>
<updated>2024-01-10T14:02:38+00:00</updated>
<author>
<name>Mark Asselstine</name>
<email>mark.asselstine@windriver.com</email>
</author>
<published>2023-12-28T21:01:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=bc22d82c2f0c16ee8ad2edeb3bcdfb31db0afa94'/>
<id>urn:sha1:bc22d82c2f0c16ee8ad2edeb3bcdfb31db0afa94</id>
<content type='text'>
Doing builds on systems with limited resources, or with high demand
package builds such as chromium it isn't uncommon for the OOM Killer
to be triggered and for bitbake-server to be selected as the process
to be killed. When the bitbake-server does terminate unexpectedly due
to the OOM Killer or otherwise, this currently results in a generic
python traceback with little indication as to what has failed.

Here we trap and raise the exceptions while extending the exception
text in runCommand() to make it clear that this is most likely caused
by the bitbake-server unexpectedly terminating.

Callers of runCommand() should be updated to properly handle the
BrokenPipeError and EOFError exceptions to avoid printing a python
traceback, but even if they don't, the added text in the exceptions
should provide some hints as to what might have caused the failure.

(Bitbake rev: 5ff62b802f79acc86bbd6a99484f08501ff5dc2d)

Signed-off-by: Mark Asselstine &lt;mark.asselstine@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake/lib: spawn server/worker using the current Python interpreter</title>
<updated>2023-09-26T09:37:17+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@arm.com</email>
</author>
<published>2023-09-25T11:55:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=362c70a993ae954834a8deace68b3e4068282698'/>
<id>urn:sha1:362c70a993ae954834a8deace68b3e4068282698</id>
<content type='text'>
The user may have invoked ./bin/bitbake using a different Python
interpreter than whatever python3 is on $PATH (for example, explicitly
using a different version).  However, as the server and workers are
spawned directly they'll use the hashbang and thus a different Python.

We also ensure that argv[0] is set to sys.executable instead of
'bitbake-server' or 'bitbake-worker', so that sys.executable is set to
the right value inside the child.  Without this the server won't be
able to start any workers.

(Bitbake rev: b44d5d2a53d3082c8ce94e09c0cf833e33e25aec)

Signed-off-by: Ross Burton &lt;ross.burton@arm.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server/process: Disable the flush() call in server logging</title>
<updated>2023-09-18T10:35:05+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2023-09-14T16:26:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=022deeb0effb92280cb86da962d8bd5e94d44947'/>
<id>urn:sha1:022deeb0effb92280cb86da962d8bd5e94d44947</id>
<content type='text'>
We've been chasing bitbake timeouts for a while and it was unclear where things
were blocking on IO. It appears the flush() call in server logging can cause
pauses up to minutes long on systems with slow (spinning) disks that are heavily
loaded with IO.

Since the flush() was added to aid debugging of other timing issues, we shouldn't
need it now and it can be disabled. Leave a comment as a reminder of the pain this
can cause.

(Bitbake rev: afbc169e1490a86d6250969f780062c426eb4682)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: lib: Drop inotify support and replace with mtime checks</title>
<updated>2023-09-18T10:35:05+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2023-09-16T17:20:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=37c31a5adc26fc947a447ca9eae0983a654d1a33'/>
<id>urn:sha1:37c31a5adc26fc947a447ca9eae0983a654d1a33</id>
<content type='text'>
With the flush in serverlog() removed and a memory resident bitbake with a
60s timeout, the following could fail in strange ways:

rm bitbake-cookerdaemon.log
bitbake-layers add-layer ../meta-virtualization/
bitbake-layers add-layer ../meta-openembedded/meta-oe/
bitbake -m

specifically that it might error adding meta-oe with an error related to meta-virt.

This clearly shows that whilst bblayers.conf was modified, bitbake was not
recognising that. This would fit with the random autobuilder issues seen when
the serverlog flush() call was removed.

The issue appears to be that you have no way to "sync()" the inotify events with
the command stream coming over the socket. There is no way to know if there are
changes in the IO queue which bitbake needs to wait for before proceeding with
the next command.

I did experiment with os.sync() and fsync on the inotify fd, however nothing
addressed the issue. Since it is extremely important we have accurate cache data,
the only realistic thing to do is to switch to stat() calls and check mtime.

For bitbake commands, this is straightforward since we can revalidate the cache
upon new connections/commands. For tinfoil this is problematic and we need to
introduce and explict command "revalidateCaches" that the code can use to force
bitbake to re-check it's cache validity. I've exposed this through tinfoil with
a new "modified_files" function.

So, this patch:

a) drops inotify support within bitbake's cooker/server and switch to using mtime
b) requires a new function call in tinfoil when metadata has been modified

(Bitbake rev: da3ec3801bdb80180b3f1ac24edb27a698415ff7)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server/process: Add more timing debug</title>
<updated>2023-09-05T07:14:50+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2023-08-30T19:39:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=733afeffd19a2ae3af34abe95e514cb4b99cd366'/>
<id>urn:sha1:733afeffd19a2ae3af34abe95e514cb4b99cd366</id>
<content type='text'>
It is helpful to have timestamps on the ping failures so that they
can be matched against the bitbake logs. It is also useful to understand
how long the server takes for form a reply verses when it is sent.

(Bitbake rev: 65969a7a8f5ae22c230431d2db080eb187a27708)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server/process: fix sig handle</title>
<updated>2023-08-11T06:58:31+00:00</updated>
<author>
<name>Yang Xu</name>
<email>yang.xu@mediatek.com</email>
</author>
<published>2023-08-11T02:20:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b77e23c541e6d52b133abe1970c0608cd5418207'/>
<id>urn:sha1:b77e23c541e6d52b133abe1970c0608cd5418207</id>
<content type='text'>
process.signal_received is a list for signum and not iterable,
change a suitable method to handle sig.

(Bitbake rev: bfc53b190bd2530c2bfcea0690127d7eff620f45)

Signed-off-by: Yang Xu &lt;yang.xu@mediatek.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server/process: Show command in timeout message</title>
<updated>2023-06-30T16:58:47+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2023-06-30T16:57:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4bb1f0e236d27df861299c5fa689c18968690e88'/>
<id>urn:sha1:4bb1f0e236d27df861299c5fa689c18968690e88</id>
<content type='text'>
To learn more about the server timeout issues, be clear in the error
message about which command is showing the timeout. It is currently
unclear if this is the original command or a ping to the server.

(Bitbake rev: ac3cd866274f67b29eff89e393132bdabf76dbfd)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
