Bug 10061 - Ctrl+C during BB_HASHCHECK_FUNCTION execution does not interrupt processing nicely
Summary: Ctrl+C during BB_HASHCHECK_FUNCTION execution does not interrupt processing n...
Status: NEW
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 2.0
Hardware: x86 Multiple
: Medium+ minor
Target Milestone: 6.99
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-08-02 02:04 UTC by Paul Eggleton
Modified: 2026-04-23 15:22 UTC (History)
8 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 Paul Eggleton 2016-08-02 02:04:29 UTC
If I hit Ctrl+C during the "Checking sstate mirror object availability" stage in OE (which is when BB_HASHCHECK_FUNCTION is being called, i.e. setscene_depvalid() in sstate.bbclass) then I see the following:

------------ snip ------------
Keyboard Interrupt, closing down...

WARNING: Timeout while attempting to communicate with bitbake server
WARNING: Timeout while attempting to communicate with bitbake server
WARNING: Timeout while attempting to communicate with bitbake server
WARNING: Timeout while attempting to communicate with bitbake server
ERROR: Gave up; Too many tries: timeout while attempting to communicate with bitbake server
NOTE: Executing SetScene Tasks
NOTE: Sending SIGTERM to remaining 1 tasks
NOTE: Tasks Summary: Attempted 109 tasks of which 109 didn't need to be rerun and all succeeded.
NOTE: Writing buildhistory
WARNING: /home/paul/poky/poky/bitbake/lib/bb/event.py:124: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/paul/poky/poky/build/tmp/log/cooker/genericx86-64/20160802015804.log' mode='a' encoding='UTF-8'>
  logger.handlers = [console]
------------ snip ------------

This can take quite a bit of time - I'm guessing it doesn't quit until setscene_depvalid() actually returns.
Comment 1 Richard Purdie 2016-08-04 14:51:54 UTC
I can see what happens here, the server is running subprocess calls. The Ctrl+C is processed by the UI and queues a "stop" command for the server which it only processes when it returns from the function. If you propagate the Ctrl+C to the server, things get very messy as you never get clean exit paths and the shutdown isn't graceful.

I'm not sure what we can do to easily make for a better user experience here without reintroducing all the bugs which caused us to define a shutdown process in the first place.
Comment 2 Randy MacLeod 2023-02-09 15:57:30 UTC
Some progress made but likely still a problem.
Comment 3 Randy MacLeod 2023-07-26 21:22:06 UTC
Bulk move of 64 bugs to 4.3 M3 after a quick review.
If a bug is actually fixed, please add a commit link and resolve it.
-- Randy for YP bug team.
Comment 4 Trevor Gamblin 2023-09-14 15:43:19 UTC
Moved to M4.
Comment 5 Randy MacLeod 2023-10-30 15:29:14 UTC
Bulk move to 5.0 M1. -- Randy
Comment 6 Randy MacLeod 2023-12-21 23:28:25 UTC
Bulk move of 52 5.0-M1 bugs to M2.
Comment 7 Randy MacLeod 2024-01-25 14:28:46 UTC
Bulk move of bugs owned by "unassigned" from 5.0-M2 to 5.0-M3.
Comment 8 Randy MacLeod 2024-02-22 19:53:23 UTC
Bulk move of bugs from 5.0-M3 to 5.99.
The bugs in this list are all unassigned and are ones that I consider to be nice to do some time but not essential track from milestone to milestone in 5.0 or 5.1. We agreed on this bug handling approach in the YP bug review on Feb 22, 2024.

If you disagree, please move back to a 5.[012...]-M* milestone.