<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/server, branch thud</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=thud</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=thud'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2019-02-06T08:32:00+00:00</updated>
<entry>
<title>bitbake: server/process: Add missing exception raise</title>
<updated>2019-02-06T08:32:00+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=1d987b98ed9ee95239f966ce990c119531e95d88'/>
<id>urn:sha1:1d987b98ed9ee95239f966ce990c119531e95d88</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: d89358c7b8aa69f12b8c384c4fdb493782633494)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: process: Rewrite multiple connection handling</title>
<updated>2019-01-28T17:03:14+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=3541f019a505d18263fad0b46b88d470e3fd9d62'/>
<id>urn:sha1:3541f019a505d18263fad0b46b88d470e3fd9d62</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: 220193dc38c4e78cb7cf36132a3a5b499a35bc8a)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: process: Handle EWOULDBLOCK in socket connect</title>
<updated>2019-01-28T17:03:14+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=563a74d52270ebe0db5bec5802a1c820ab88a999'/>
<id>urn:sha1:563a74d52270ebe0db5bec5802a1c820ab88a999</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: c2000651a200530ba08161207ade5eea8bbeec43)

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>2019-01-28T17:03:14+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=86209d43654ee924cca0ae078c729c2f82386225'/>
<id>urn:sha1:86209d43654ee924cca0ae078c729c2f82386225</id>
<content type='text'>
The current value of 2 seconds has shown to be short in
wider testing.

(Bitbake rev: 469cc520593ba52775a373faad03072b7af05dba)

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>2019-01-28T17:03:14+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=b2660f423e3da797084c86f9683831ce7f02c86a'/>
<id>urn:sha1:b2660f423e3da797084c86f9683831ce7f02c86a</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: 833d95f538c007c27c6eb8d8f2f97094dc2b1a41)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: lib/bb/server: Avoid UnboundLocalError traceback</title>
<updated>2019-01-28T17:03:13+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2018-11-09T15:57:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d52655e517072697231681846c7fbe7368dac554'/>
<id>urn:sha1:d52655e517072697231681846c7fbe7368dac554</id>
<content type='text'>
Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/bitbake/lib/bb/main.py", line 464, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/bitbake/lib/bb/server/process.py", line 490, in connectProcessServer
    if command_chan_recv:
UnboundLocalError: local variable 'command_chan_recv' referenced before assignment

(Bitbake rev: 257ed88590883f46beec0164749e45733e67954e)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server/process: Handle short reads</title>
<updated>2019-01-28T17:03:13+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2018-11-29T16:51:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=6399d307ad493eee4d3d99ac815823557e2f1111'/>
<id>urn:sha1:6399d307ad493eee4d3d99ac815823557e2f1111</id>
<content type='text'>
Its possible the read may return a smaller number of characters. Remove
the possibility by using a single character to signal the server is ready.

(Bitbake rev: 7fb2d6bed06439e59a81dd91798d886ee0a72e99)

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>2019-01-28T17:03:13+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=bb1f8f0891941db408affde8a93fe8f2542c1a17'/>
<id>urn:sha1:bb1f8f0891941db408affde8a93fe8f2542c1a17</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: 492a5c1b32bee1f5d7978954ee0ebdf4fccdf56f)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server/process: Show last 60 lines of the log if the server didn't start</title>
<updated>2019-01-08T20:18:55+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2018-11-27T11:31:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0c6290b6bc455297bb1c5629607079bede2eba74'/>
<id>urn:sha1:0c6290b6bc455297bb1c5629607079bede2eba74</id>
<content type='text'>
We're seeing issues where the server doesn't start with no logs as to why. Allow
the server to print the last 60 log lines just in case this shows us something useful
about what is failing.

(Bitbake rev: 1351978585b76262cb104f3d609d79c184ee5d2b)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server/process: Show the last 60 log lines, not the last 10</title>
<updated>2019-01-08T20:18:55+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2018-11-27T11:32:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=cfbd125fef570c7a1b5ef812dca17f7930e9419c'/>
<id>urn:sha1:cfbd125fef570c7a1b5ef812dca17f7930e9419c</id>
<content type='text'>
10 log lines may not capture any full traceback, increase the number of
lines to 60 which covers most tracebacks.

(Bitbake rev: 2626ff964c0a5726037e539cfd07027aded0b7a9)

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