<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/server, branch 2.8_M3</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=2.8_M3</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=2.8_M3'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2019-08-16T09:05:32+00:00</updated>
<entry>
<title>bitbake: bitbake: server/process: Handle BBHandledException to avoid unexpected exceptions</title>
<updated>2019-08-16T09:05:32+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2019-08-15T11:56:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2cb6a75b5ad54fb4224a41a65a4f2bcc902f5b94'/>
<id>urn:sha1:2cb6a75b5ad54fb4224a41a65a4f2bcc902f5b94</id>
<content type='text'>
The parseBaseConfiguration() raises bb.BBHandledException(), but
BitBakeServer() didn't handle it, so we always got unexpected exceptions when
there were errors. For example:

=== Case 1:
* Add "print "hello"' in base.bbclass' def oe_import() function
def oe_import(d):
    print "hello"
[snip]

$ bitbake -p
ERROR: Unable to start bitbake server (None)
ERROR: Last 60 lines of server log for this session (/buildarea1/lyang1/test_hy/bitbake-cookerdaemon.log):
  File "/buildarea1/lyang1/poky/meta/classes/base.bbclass", line 21
    print "hello"
                ^
SyntaxError: Missing parentheses in call to 'print'

&lt;The first exception&gt;
During handling of the above exception, another exception occurred:
&lt;Tracebacks&gt;

&lt;The second exception&gt;
During handling of the above exception, another exception occurred:
&lt;Tracebacks&gt;

&lt;The third exception&gt;
During handling of the above exception, another exception occurred:
&lt;Tracebacks&gt;
[snip]

Now it looks like:
$ bitbake -p
ERROR: Unable to start bitbake server (None)
ERROR: Server log for this session (/buildarea1/lyang1/test_hy/bitbake-cookerdaemon.log):
ERROR: Error in compiling python function in /buildarea1/lyang1/poky/meta/classes/base.bbclass, line 21:

The code lines resulting in this error were:
     0001:def oe_import(d):
 *** 0002:    print "hello"
     0003:    import sys
     0004:
     0005:    bbpath = d.getVar("BBPATH").split(":")
     0006:    sys.path[0:0] = [os.path.join(dir, "lib") for dir in bbpath]
SyntaxError: Missing parentheses in call to 'print' (base.bbclass, line 21)

=== Case 2:
* Add 'HOSTTOOLS += "hello"' to conf/local.conf:
$ bitbake -p
ERROR: Unable to start bitbake server (None)
ERROR: Server log for this session (/buildarea1/lyang1/test_hy/bitbake-cookerdaemon.log):
&lt;Tracebacks&gt;
[snip]
During handling of the above exception, another exception occurred:
[snip]
&lt;Tracebacks&gt;
ERROR: The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:
  hello

The error message is printed by bb.fatal() which raises bb.BBHandledException(),
but BitBakeServer() doesn't handle it, so we got it.

Now it looks like:
ERROR: Unable to start bitbake server (None)
ERROR: Server log for this session (/buildarea1/lyang1/test_hy/bitbake-cookerdaemon.log):
ERROR: The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:
  hello

No unexpected exceptions anymore.

[YOCTO #13267]

(Bitbake rev: 6e6865e6371dbd31a136eae64cc5b1fa5f5bee33)

Signed-off-by: Robert Yang &lt;liezhi.yang@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: Drop duplicate license boilerplace text</title>
<updated>2019-05-04T09:44:10+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2019-05-01T10:47:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=cf9c0be3f69135633c0800d95e77677569a79839'/>
<id>urn:sha1:cf9c0be3f69135633c0800d95e77677569a79839</id>
<content type='text'>
With the introduction of SPDX-License-Identifier headers, we don't need a ton
of header boilerplate in every file. Simplify the files and rely on the top
level for the full licence text.

(Bitbake rev: 695d84397b68cc003186e22f395caa378b06bc75)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: Add initial pass of SPDX license headers to source code</title>
<updated>2019-05-04T09:44:04+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2019-04-30T10:05:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=79834a71447f89c52c6c9ad62c9bcbf9b8e0e05b'/>
<id>urn:sha1:79834a71447f89c52c6c9ad62c9bcbf9b8e0e05b</id>
<content type='text'>
This adds the SPDX-License-Identifier license headers to the majority of
our source files to make it clearer exactly which license files are under.

The bulk of the files are under GPL v2.0 with one found to be under V2.0
or later, some under MIT and some have dual license. There are some files
which are potentially harder to classify where we've imported upstream code
and those can be handled specifically in later commits.

The COPYING file is replaced with LICENSE.X files which contain the full
license texts.

(Bitbake rev: ff237c33337f4da2ca06c3a2c49699bc26608a6b)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server/process: Add missing exception raise</title>
<updated>2019-02-06T08:24:50+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2019-02-05T21:34:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=65a7662c5b83d56b7baff5cc4ee79051c3ced18c'/>
<id>urn:sha1:65a7662c5b83d56b7baff5cc4ee79051c3ced18c</id>
<content type='text'>
The intent of the code was to catch one kind of error, it was actually swallowing
all exceptions and looping indefinitely. Fix it to work as intended.

This explains some mystery hangs we've been seeing.

(Bitbake rev: d73dbc3580faa1225d95ae4cefac4879ca3c1b2f)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: process: Rewrite multiple connection handling</title>
<updated>2018-12-26T11:10:33+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2018-12-24T16:34:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2365e00b7c5e78f2ce5043a2e2495fef346ecb3d'/>
<id>urn:sha1:2365e00b7c5e78f2ce5043a2e2495fef346ecb3d</id>
<content type='text'>
If the bitbake server recieved multiple connections, it currently closes
ones it can't handle (while its dealing with another). This is rather
antisocial behaviour which causes clients to quickly run through their
retries and abort.

Instead, queue any other connections until the current one is closed. This
way the client can decide when it wants to stop waiting for the server. If the
client is gone by the time we handle it, we handle that gracefully.

This also fixes a number of bugs in the connection handling where connections
which did drop early were badly handled causing tracebacks in the logs.

Also, handle queue incomming connections in a loop to ensure that the main
client handling doesn't starve that piece of the system.

This code was stress tested by running 50 connection attempts in parallel at
once, ensuring the code correctly handled them.

(Bitbake rev: 02845a561b38658ac3edf5cc9c34625ed860d34f)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: process: Handle EWOULDBLOCK in socket connect</title>
<updated>2018-12-26T11:10:33+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2018-12-24T16:32:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=5bc4f6935bf94b1d4e05e8652b5700f9fca389e5'/>
<id>urn:sha1:5bc4f6935bf94b1d4e05e8652b5700f9fca389e5</id>
<content type='text'>
Now that we set a timeout for the socket, it can return EWOULDBLOCK
if a signal or other event happens to wake up even if we don't timeout.

If this happens, retry the connection, else we simply see it quickly
loop through the retries and abort the connection in a very short
interval.

(Bitbake rev: d5b0a9a302ac0eafa4f797ac15ea77db87e82b3c)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: process.py: Set socket timeout to 10 seconds</title>
<updated>2018-12-26T11:10:33+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2018-12-24T16:27:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c60de991d5b915bfeb5233aa5f998776fdf19f6d'/>
<id>urn:sha1:c60de991d5b915bfeb5233aa5f998776fdf19f6d</id>
<content type='text'>
The current value of 2 seconds has shown to be short in
wider testing.

(Bitbake rev: 8a1f2fcf35d61d83bbafa8fa3ae215fd5f51728b)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server/process: Ensure socket has a timeout set</title>
<updated>2018-12-15T11:48:33+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2018-12-14T17:49:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=32395abc6dc7b2f21a059b4a8677361caa95604b'/>
<id>urn:sha1:32395abc6dc7b2f21a059b4a8677361caa95604b</id>
<content type='text'>
We're seeing hangs in oe-selftest where server startup and shutdown are
racing. The assumption was a connect would timeout however no timeout is
set which can leave processes hanging. Set a short timeout for
the connection to avoid this.

(Bitbake rev: f02114cb70e8f6f1d32e19c02b758fe0aadecd19)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server/process: Increase server startup time delay</title>
<updated>2018-12-08T17:17:37+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2018-12-02T19:18:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=55197b853d182911430ba141aca2c3ece07ba475'/>
<id>urn:sha1:55197b853d182911430ba141aca2c3ece07ba475</id>
<content type='text'>
On loaded production systems we've seen bitbake server take over
40s to start up. Increase the timeout to 90s which tries to avoid
failures in selftests.

The delays come from setting up the inotify watches (31s) so can't
really be avoided.

After 5s delay we now warn the user we're waiting for 90s so the
interactive exeperience shouldn't be much changed and its very
unlikely the user would see that anyway.

(Bitbake rev: 7a4e105093c3080c1087cd06abc2883852a23e28)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: process: Flush key output to logs</title>
<updated>2018-12-05T13:11:27+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2018-12-01T17:40:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=afe797a2773b497ec7d6af54fb81589707cb7974'/>
<id>urn:sha1:afe797a2773b497ec7d6af54fb81589707cb7974</id>
<content type='text'>
Small tweak to ensure these items are printed into the log since there
is other logging code which looks for the header and this makes it clearer
the server did start but is slow somewhere in startup.

(Bitbake rev: 7c0b84cac892744225fa0462f918ea9a79b356cb)

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