<?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>3978</bug_id>
          
          <creation_ts>2013-03-04 16:18:59 +0000</creation_ts>
          <short_desc>Infinite hang in bitbake parse if you have certain types of parse errors</short_desc>
          <delta_ts>2013-03-06 15:43:40 +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.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jason Wessel">jason.wessel</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>kergoth</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>30409</commentid>
    <comment_count>0</comment_count>
    <who name="Jason Wessel">jason.wessel</who>
    <bug_when>2013-03-04 16:18:59 +0000</bug_when>
    <thetext></thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30410</commentid>
    <comment_count>1</comment_count>
      <attachid>1104</attachid>
    <who name="Jason Wessel">jason.wessel</who>
    <bug_when>2013-03-04 16:20:16 +0000</bug_when>
    <thetext>Created attachment 1104
Patch to apply to get the hang</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30411</commentid>
    <comment_count>2</comment_count>
    <who name="Jason Wessel">jason.wessel</who>
    <bug_when>2013-03-04 16:24:20 +0000</bug_when>
    <thetext>The latest bitbake code will hang at the parse stage indefinitely if you have certain types of parse failures.  There is an attachment to this case which causes a parse failure.  You check out the latest poky master and apply the patch and then do:

bitbake core-image-minimal

The parse should hang before 100%.

I worked around the problem by reverting the following changes to the bitbake master.

9ca8e513dc142dd7aefadeb6db2ccdb00f38b39f (cooker: now that we use a Pool, raise the exceptions)
8af519a49a3374bd9004864ef31ca8aa328e9f34 (cooker: parse using bb.compat.Pool)

The problem is actually introduced in the 8af519 commit, but the 9ac8e commit makes it happen everytime with respect to the hang. 

Jason.


--- a/meta/classes/syslinux.bbclass
+++ b/meta/classes/syslinux.bbclass
@@ -20,6 +20,7 @@ SYSLINUXMENU = &quot;${S}/menu&quot;
 
 ISOLINUXDIR = &quot;/isolinux&quot;
 SYSLINUXDIR = &quot;/&quot;
+SYSLINUX_SERIAL_ACTIVE ?= &quot;0 115200&quot;
 ISO_BOOTIMG = &quot;isolinux/isolinux.bin&quot;
 ISO_BOOTCAT = &quot;isolinux/boot.cat&quot;
 MKISOFS_OPTIONS = &quot;-no-emul-boot -boot-load-size 4 -boot-info-table&quot;
@@ -149,6 +150,9 @@ python build_syslinux_cfg () {
 
     cfgfile.write(&apos;ALLOWOPTIONS 1\n&apos;);
     cfgfile.write(&apos;DEFAULT %s\n&apos; % (labels.split()[0]))
+    syslinux_serial = d.getVar(&apos;SYSLINUX_SERIAL&apos;, True)
+    if syslinux_serial:
+        cfgfile.write(&apos;SERIAL %s&apos;, % syslinux_serial)
 
     timeout = d.getVar(&apos;SYSLINUX_TIMEOUT&apos;, True)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30477</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-03-06 15:36:10 +0000</bug_when>
    <thetext>I tried this with poky master and see:

NOTE: Error during finalise of /media/build1/poky/meta/recipes-core/images/build-appliance-image.bb                              | ETA:  --:--:--
ERROR: ExpansionError during parsing /media/build1/poky/meta/recipes-core/images/build-appliance-image.bb: Failure expanding variable build_syslinux_cfg: SyntaxError: invalid syntax (&lt;string&gt;, line 40)
ERROR: Command execution failed: Exited with 1

with no hang.

Actually, as long as its not the last task being parsed, it does hang. I&apos;ve spent an age trying to track this down and can&apos;t figure out how to fix it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30478</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-03-06 15:38:22 +0000</bug_when>
    <thetext>I&apos;d note that if we take the shutdown(clean=False) lines out of cooker.py and let the parser finish processing, we don&apos;t see this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30479</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-03-06 15:43:40 +0000</bug_when>
    <thetext>I reverted the problemtic change in http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=164a4cb2fc64e76836182ad2d412343a7b26b964 (and the preceeding commit). I&apos;ll close this for now as such. Chris/I will try and figure out if we can do something better if/as/when we have time.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>1104</attachid>
            <date>2013-03-04 16:20:16 +0000</date>
            <delta_ts>2013-03-04 16:20:16 +0000</delta_ts>
            <desc>Patch to apply to get the hang</desc>
            <filename>cause_parse_failure.patch</filename>
            <type>text/plain</type>
            <size>791</size>
            <attacher name="Jason Wessel">jason.wessel</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL21ldGEvY2xhc3Nlcy9zeXNsaW51eC5iYmNsYXNzIGIvbWV0YS9jbGFzc2Vz
L3N5c2xpbnV4LmJiY2xhc3MKaW5kZXggNjY2ZmZkNi4uNTcxM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