Bug 14408

Summary: bitbake hangs using taskexp ui and a new build directory
Product: [Build System, Metadata & Runtime] BitBake Reporter: Randy Witt <randy.e.witt>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: poky.bs.watcher, poky.watcher, randy.macleod
Version: unspecified   
Target Milestone: 3.4 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

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.