Bug 5376

Summary: Toaster unclean shutdown should be handled gracefully
Product: [Build System, Metadata & Runtime] Toaster Reporter: Belen Barros Pena <belen.barros.pena>
Component: toasterAssignee: Alexandru Damian <alexandru.damian>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: alexandru.damian, andreea.b.proca, belen.barros.pena, bluelightning, jessica.zhang
Version: unspecified   
Target Milestone: 1.6 M4   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
lock state error message none

Description Belen Barros Pena 2013-10-22 16:04:02 UTC
When you shut down your computer or your terminal window with Toaster still running, when you next try to start it up you must kill it and restart it. 

Toaster should shut down gracefully when the terminal window is closed or the computer is shut down.
Comment 1 Belen Barros Pena 2013-11-07 10:44:42 UTC
On dora-toaster:e5cf3e598e1e36b87a6cb07829f8a5013d78f534

This works wonderfully if I close my terminal window while Toaster is running, then:

1. open a new terminal
2. set up my build environment 
3. type the toaster start command.

It still reports a bitbake lock state error if I close my terminal window while Toaster is running, then:

1. open a new terminal
2. set up my build environment
3. type the toaster stop command

If I issue the toaster stop command when toaster is not running, I would expect to be told:

"Toaster is not running so it cannot be stopped. Would you like to start Toaster? [y/n]" 

kind of thing.
Comment 2 Alexandru Damian 2013-12-30 13:26:53 UTC
After the latest changes to bin/bitbake from Jason Wessel, the server is stopped when attempting to launch oe-init-build-env from another terminal. 

This leads to an inconsistency in setup and failure of toaster. Using this bug to track all the problems related to starting toaster.
Comment 3 Alexandru Damian 2014-02-12 12:35:41 UTC
Patches submitted for review.
Comment 4 Jessica 2014-03-04 18:29:49 UTC
Any update about these patches, I'm still experiencing the problem with the latest toaster/master
Comment 5 Alexandru Damian 2014-03-05 10:51:34 UTC
This patch was submitted for review with the set of patches for Toaster build functionality, but probably will not be merged in 1.6.
Comment 6 Alexandru Damian 2014-03-07 15:39:38 UTC
Simplified patch submitted for review. 

This patch just forces a toaster shutdown on the stop command.
Comment 7 Alexandru Damian 2014-03-12 11:46:18 UTC
Merged into origin/master.
Comment 8 Belen Barros Pena 2014-03-18 13:40:25 UTC
Created attachment 1832 [details]
lock state error message

This is how the new error message looks like. Jessica, Paul: feel free to comment as needed.
Comment 9 Paul Eggleton 2014-03-18 13:51:50 UTC
This isn't the fix we discussed. What we discussed was toaster starting what needs to be started even if part of it is running, with a warning if some previous (known invalid) state is present.
Comment 10 Andreea Brandusa Proca 2014-03-21 11:54:11 UTC
A new bug will be opened for this issue and I will set this as verified.