<?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>7965</bug_id>
          
          <creation_ts>2015-07-07 16:48:13 +0000</creation_ts>
          <short_desc>localhostbecontroller needs to wait for ToasterUI, not for the server to start</short_desc>
          <delta_ts>2015-08-19 09:12:21 +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>1.9</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>1.9 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexandru Damian">alexandru.damian</reporter>
          <assigned_to name="Ed Bartosh">eduard.bartosh</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>alexandru.damian</cc>
    
    <cc>belen.barros.pena</cc>
    
    <cc>cristiana.voicu</cc>
    
    <cc>cristina-danielax.agurida</cc>
    
    <cc>eduard.bartosh</cc>
    
    <cc>jessica.zhang</cc>
          
          <qa_contact name="Cristina Agurida">cristina-danielax.agurida</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>52187</commentid>
    <comment_count>0</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2015-07-07 16:48:13 +0000</bug_when>
    <thetext>The patch:

bitbake: toaster: Fix build execution regression

bringing in

-                    if line.startswith(&quot;NOTE: ToasterUI waiting for events&quot;):
+                    if line.startswith(&quot;Bitbake server started on demand&quot;):

changes the logic for the build launcher from waiting for the ToasterUI to start (and the logging to happen in the database) to waiting for the server to start.

This can lead to a race condition and subtle errors in data logging.

I am not sure what was the bug that required this change, but this is not the right fix.

Please revert this patch, and apply a correct fix, after opening up a Bugzilla entry for the original bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52219</commentid>
    <comment_count>1</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-07-08 15:43:41 +0000</bug_when>
    <thetext>It was quick bad straightforward fix for the recent master breakage.
The reason for it is that there was no message &quot;NOTE: ToasterUI waiting for events&quot; in the log.

I&apos;ll try to fix it properly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52235</commentid>
    <comment_count>2</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-07-09 13:18:14 +0000</bug_when>
    <thetext>I reproduced that issue after reverting my patch. Here is it:
2015-07-09 16:14:25,993 DEBUG localhostbecontroller: Waiting bitbake server to start
2015-07-09 16:14:26,510 DEBUG localhostbecontroller: Waiting bitbake server to start
2015-07-09 16:14:27,022 DEBUG localhostbecontroller: Waiting bitbake server to start
2015-07-09 16:14:27,529 DEBUG localhostbecontroller: Waiting bitbake server to start
2015-07-09 16:14:28,035 DEBUG localhostbecontroller: Waiting bitbake server to start
2015-07-09 16:14:28,539 DEBUG localhostbecontroller: Waiting bitbake server to start
2015-07-09 16:14:29,041 DEBUG localhostbecontroller: Waiting bitbake server to start
2015-07-09 16:14:29,574 DEBUG localhostbecontroller: Waiting bitbake server to start
2015-07-09 16:14:30,075 DEBUG localhostbecontroller: Waiting bitbake server to start
2015-07-09 16:14:30,578 DEBUG localhostbecontroller: Waiting bitbake server to start
Traceback (most recent call last):
  File &quot;/home/ed/git/yocto/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py&quot;, line 59, in schedule
    bec.triggerBuild(br.brbitbake_set.all(), br.brlayer_set.all(), br.brvariable_set.all(), br.brtarget_set.all())
  File &quot;/home/ed/git/yocto/poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py&quot;, line 329, in triggerBuild
    bbctrl = self.getBBController()
  File &quot;/home/ed/git/yocto/poky/bitbake/lib/toaster/bldcontrol/bbcontroller.py&quot;, line 166, in getBBController
    self.startBBServer()
  File &quot;/home/ed/git/yocto/poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py&quot;, line 158, in startBBServer
    raise BuildSetupException(&quot;localhostbecontroller: Bitbake server did not start in 5 seconds, aborting (Error: &apos;%s&apos; &apos;%s&apos;)&quot; % (toaster_ui_log, toaster_server_log))
BuildSetupException: localhostbecontroller: Bitbake server did not start in 5 seconds, aborting (Error: &apos;

If you have any ideas how to fix this please let me know. I&apos;ll continue investigating it myself but it would be nice to have some hints anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52288</commentid>
    <comment_count>3</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-07-10 14:50:30 +0000</bug_when>
    <thetext>Submitted for review with couple of other changes: https://lists.yoctoproject.org/pipermail/toaster/2015-July/002307.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52472</commentid>
    <comment_count>4</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-07-19 19:30:55 +0000</bug_when>
    <thetext>Updated patch according to review comments: https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=ed/toaster/misc&amp;id=6d1ddedaef28c0f17c2b821c3ceb077641fab772</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52677</commentid>
    <comment_count>5</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-07-28 16:01:13 +0000</bug_when>
    <thetext>Fix is now in ed/toaster/20150728:
https://lists.yoctoproject.org/pipermail/toaster/2015-July/002404.html

please, review and merge</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52774</commentid>
    <comment_count>6</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-08-03 09:06:08 +0000</bug_when>
    <thetext>The fix has been merged to upstream master: http://cgit.openembedded.org/bitbake/commit/?id=f1d8e0ff7233f17cff3a56db10d2443b392b407d</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53210</commentid>
    <comment_count>7</comment_count>
    <who name="Cristina Agurida">cristina-danielax.agurida</who>
    <bug_when>2015-08-19 09:12:21 +0000</bug_when>
    <thetext>Verified on master: c75cefe8a382a63f625123c156137782db118f64</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>