<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11833</bug_id>
          
          <creation_ts>2017-07-25 20:31:15 +0000</creation_ts>
          <short_desc>Toaster timeout for bitbake server</short_desc>
          <delta_ts>2017-08-21 03:27:15 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Toaster</product>
          <component>toaster</component>
          <version>2.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>11898</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.4 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Reyna">david.reyna</reporter>
          <assigned_to name="David Reyna">david.reyna</assigned_to>
          <cc>davidx.lopez.barriba</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>stanciux.mihail</cc>
          
          <qa_contact name="Libertad">libertad.gonzalez.de.la.cruz</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>75301</commentid>
    <comment_count>0</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2017-07-25 20:31:15 +0000</bug_when>
    <thetext>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]$</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75308</commentid>
    <comment_count>1</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2017-07-25 23:11:02 +0000</bug_when>
    <thetext>It seems that I have recovered by (a) killing any running toaster, and (b) deleting the &quot;_git___git.yoctoproject.org_poky_master&quot; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75528</commentid>
    <comment_count>2</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2017-08-01 02:06:04 +0000</bug_when>
    <thetext>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 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75581</commentid>
    <comment_count>3</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2017-08-02 00:01:26 +0000</bug_when>
    <thetext>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 &quot;/usr/lib/python3.4/multiprocessing/connection.py&quot;, line 389, in _recv).

If instead you run the bitbake command (like &quot;quilt-native&quot;) _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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75585</commentid>
    <comment_count>4</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2017-08-02 05:53:34 +0000</bug_when>
    <thetext>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. &apos;bitbake quilt-native&apos;). 

When I do finally get a build to run, I can consistently re-trigger the timeout if I &quot;rm -rf cache/* tmp/ sstate-control/&quot; 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).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75791</commentid>
    <comment_count>5</comment_count>
    <who name="David Lopez Barriba">davidx.lopez.barriba</who>
    <bug_when>2017-08-09 22:15:46 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75905</commentid>
    <comment_count>6</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2017-08-16 15:44:08 +0000</bug_when>
    <thetext>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 &apos;server.runCommand&apos; 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 &quot;noweb&quot; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76017</commentid>
    <comment_count>7</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2017-08-21 03:27:15 +0000</bug_when>
    <thetext>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 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>