<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/server, branch 2.7_M2</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=2.7_M2</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=2.7_M2'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2019-02-06T08:24:50+00:00</updated>
<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>
<entry>
<title>bitbake: server/process: Handle short reads</title>
<updated>2018-12-05T13:11:27+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=5610acda80605aa9c5b0243c872dd1a47bf4b501'/>
<id>urn:sha1:5610acda80605aa9c5b0243c872dd1a47bf4b501</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: 767c9596d129d21ddf5d2e00c55f0a0525c641dc)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server/process: Make lockfile handling clearer</title>
<updated>2018-12-05T13:11:27+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2018-11-29T16:51:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b9439e0255e4cf9b7fc8d8b034395bceb4f285f8'/>
<id>urn:sha1:b9439e0255e4cf9b7fc8d8b034395bceb4f285f8</id>
<content type='text'>
This simplifies the code and makes it easier to read but has the
same functionality.

(Bitbake rev: a0b9cfaf2d03fd047a79d32e668001718d02c4bf)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server/process: Fix ConnectionRefusedError tracebacks</title>
<updated>2018-12-01T11:32:08+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2018-11-28T16:30:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=3be7080d82a63325db51e816d42a2808bdd66124'/>
<id>urn:sha1:3be7080d82a63325db51e816d42a2808bdd66124</id>
<content type='text'>
Improve connetion refused error handling:

NOTE: Retrying server connection...
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection... (Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/oe-selftest-opensuse/build/bitbake/lib/bb/server/process.py", line 471, in connectProcessServer
    sock.connect(os.path.basename(sockname))
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/oe-selftest-opensuse/build/bitbake/lib/bb/main.py", line 464, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/home/pokybuild/yocto-worker/oe-selftest-opensuse/build/bitbake/lib/bb/server/process.py", line 502, in connectProcessServer
    os.close(i)
TypeError: an integer is required (got type NoneType)
)
WARNING: /home/pokybuild/yocto-worker/oe-selftest-opensuse/build/bitbake/lib/bb/main.py:481: ResourceWarning: unclosed &lt;socket.socket fd=14, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0&gt;
  logger.info("Retrying server connection... (%s)" % traceback.format_exc())

(Bitbake rev: 6998fd816ceb0034c852a8fb994901fdf1975cfd)

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