Skip to content

Bitbake server thread enabling

Richard Purdie bitbake-devel 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest11 patches 0 repliesNew
  2. v115 patches 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11knotty: Avoid looping with tracebackslib/bb/ui/knotty.py+1 -30 replies
2/11event: Add enable/disable heartbeat codelib/bb/cooker.py lib/bb/event.py lib/bb/server/process.py+15 -20 replies
3/11cooker/cookerdata: Rework the way the datastores are resetlib/bb/cooker.py lib/bb/cookerdata.py+22 -180 replies
4/11server/process: Improve exception and idle function logginglib/bb/server/process.py+4 -00 replies
5/11command: Tweak finishAsyncCommand ordering to avoid raceslib/bb/command.py+1 -10 replies
6/11cooker: Ensure commands clean up any parser processeslib/bb/cooker.py+3 -00 replies
7/11server/process: Improve idle loop exit codelib/bb/command.py lib/bb/cooker.py lib/bb/server/process.py+20 -170 replies
8/11event: Always use threadlocklib/bb/event.py lib/bb/tests/event.py+35 -550 replies
9/11server/process: Add locking around idle functions accesseslib/bb/server/process.py+14 -50 replies
10/11server/process: Run idle commands in a separate idle threadlib/bb/command.py lib/bb/cooker.py lib/bb/server/process.py +1 more+97 -500 replies
11/11knotty: Ping the server/cooker periodicallylib/bb/ui/knotty.py+11 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH 00/11 v2] Bitbake server thread enabling

This series adds 'idle' thread support to bitbake. These changes have struggled a bit in testing as we're trying to add threading support to code which never had it originally. We've been aiming at this for some time (over a decade) but have reached the point where we need to do it and deal with any issues arrising.

The 'idle' thread is badly named as it is where the "real work" of bitbake gets done, e.g. runqueue (task execution) is run as an idle handler. We can worry about renaming things later, getting the basic changes working is my concern right now.

The problem these changes solve:
* allows the UI to tell if the server is alive and still there even when async commands are running
* allows the UI to interrupt the server and tell it to shutdown (i.e. make Ctrl+C repsonsive from the UI)
* allow us to make progress on the various "bitbake hanging" bugs we have where the UI can't connect

There is much more work needed here and the code can be considerably cleaned up to make it clearer and most accessible, those changes can follow and build from this though.

Thanks to Joshua Watt for some tweaks to improve the code.

v2 changes the threading event into a condition and cleans up some locking on the idle functions. As part of the changes it made sense to reorderand clean up the series. One part of the previous series was merged to try and fix issues being seen with master.

Richard Purdie (11):
knotty: Avoid looping with tracebacks
event: Add enable/disable heartbeat code cooker/cookerdata: Rework the way the datastores are reset server/process: Improve exception and idle function logging
command: Tweak finishAsyncCommand ordering to avoid races
cooker: Ensure commands clean up any parser processes server/process: Improve idle loop exit code
event: Always use threadlock
server/process: Add locking around idle functions accesses server/process: Run idle commands in a separate idle thread
knotty: Ping the server/cooker periodically

 lib/bb/command.py             |  26 ++++----
 lib/bb/cooker.py              |  58 +++++++++++-------
 lib/bb/cookerdata.py          |  31 ++++++----
 lib/bb/event.py               |  82 +++++++++++++------------
 lib/bb/server/process.py      | 111 +++++++++++++++++++++++++---------
 lib/bb/server/xmlrpcserver.py |   2 +-
 lib/bb/tests/event.py         |  17 +-----
 lib/bb/ui/knotty.py           |  16 +++--
 8 files changed, 207 insertions(+), 136 deletions(-)
Signature · 1 line
2.37.2