<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/server, branch uninative-3.2</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-3.2</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-3.2'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2021-05-18T22:53:15+00:00</updated>
<entry>
<title>bitbake: server/process: Handle error in heartbeat funciton in OOM case</title>
<updated>2021-05-18T22:53:15+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-05-17T12:57:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2f12a20935acec5218e38efc1a97c686c06f31ee'/>
<id>urn:sha1:2f12a20935acec5218e38efc1a97c686c06f31ee</id>
<content type='text'>
We've seen cases where an OOM error causes bitbake server to hang:

9171 02:21:09.127810 Command Completed
Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/qemux86/build/bitbake/bin/bitbake-server", line 51, in &lt;module&gt;
    bb.server.process.execServer(lockfd, readypipeinfd, lockname, sockname, timeout, xmlrpcinterface)
  File "/home/pokybuild/yocto-worker/qemux86/build/bitbake/lib/bb/server/process.py", line 550, in execServer
    server.run()
  File "/home/pokybuild/yocto-worker/qemux86/build/bitbake/lib/bb/server/process.py", line 108, in run
    ret = self.main()
  File "/home/pokybuild/yocto-worker/qemux86/build/bitbake/lib/bb/server/process.py", line 242, in main
    ready = self.idle_commands(.1, fds)
  File "/home/pokybuild/yocto-worker/qemux86/build/bitbake/lib/bb/server/process.py", line 370, in idle_commands
    bb.event.fire(heartbeat, self.cooker.data)
  File "/home/pokybuild/yocto-worker/qemux86/build/bitbake/lib/bb/event.py", line 216, in fire
    fire_class_handlers(event, d)
  File "/home/pokybuild/yocto-worker/qemux86/build/bitbake/lib/bb/event.py", line 123, in fire_class_handlers
    execute_handler(name, handler, event, d)
  File "/home/pokybuild/yocto-worker/qemux86/build/bitbake/lib/bb/event.py", line 93, in execute_handler
    ret = handler(event)
  File "/home/pokybuild/yocto-worker/qemux86/build/meta/classes/buildstats.bbclass", line 182, in defaultrun_buildstats
    write_host_data(os.path.join(bsdir, "host_stats"), e, d, "interval")
  File "/home/pokybuild/yocto-worker/qemux86/build/meta/classes/buildstats.bbclass", line 160, in write_host_data
    output = subprocess.check_output(c.split(), stderr=subprocess.STDOUT, timeout=limit).decode('utf-8')
  File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child
    restore_signals, start_new_session, preexec_fn)
OSError: [Errno 12] Cannot allocate memory

We need to wrap the calls in the same high level wrapper as idle function calls
and trigger an exit upon an unhandled exception.

(Bitbake rev: 74042b5b89d5a170013fc1a327ce3a6530fbf7d5)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake-server: ensure server timeout is a float</title>
<updated>2021-04-20T12:57:50+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross@burtonini.com</email>
</author>
<published>2021-04-19T10:07:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=01066a584aa66a07f56cd64434731a650c523d09'/>
<id>urn:sha1:01066a584aa66a07f56cd64434731a650c523d09</id>
<content type='text'>
bitbake-server is spawned by process.py and passes the arguments it is
given to ProcessServer.  There's some type confusion here:

bitbake-server is called with a string representation of the timeout,
which may be None.  If the timeout is not set, pass 0 instead of None.

Inside bitbake-server a ProcessServer is created which expects the
timeout to be a float not a string, so always float() the value.

[ YOCTO #14350 ]

(Bitbake rev: c93ae1f861208f6d39fd15c84fbcd0e2b54331f5)

Signed-off-by: Ross Burton &lt;ross.burton@arm.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: process: Show command exceptions in the server log as well</title>
<updated>2020-10-11T12:44:26+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2020-10-11T12:43:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0c0b236b4c72d30e0e88f5f0310476569d444e83'/>
<id>urn:sha1:0c0b236b4c72d30e0e88f5f0310476569d444e83</id>
<content type='text'>
There are autobuilder logs where the server commands are failing
but we have no debug info in the server log. Improve this to try and
understand what is failing.

(Bitbake rev: 04d3a79226c9ea448b22f4efbab33876a72c9bdb)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server/process: Note when commands complete in logs</title>
<updated>2020-09-05T10:45:18+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2020-09-05T10:43:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ef21d084241ef2f7d3816338b74202044ce78d4d'/>
<id>urn:sha1:ef21d084241ef2f7d3816338b74202044ce78d4d</id>
<content type='text'>
Its hard to tell from the server logs whether commands complete or not
(or how long they take). Add extra info to allow more debugging of
server timeouts.

(Bitbake rev: 56285ada585ec1481449522282b335bcb5a2671e)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server/process: Prefix the log data with pid/time information</title>
<updated>2020-09-05T10:45:18+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2020-09-05T10:23:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=707f99642a6f29f2db835aadb8afba672e265588'/>
<id>urn:sha1:707f99642a6f29f2db835aadb8afba672e265588</id>
<content type='text'>
Knowing which process printed which messages and the timestamp of the
message is useful for debugging, so add this. Ensure the log parsing
isn't affected by using search() instead of match().

(Bitbake rev: 1d043666710df1fa9d9586fd974c0371dd1514b0)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server/process: Ensure we don't keep looping if some other server is started</title>
<updated>2020-09-05T10:45:18+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2020-09-04T14:38:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f71587695c4ced368017f118276807cd3c043ac4'/>
<id>urn:sha1:f71587695c4ced368017f118276807cd3c043ac4</id>
<content type='text'>
Showing "leftover process" messages when a new server has started and is being
used by some UI is horrible. Compare the PID data from the lockfile to
avoid this (and the ton of confusing log data it generates).

Also, move the time.sleep() call to be after the first lock attempt, which
reduces noise in the logs significantly.

(Bitbake rev: ce1897a31afb5a14997bc3d2f459b90d43eecb7d)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server/process: Don't show tracebacks if the lockfile is removed</title>
<updated>2020-09-05T10:45:16+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2020-09-04T14:39:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=175e5f27021f84b0c567f7dda15fa229eaaa95f9'/>
<id>urn:sha1:175e5f27021f84b0c567f7dda15fa229eaaa95f9</id>
<content type='text'>
lsof/fuser error if the file doesn't exist. It can be deleted by something
else so ignore this if it happens and loop.

(Bitbake rev: b100d22ce37b7548b50e59a71802bcc903acd6ea)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server/process: Ensure logging is flushed</title>
<updated>2020-09-05T10:45:16+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2020-09-04T14:28:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f6a40d457cf175eb1979f3a5bc62c76d939a21d0'/>
<id>urn:sha1:f6a40d457cf175eb1979f3a5bc62c76d939a21d0</id>
<content type='text'>
The cookerlog output goes to a file and its misleading to look at it and
not have it up to date with what the cooker is actually doing. Ensure
written data is flushed.

Ultimately this should be using python's logging but that is for another
day, we need simple fixes right now.

(Bitbake rev: d95c3dd2b8ac50423976a7baf0a51e9580871761)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: process: Avoid printing binary strings for leftover processes</title>
<updated>2020-09-05T10:45:16+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2020-09-04T14:21:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=341c5ca419b2b447e5ef5b5e13f0539694fc9132'/>
<id>urn:sha1:341c5ca419b2b447e5ef5b5e13f0539694fc9132</id>
<content type='text'>
The binary string printed into the output is ugly, parse this so the
linebreaks come out in the logs and make them much more readable (I
was misssing the information initially despite looking for it).

(Bitbake rev: c2dd8bb434d5738fedf9019651074b90affff3b2)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: process.py: Handle SystemExit exception to eliminate backtrace</title>
<updated>2020-09-05T10:45:16+00:00</updated>
<author>
<name>Mark Hatle</name>
<email>mark.hatle@kernel.crashing.org</email>
</author>
<published>2020-09-02T20:10:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4cb33dae15adb7f88a35a3630368db16923bca7e'/>
<id>urn:sha1:4cb33dae15adb7f88a35a3630368db16923bca7e</id>
<content type='text'>
With an invalid layer, the desired error output should be:

  ERROR: The following layer directories do not exist:
  ERROR:    /this_path_does_not_exist
  ERROR: Please check BBLAYERS in .../build-invalid-layer/conf/bblayers.conf

Instead we were met with a backtrace:

Traceback (most recent call last):
  File "/scratch1/fray/xilinx/poky/bitbake/bin/bitbake", line 36, in &lt;module&gt;
    cookerdata.CookerConfiguration()))
...
  File "/scratch1/fray/xilinx/poky/bitbake/lib/bb/cookerdata.py", line 267, in parseBaseConfiguration
    self.data = self.parseConfigurationFiles(self.prefiles, self.postfiles)
  File "/scratch1/fray/xilinx/poky/bitbake/lib/bb/cookerdata.py", line 358, in parseConfigurationFiles
    sys.exit(1)
SystemExit: 1

(Bitbake rev: 3a2503c785a5cd9dca0dc68c3aec31b4bec7684b)

Signed-off-by: Mark Hatle &lt;mark.hatle@kernel.crashing.org&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
