Bug 11899 - broken 'bitbake --status-only' and 'bitbake -m' for multiple connections
Summary: broken 'bitbake --status-only' and 'bitbake -m' for multiple connections
Status: NEW
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 2.4
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 6.2
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-08-05 04:31 UTC by David Reyna
Modified: 2026-10-01 15:48 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Reyna 2017-08-05 04:31:35 UTC
I was trying to use these commands to monitor build status with the new memres bitbake change-over, but I could not get these commands to work.

It may be that I have the wrong syntax, but I could not find any specific examples in the documentation.

[ REPRODUCER ]

[build]$ cat ../build-toaster-5/bitbake.lock 
29796 0.0.0.0:51957

[build]$ bitbake --status-only --remote-server=127.0.0.1:51957
Traceback (most recent call last):
  File "/opt/dreyna/toaster_master/poky/bitbake/bin/bitbake", line 48, in <module>
    cookerdata.CookerConfiguration()))
  File "/opt/dreyna/toaster_master/poky/bitbake/lib/bb/main.py", line 370, in bitbake_main
    server_connection, ui_module = setup_bitbake(configParams, configuration)
  File "/opt/dreyna/toaster_master/poky/bitbake/lib/bb/main.py", line 423, in setup_bitbake
    configParams.observe_only, configParams.xmlrpctoken)
  File "/opt/dreyna/toaster_master/poky/bitbake/lib/bb/server/xmlrpcclient.py", line 151, in connectXMLRPC
    raise e
  File "/opt/dreyna/toaster_master/poky/bitbake/lib/bb/server/xmlrpcclient.py", line 147, in connectXMLRPC
    connection = BitBakeXMLRPCServerConnection(host, port, (ip, 0), observer_only, featureset)
  File "/opt/dreyna/toaster_master/poky/bitbake/lib/bb/server/xmlrpcclient.py", line 89, in __init__
    self.events = uievent.BBUIEventQueue(self.connection, self.clientinfo)
  File "/opt/dreyna/toaster_master/poky/bitbake/lib/bb/ui/uievent.py", line 72, in __init__
    raise Exception(errmsg)
Exception: Could not register UI event handler. Error: Cooker is busy: running, host 127.0.0.1, port 55744
[build]$ 

[build]$ bitbake -m --remote-server=0.0.0.0:51957
Traceback (most recent call last):
  File "/opt/dreyna/toaster_master/poky/bitbake/bin/bitbake", line 48, in <module>
    cookerdata.CookerConfiguration()))
  File "/opt/dreyna/toaster_master/poky/bitbake/lib/bb/main.py", line 370, in bitbake_main
    server_connection, ui_module = setup_bitbake(configParams, configuration)
  File "/opt/dreyna/toaster_master/poky/bitbake/lib/bb/main.py", line 423, in setup_bitbake
    configParams.observe_only, configParams.xmlrpctoken)
  File "/opt/dreyna/toaster_master/poky/bitbake/lib/bb/server/xmlrpcclient.py", line 151, in connectXMLRPC
    raise e
  File "/opt/dreyna/toaster_master/poky/bitbake/lib/bb/server/xmlrpcclient.py", line 147, in connectXMLRPC
    connection = BitBakeXMLRPCServerConnection(host, port, (ip, 0), observer_only, featureset)
  File "/opt/dreyna/toaster_master/poky/bitbake/lib/bb/server/xmlrpcclient.py", line 89, in __init__
    self.events = uievent.BBUIEventQueue(self.connection, self.clientinfo)
  File "/opt/dreyna/toaster_master/poky/bitbake/lib/bb/ui/uievent.py", line 72, in __init__
    raise Exception(errmsg)
Exception: Could not register UI event handler. Error: Cooker is busy: running, host 127.0.0.1, port 58285
WARNING: Could not register UI event handler. Error: Cooker is busy: running, host 127.0.0.1, port 58285, retry
WARNING: Could not register UI event handler. Error: Cooker is busy: running, host 127.0.0.1, port 58285, retry
WARNING: Could not register UI event handler. Error: Cooker is busy: running, host 127.0.0.1, port 58285, retry
WARNING: Could not register UI event handler. Error: Cooker is busy: running, host 127.0.0.1, port 58285, retry
WARNING: Could not register UI event handler. Error: Cooker is busy: running, host 127.0.0.1, port 58285, retry
WARNING: Could not connect to server at 0.0.0.0:51957 (Could not register UI event handler. Error: Cooker is busy: running, host 127.0.0.1, port 58285)
[build]$
Comment 1 Joshua Lock 2017-08-16 15:30:13 UTC
Regardless of whether there's a bug we clearly need to improve the docs here, so setting the docs flag.
Comment 2 Joshua Lock 2017-08-16 15:30:42 UTC
Perhaps we could add a bitbake-selftest for this, too?
Comment 3 Richard Purdie 2023-01-17 11:02:42 UTC
The issue is that the process server only accepts one controller connection, see self.controllersock in server/process.py. As such, only one connection to the server operates at a time.

There is a similar issue in the xmlrpc backend where new connections cannot be made if the cooker is running (see server/xmlrpcserver.py).

It was originally designed to take multiple connections with the idea some could be read only in nature. I think somewhere along teh development, that concept has been lost.