Bug 5058

Summary: can't kill webhob
Product: [Build System, Metadata & Runtime] Toaster Reporter: Jessica <jessica.zhang>
Component: toasterAssignee: Alexandru Damian <alexandru.damian>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: andreea.b.proca
Version: unspecified   
Target Milestone: 1.5 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Jessica 2013-08-27 23:19:17 UTC
Seems if I didn't do webhob stop.  After a while, when I tried to use the same set of metadata to run webhob, I will end up with following issues, that I can't cleanly or at least obvious to cleanup and restart webhob:

jzhang@jzhang-desktop:~/poky-webhob-test/build$ source webhob start
Error: bitbake lock state error. System may be already on.
jzhang@jzhang-desktop:~/poky-webhob-test/build$ source webhob stop
Error: bitbake lock state error. System may be already off.
manually stop system with bitbake -m / webserverKillAllComponents
jzhang@jzhang-desktop:~/poky-webhob-test/build$ bitbake webserverKillAllComponents
Loading cache: 100% |###########################################| ETA:  00:00:00
Loaded 1173 entries from dependency cache.

Build Configuration:
BB_VERSION        = "1.19.1"
BUILD_SYS         = "i686-linux"
NATIVELSBSTRING   = "Ubuntu-12.04"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "1.4+snapshot-20130827"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "web-hob:658146fcdcde047940644501f2512d8242dd240b"

ERROR: Nothing PROVIDES 'webserverKillAllComponents'

Summary: There was 1 ERROR message shown, returning a non-zero exit code.
jzhang@jzhang-desktop:~/poky-webhob-test/build$ ps -ef|grep bitbake
jzhang   15932 15765  0 15:19 pts/3    00:00:00 grep --color=auto bitbake
Comment 1 Alexandru Damian 2013-08-28 06:09:07 UTC
The pid of the web server is in whbmain.pid. Manually killing said PID, and then delete whbmain.pid should clear up the issue.

Note that I changed the command to do this from webhobKillAllComponents to webhobKillAll - bad call, I know, but I find the new name more expressive.

Let me know if this procedure works.
Comment 2 Alexandru Damian 2013-09-10 15:34:53 UTC
Closing because I think the detailed procedure works.
Comment 3 Andreea Brandusa Proca 2013-10-25 08:09:07 UTC
Verified in toaster/master:b8228afade3b619ac35255d75f84cc6157de4762.

Now, we can use some additional commands if the server does not stop:

brandusa@andreea-Vostro-460:~/toaster/build$ source toaster stop
The system will stop.
Error: bitbake lock state error. Trying to stop a stopped system ?
If you think the system is hanged up, you can try to manually stop system with the commands

# BBSERVER=localhost:8200 bitbake -m

and

# webserverKillAll