Bug 11833 - Toaster timeout for bitbake server
Summary: Toaster timeout for bitbake server
Status: RESOLVED DUPLICATE of bug 11898
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: 2.4
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.4 M3
Assignee: David Reyna
QA Contact: Libertad
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-07-25 20:31 UTC by David Reyna
Modified: 2017-08-21 03:27 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Reyna 2017-07-25 20:31:15 UTC
Latest changes to bitbake has broken the communication with Toaster.

[poky]$ git pull
[poky]$ . oe-init-build-env 
[build]$ . toaster start noweb
The system will start.
Successful start.
[build]$ bitbake core-image-minimal
Gave up; Too many tries: timeout while attempting to communicate with bitbake server
[build]$
Comment 1 David Reyna 2017-07-25 23:11:02 UTC
It seems that I have recovered by (a) killing any running toaster, and (b) deleting the "_git___git.yoctoproject.org_poky_master" repo.

The root cause appears to be a sync error between the versions of bitbake in the host Toaster and the cached repo directory, which makes sense give the massive recent changes.
Comment 2 David Reyna 2017-08-01 02:06:04 UTC
The basic root cause is resolved with 11851. The previous comment about deleting clones turns out to solve the problem by the simple time delay, not any mismatched content.

I did get this issue intermittently with non-Toaster usage, which makes it a bb problem. I believe that has or is being addresses with other bitbake-devel patches.

*** This bug has been marked as a duplicate of bug 11851 ***
Comment 3 David Reyna 2017-08-02 00:01:26 UTC
New information.

If you create a new build directory, start Toaster, and then attempt a bitbake build, you will generally get a server timeout (or sometimes you will get EOFError an on File "/usr/lib/python3.4/multiprocessing/connection.py", line 389, in _recv).

If instead you run the bitbake command (like "quilt-native") _first_ and then start Toaster, the bitbake command will generally start and run just fine.

There is a wait or race condition with the bitbake sever when Toaster is the command line UI.
Comment 4 David Reyna 2017-08-02 05:53:34 UTC
1) Moving the code around and adding lots of log messages, it appears that the timeout is whatever server call happens after the server call to start the build .

2) I can consistently get the timeout the first time or two (e.g. 'bitbake quilt-native'). 

When I do finally get a build to run, I can consistently re-trigger the timeout if I "rm -rf cache/* tmp/ sstate-control/" and restart a build.

3) I suspect that knotty does not have this problem since it does not send any sever commands after the build starts (the only exception is when there is a CTLR-C from the user).
Comment 5 David Lopez Barriba 2017-08-09 22:15:46 UTC
I found this issue when I tried to start toaster in the commit 9ed748a542b520c1cb763d981969233c0f5efd4e, I solved it by killing any bitbake process and starting over.
Comment 6 David Reyna 2017-08-16 15:44:08 UTC
I have filed this bug against bitbake since the issue appears to not be in the Toaster code:

   Bug 11898 - bitbake server timeout on first 'server.runCommand' call after build starts

I am writing a simpler test case which I will base on knotty.

I will try out David Lopez Barriba observation (thank you!) to see if that helps. In my tests I tried to remove all background python and bitbake tasks, and I also replicated with the "noweb" option to remove that variable. My results were all over the place.

I will keep this bug open to track the issue and the bitbake progress.
Comment 7 David Reyna 2017-08-21 03:27:15 UTC
The bug 11898 has been accepted and is being worked on by bitbake-devel.

I am formally marking this as a duplicate.

*** This bug has been marked as a duplicate of bug 11898 ***