<?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>6934</bug_id>
          
          <creation_ts>2014-11-05 22:19:12 +0000</creation_ts>
          <short_desc>bitbake hangs when PR server is down or invalid</short_desc>
          <delta_ts>2015-03-12 10:55:23 +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>BitBake</product>
          <component>bitbake</component>
          <version>1.7</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>TC needed</status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>1.8 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ben Shelton">ben.shelton</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>bogdanx.a.voiculescu</cc>
    
    <cc>ke.zou</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>yi.zhao</cc>
    
    <cc>zhangle.yang</cc>
          
          <qa_contact name="Costin">costin.c.constantin</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>46774</commentid>
    <comment_count>0</comment_count>
    <who name="Ben Shelton">ben.shelton</who>
    <bug_when>2014-11-05 22:19:12 +0000</bug_when>
    <thetext>1) Get the latest bitbake and oe-core master as described in http://www.openembedded.org/wiki/OE-Core_Standalone_Setup (note that this also reproduces with Daisy)

2) Edit &lt;build directory&gt;/conf/local.conf and add the line:

PRSERV_HOST = &quot;bob:8585&quot;

3) Set up the environment and bitbake a package, e.g. `bitbake busybox`

You&apos;ll see a traceback like this:

Traceback (most recent call last):
  File &quot;/ssd/builds/oe/oe-core/bitbake/bin/bitbake&quot;, line 382, in &lt;module&gt;
    ret = main()
  File &quot;/ssd/builds/oe/oe-core/bitbake/bin/bitbake&quot;, line 347, in main
    server_connection = server.establishConnection(featureset)
  File &quot;/ssd/builds/oe/oe-core/bitbake/lib/bb/server/process.py&quot;, line 247, in establishConnection
    raise BaseException(error)
BaseException: Traceback (most recent call last):
  File &quot;/ssd/builds/oe/oe-core/bitbake/lib/bb/command.py&quot;, line 71, in runCommand
    result = command_method(self, commandline)
  File &quot;/ssd/builds/oe/oe-core/bitbake/lib/bb/command.py&quot;, line 268, in setFeatures
    command.cooker.setFeatures(features)
  File &quot;/ssd/builds/oe/oe-core/bitbake/lib/bb/cooker.py&quot;, line 164, in setFeatures
    raise Exception(&quot;Illegal state for feature set change&quot;)
Exception: Illegal state for feature set change

ERROR: Unable to set the cooker to the correct featureset: Traceback (most recent call last):
  File &quot;/ssd/builds/oe/oe-core/bitbake/lib/bb/command.py&quot;, line 71, in runCommand
    result = command_method(self, commandline)
  File &quot;/ssd/builds/oe/oe-core/bitbake/lib/bb/command.py&quot;, line 268, in setFeatures
    command.cooker.setFeatures(features)
  File &quot;/ssd/builds/oe/oe-core/bitbake/lib/bb/cooker.py&quot;, line 164, in setFeatures
    raise Exception(&quot;Illegal state for feature set change&quot;)
Exception: Illegal state for feature set change

The build will stay in this state indefinitely.

4) Give Bitbake a Ctrl-C.  Now, do `ps -ef | grep bitbake`, and you&apos;ll see something like this:

bshelton 13109     1 99 16:07 pts/26   00:02:26 python /ssd/builds/oe/oe-core/bitbake/bin/bitbake busybox

Now do `cat /proc/&lt;PID&gt;/status` several times and check the VmSize line each time.  bitbake&apos;s memory usage continues to increase until it is killed.  However, the process sticks around unless you do &apos;kill -9&apos; on it.

Ideally, in this case, I&apos;d like to see an error message indicating that the PR server is down or not responding, and I&apos;d like the build to exit cleanly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47251</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2014-12-01 14:45:19 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=2fc06a12a1fd3988dfb37110a147ea0fbb036174</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47598</commentid>
    <comment_count>2</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2014-12-17 06:29:41 +0000</bug_when>
    <thetext>I tested it with same steps in latest master (8657c2fd57600e0b0eaf2a14692de7453c78e1bb). The traceback disappeared. But the bitbake still hung and didn&apos;t exit.
################
$ bitbake busybox
ERROR: PRservice bob:8585 not available

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

################
  
###############
$ ps aux|grep bitbake
zhaoyi    6803  0.4  0.6  97488 25536 pts/12   S+   14:20   0:01 python /home/zhaoyi/work/poky/poky-build/bitbake/bin/bitbake busybox
zhaoyi    6805  0.0  0.5 175644 22924 pts/12   S+   14:20   0:00 python /home/zhaoyi/work/poky/poky-build/bitbake/bin/bitbake busybox
zhaoyi    6846 26.8  8.9 508392 354556 pts/12  Sl+  14:20   1:26 python /home/zhaoyi/work/poky/poky-build/bitbake/bin/bitbake busybox
zhaoyi    6847 26.7  8.7 504612 349696 pts/12  Sl+  14:20   1:26 python /home/zhaoyi/work/poky/poky-build/bitbake/bin/bitbake busybox
################

And I can not terminate it by Ctrl-C .</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47789</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-01-08 09:43:43 +0000</bug_when>
    <thetext>Really fixed with: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=1393e224b51d07297f615cc53dab4ef3bab72770

What happened is I added the broken line to local.conf and then fixed bitbake until it worked. I did not dirty the cache again and test a reparse with that broken line though. This time I&apos;ve done that!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49397</commentid>
    <comment_count>4</comment_count>
    <who name="Costin">costin.c.constantin</who>
    <bug_when>2015-03-12 10:55:23 +0000</bug_when>
    <thetext>Hello,

Verified on latest master and it works:

poky hash: 0aff27522d467ee5d02289594207ddef4add7081

cosscat@ubnt:/media/yp_builds/poky/build$ bitbake busybox
ERROR: PRservice costin:8585 not available

Summary: There was 1 ERROR message shown, returning a non-zero exit code.
cosscat@ubnt:/media/yp_builds/poky/build$ echo $?
1

Bitbake exits without problem.

Costin</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>