Bug 5376 - Toaster unclean shutdown should be handled gracefully
Summary: Toaster unclean shutdown should be handled gracefully
Status: VERIFIED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: unspecified
Hardware: All Multiple
: Medium normal
Target Milestone: 1.6 M4
Assignee: Alexandru Damian
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-10-22 16:04 UTC by Belen Barros Pena
Modified: 2014-03-21 11:54 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
lock state error message (70.52 KB, image/png)
2014-03-18 13:40 UTC, Belen Barros Pena
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.