Bug 2039

Summary: Sometimes unable to kill bitbake with Ctrl-C
Product: [Build System, Metadata & Runtime] BitBake Reporter: Scott Garman <scott.a.garman>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: High CC: poky.bs.watcher, poky.watcher, sgw
Version: unspecified   
Target Milestone: 1.2 M4   
Hardware: x86   
OS: Multiple   
Whiteboard: Patches our for review
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

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.