Bug 14408 - bitbake hangs using taskexp ui and a new build directory
Summary: bitbake hangs using taskexp ui and a new build directory
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 3.4 M3
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2021-05-26 19:49 UTC by Randy Witt
Modified: 2021-08-06 05:38 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Randy Witt 2021-05-26 19:49:11 UTC
If you run "bitbake -g -u taskexp quilt-native" with a clean build directory, then it will hang after 60 seconds.

Here are the steps to reproduce and the output.

Commands to reproduce and output
--------------------------------

~/poky$ rm build/ -rf
~/poky$ . ./oe-init-build-env build
You had no conf/local.conf file. This configuration file has therefore been
... <Snipped>
~/poky/build$ bitbake quilt-native -g -u taskexp
Timeout while waiting for a reply from the bitbake server (60s)
~/poky/build$
Comment 1 Richard Purdie 2021-05-26 23:12:51 UTC
Thanks for reporting, this actually raises a lot of good questions.

There is a missing params.updateToServer(server, os.environ.copy()) call from taskexp.py. This results in BB_ORIGENV being empty which means PATH isn't available which leads to an error populating HOSTTOOLS. The error isn't visible since taskexp handles errors badly and there is also bad handling of early failures within bitbake server which means the logs don't have good logs.

Fixing this needs:

a) A fix to add params.updateToServer(server, os.environ.copy()) to taskexp
b) Improved traceback handling in bitbake's server main loop
c) Some way for errors to be printed if a UI fails (even to the cooker log worse case).

Fixing a) will fix the bug but we need better debug when something fails too.
Comment 2 Richard Purdie 2021-08-05 12:38:07 UTC
Four patches to bitbake sent out to address this issue and the associated poor logging/handling.