Bug 2039 - Sometimes unable to kill bitbake with Ctrl-C
Summary: Sometimes unable to kill bitbake with Ctrl-C
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: High major
Target Milestone: 1.2 M4
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard: Patches our for review
Depends on:
Blocks:
 
Reported: 2012-02-28 18:21 UTC by Scott Garman
Modified: 2012-03-13 11:54 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Garman 2012-02-28 18:21:56 UTC
I'm able to reproduce this problem on hm1 using today's master branch of Poky.

1. Bitbake something non-sensical (e.g, a typo - 'bitbake usod')

2. Hit Ctrl-C repeatedly during the parsing stage.

The result I see is the process hangs, and I cannot get back to my shell.

If from another terminal I run killall bitbake, it gives me a bash prompt again on my terminal, but ps still shows a ton of bitbake usod processes running, which I most efficiently kill with killall python.

This bug was encountered during the Yocto Developer Day intro hands-on labs, which were using Fedora 16 host OSes with all the software updates applied. hm1 runs openSUSE 11.4 with Python v 2.7.
Comment 1 Richard Purdie 2012-03-11 14:39:02 UTC
There appear to be two issues here, one is the shutdown() parsing function in cooker.py being called twice which will result in a hard lockup. The second is that the codeparser cache manipulation can take a long time on a many core system giving the illusion of a hang.

I've sent patches for both issues to bitbake-devel along with a third patch which lowers the size of the cache file significantly.
Comment 2 Richard Purdie 2012-03-13 11:54:31 UTC
Fixed in http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=7bf0a790b23833a1b426d2349885459112fb5d7c and the previous commit.