<?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>13183</bug_id>
          
          <creation_ts>2019-02-15 09:31:49 +0000</creation_ts>
          <short_desc>bitbake-layers crashes with incorrect layer configuration data is given (expected proper error printing and exit with error)</short_desc>
          <delta_ts>2021-12-13 23:18:18 +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>2.6.1</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>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.0 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Viktor Mitin">viktor.mitin.19</reporter>
          <assigned_to name="Steve Sakoman">steve</assigned_to>
          <cc>andrei</cc>
    
    <cc>mostthingsweb</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sungwon.pino</cc>
    
    <cc>viktor.mitin.19</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>83017</commentid>
    <comment_count>0</comment_count>
    <who name="Viktor Mitin">viktor.mitin.19</who>
    <bug_when>2019-02-15 09:31:49 +0000</bug_when>
    <thetext>Hi,

After adding meta-updater layer I get the next bitbake-layers crash:
https://github.com/advancedtelematic/meta-updater.git


c@cd:~/w/poky_thud/build$ bitbake-layers
NOTE: Starting bitbake server...
Traceback (most recent call last):
  File &quot;/home/c/w/poky_thud/bitbake/bin/bitbake-layers&quot;, line 103, in &lt;module&gt;
    ret = main()
  File &quot;/home/c/w/poky_thud/bitbake/bin/bitbake-layers&quot;, line 71, in main
    tinfoil.prepare(True)
  File &quot;/home/c/w/poky_thud/bitbake/lib/bb/tinfoil.py&quot;, line 418, in prepare
    self.run_command(&apos;parseConfiguration&apos;)
  File &quot;/home/c/w/poky_thud/bitbake/lib/bb/tinfoil.py&quot;, line 476, in run_command
    raise TinfoilCommandFailed(result[1])
bb.tinfoil.TinfoilCommandFailed: Traceback (most recent call last):
  File &quot;/home/c/w/poky_thud/bitbake/lib/bb/command.py&quot;, line 84, in runCommand
    result = command_method(self, commandline)
  File &quot;/home/c/w/poky_thud/bitbake/lib/bb/command.py&quot;, line 285, in parseConfiguration
    command.cooker.parseConfiguration()
  File &quot;/home/c/w/poky_thud/bitbake/lib/bb/cooker.py&quot;, line 437, in parseConfiguration
    self.handleCollections(self.data.getVar(&quot;BBFILE_COLLECTIONS&quot;))
  File &quot;/home/c/w/poky_thud/bitbake/lib/bb/cooker.py&quot;, line 1236, in handleCollections
    raise CollectionError(&quot;Errors during parsing layer configuration&quot;)
bb.cooker.CollectionError: Errors during parsing layer configuration</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83018</commentid>
    <comment_count>1</comment_count>
    <who name="Viktor Mitin">viktor.mitin.19</who>
    <bug_when>2019-02-15 10:58:23 +0000</bug_when>
    <thetext>Build 02-15-2019 on Ubuntu 18.04.2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83019</commentid>
    <comment_count>2</comment_count>
    <who name="Viktor Mitin">viktor.mitin.19</who>
    <bug_when>2019-02-15 12:04:36 +0000</bug_when>
    <thetext>Checking out &apos;Thud&apos; tag in meta-updater layer sources resolves bitbake-layers crash. However, bitbake-layers should no crash when incorrect layer configuration data was given. No?

Thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83066</commentid>
    <comment_count>3</comment_count>
    <who name="Viktor Mitin">viktor.mitin.19</who>
    <bug_when>2019-02-21 15:48:12 +0000</bug_when>
    <thetext>Please note that this issue has been reconstructed with &apos;older&apos; version of Yocto as well (do not remember which one, seems Rocko). So it looks like it is relevant for the previous versions of Yocto as well.

Thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83111</commentid>
    <comment_count>4</comment_count>
    <who name="sungwon.pino">sungwon.pino</who>
    <bug_when>2019-02-25 13:18:01 +0000</bug_when>
    <thetext>Hello

bitbake-layer work well, before I type `apt-get upgrade` 
both ubuntu 16.04 and ubuntu 18.04
So share the apt-get upgrade log.

pino@pino-dev:~$ sudo apt-get upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  gconf-service gconf-service-backend gconf2-common libgconf-2-4
  x11proto-dri2-dev x11proto-gl-dev
Use &apos;sudo apt autoremove&apos; to remove them.
The following packages will be upgraded:
  bind9-host dnsutils ghostscript ghostscript-x libbind9-160 libdns-export1100
  libdns1100 libgs9 libgs9-common libirs160 libisc-export169 libisc169
  libisccc160 libisccfg160 liblwres160
15 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/9,912 kB of archives.
After this operation, 11.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 195919 files and directories currently installed.)
Preparing to unpack .../00-libisc-export169_1%3a9.11.3+dfsg-1ubuntu1.5_amd64.deb ...
Unpacking libisc-export169:amd64 (1:9.11.3+dfsg-1ubuntu1.5) over (1:9.11.3+dfsg-1ubuntu1.3) ...
Preparing to unpack .../01-libdns-export1100_1%3a9.11.3+dfsg-1ubuntu1.5_amd64.deb ...
Unpacking libdns-export1100 (1:9.11.3+dfsg-1ubuntu1.5) over (1:9.11.3+dfsg-1ubuntu1.3) ...
Preparing to unpack .../02-libirs160_1%3a9.11.3+dfsg-1ubuntu1.5_amd64.deb ...
Unpacking libirs160:amd64 (1:9.11.3+dfsg-1ubuntu1.5) over (1:9.11.3+dfsg-1ubuntu1.3) ...
Preparing to unpack .../03-bind9-host_1%3a9.11.3+dfsg-1ubuntu1.5_amd64.deb ...
Unpacking bind9-host (1:9.11.3+dfsg-1ubuntu1.5) over (1:9.11.3+dfsg-1ubuntu1.3) ...
Preparing to unpack .../04-dnsutils_1%3a9.11.3+dfsg-1ubuntu1.5_amd64.deb ...
Unpacking dnsutils (1:9.11.3+dfsg-1ubuntu1.5) over (1:9.11.3+dfsg-1ubuntu1.3) ...
Preparing to unpack .../05-libbind9-160_1%3a9.11.3+dfsg-1ubuntu1.5_amd64.deb ...
Unpacking libbind9-160:amd64 (1:9.11.3+dfsg-1ubuntu1.5) over (1:9.11.3+dfsg-1ubuntu1.3) ...
Preparing to unpack .../06-libisccfg160_1%3a9.11.3+dfsg-1ubuntu1.5_amd64.deb ...
Unpacking libisccfg160:amd64 (1:9.11.3+dfsg-1ubuntu1.5) over (1:9.11.3+dfsg-1ubuntu1.3) ...
Preparing to unpack .../07-libisccc160_1%3a9.11.3+dfsg-1ubuntu1.5_amd64.deb ...
Unpacking libisccc160:amd64 (1:9.11.3+dfsg-1ubuntu1.5) over (1:9.11.3+dfsg-1ubuntu1.3) ...
Preparing to unpack .../08-libdns1100_1%3a9.11.3+dfsg-1ubuntu1.5_amd64.deb ...
Unpacking libdns1100:amd64 (1:9.11.3+dfsg-1ubuntu1.5) over (1:9.11.3+dfsg-1ubuntu1.3) ...
Preparing to unpack .../09-libisc169_1%3a9.11.3+dfsg-1ubuntu1.5_amd64.deb ...
Unpacking libisc169:amd64 (1:9.11.3+dfsg-1ubuntu1.5) over (1:9.11.3+dfsg-1ubuntu1.3) ...
Preparing to unpack .../10-liblwres160_1%3a9.11.3+dfsg-1ubuntu1.5_amd64.deb ...
Unpacking liblwres160:amd64 (1:9.11.3+dfsg-1ubuntu1.5) over (1:9.11.3+dfsg-1ubuntu1.3) ...
Preparing to unpack .../11-ghostscript-x_9.26~dfsg+0-0ubuntu0.18.04.6_amd64.deb ...
Unpacking ghostscript-x (9.26~dfsg+0-0ubuntu0.18.04.6) over (9.26~dfsg+0-0ubuntu0.18.04.4) ...
Preparing to unpack .../12-ghostscript_9.26~dfsg+0-0ubuntu0.18.04.6_amd64.deb ...
Unpacking ghostscript (9.26~dfsg+0-0ubuntu0.18.04.6) over (9.26~dfsg+0-0ubuntu0.18.04.4) ...
Preparing to unpack .../13-libgs9_9.26~dfsg+0-0ubuntu0.18.04.6_amd64.deb ...
Unpacking libgs9:amd64 (9.26~dfsg+0-0ubuntu0.18.04.6) over (9.26~dfsg+0-0ubuntu0.18.04.4) ...
Preparing to unpack .../14-libgs9-common_9.26~dfsg+0-0ubuntu0.18.04.6_all.deb ...
Unpacking libgs9-common (9.26~dfsg+0-0ubuntu0.18.04.6) over (9.26~dfsg+0-0ubuntu0.18.04.4) ...
Setting up libgs9-common (9.26~dfsg+0-0ubuntu0.18.04.6) ...
Setting up libisc169:amd64 (1:9.11.3+dfsg-1ubuntu1.5) ...
Setting up libisccc160:amd64 (1:9.11.3+dfsg-1ubuntu1.5) ...
Setting up libisc-export169:amd64 (1:9.11.3+dfsg-1ubuntu1.5) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up libdns-export1100 (1:9.11.3+dfsg-1ubuntu1.5) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Setting up libdns1100:amd64 (1:9.11.3+dfsg-1ubuntu1.5) ...
Setting up libgs9:amd64 (9.26~dfsg+0-0ubuntu0.18.04.6) ...
Setting up liblwres160:amd64 (1:9.11.3+dfsg-1ubuntu1.5) ...
Setting up ghostscript (9.26~dfsg+0-0ubuntu0.18.04.6) ...
Setting up libisccfg160:amd64 (1:9.11.3+dfsg-1ubuntu1.5) ...
Setting up ghostscript-x (9.26~dfsg+0-0ubuntu0.18.04.6) ...
Setting up libirs160:amd64 (1:9.11.3+dfsg-1ubuntu1.5) ...
Setting up libbind9-160:amd64 (1:9.11.3+dfsg-1ubuntu1.5) ...
Setting up bind9-host (1:9.11.3+dfsg-1ubuntu1.5) ...
Setting up dnsutils (1:9.11.3+dfsg-1ubuntu1.5) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83112</commentid>
    <comment_count>5</comment_count>
    <who name="Viktor Mitin">viktor.mitin.19</who>
    <bug_when>2019-02-25 14:25:56 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; Hello
&gt; 
&gt; bitbake-layer work well, before I type `apt-get upgrade` 
&gt; both ubuntu 16.04 and ubuntu 18.04
&gt; So share the apt-get upgrade log.
&gt; 
&gt; pino@pino-dev:~$ sudo apt-get upgrade 
...
&gt; Setting up bind9-host (1:9.11.3+dfsg-1ubuntu1.5) ...
&gt; Setting up dnsutils (1:9.11.3+dfsg-1ubuntu1.5) ...
&gt; Processing triggers for libc-bin (2.27-3ubuntu1) ...

Hello,

I&apos;m using latest updates for Ubuntu. Please try the next scenario to reconstruct this issue:

1. Clone Yocto Thud to some directory, for example ./myproject
2. Clone https://github.com/advancedtelematic/meta-updater.git layer to the same directory and change directory to it. Do not use checkout to &apos;thud&apos; branch (it will work in case of thud branch). Use master branch for this check (default after clone).
3. Add next line `BBLAYERS += &quot;${METADIR}/meta-updater&quot;` to bblayers.conf
4. Run bitbake or bitbake-layers to see the crash mentioned in the bug description (the crash not expected to appear in this case).

-----------------
5. Go to meta-updater directory and checkout to &apos;thud&apos; tag. Restart bitbake-layers - it will not crash in this case (expected)

Thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83114</commentid>
    <comment_count>6</comment_count>
    <who name="sungwon.pino">sungwon.pino</who>
    <bug_when>2019-02-25 16:55:07 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #4)
&gt; &gt; Hello
&gt; &gt; 
&gt; &gt; bitbake-layer work well, before I type `apt-get upgrade` 
&gt; &gt; both ubuntu 16.04 and ubuntu 18.04
&gt; &gt; So share the apt-get upgrade log.
&gt; &gt; 
&gt; &gt; pino@pino-dev:~$ sudo apt-get upgrade 
&gt; ...
&gt; &gt; Setting up bind9-host (1:9.11.3+dfsg-1ubuntu1.5) ...
&gt; &gt; Setting up dnsutils (1:9.11.3+dfsg-1ubuntu1.5) ...
&gt; &gt; Processing triggers for libc-bin (2.27-3ubuntu1) ...
&gt; 
&gt; Hello,
&gt; 
&gt; I&apos;m using latest updates for Ubuntu. Please try the next scenario to
&gt; reconstruct this issue:
&gt; 
&gt; 1. Clone Yocto Thud to some directory, for example ./myproject
&gt; 2. Clone https://github.com/advancedtelematic/meta-updater.git layer to the
&gt; same directory and change directory to it. Do not use checkout to &apos;thud&apos;
&gt; branch (it will work in case of thud branch). Use master branch for this
&gt; check (default after clone).
&gt; 3. Add next line `BBLAYERS += &quot;${METADIR}/meta-updater&quot;` to bblayers.conf
&gt; 4. Run bitbake or bitbake-layers to see the crash mentioned in the bug
&gt; description (the crash not expected to appear in this case).
&gt; 
&gt; -----------------
&gt; 5. Go to meta-updater directory and checkout to &apos;thud&apos; tag. Restart
&gt; bitbake-layers - it will not crash in this case (expected)
&gt; 
&gt; Thanks

you right.
but in my case master and thud branch
are return same error log.
you mentioned.

&lt;branch : master &amp; thud&gt;
1. git clone poky
2. git clone meta-updater in poky directory.
3. source oe-init-build-env to set bitbake env.
4. bitbake-layer add-layer ../meta-updater (work fine, it&apos;s ok)
5. check bblayer.conf added meta-updater.
6. bitbake-layer add-layer ../meta-updater again.
6. issue occur.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85225</commentid>
    <comment_count>7</comment_count>
    <who name="Chris Laplante">mostthingsweb</who>
    <bug_when>2019-10-05 22:46:56 +0000</bug_when>
    <thetext>I hit this today. The problem is that the actual errors are getting logged to the &quot;BitBake.Parsing&quot; logging namespace, which the bitbake-layers isn&apos;t exposing. The errors for me at least were still printed to bitbake-cookerdaemon.log.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88182</commentid>
    <comment_count>8</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2020-09-21 02:56:51 +0000</bug_when>
    <thetext>*** Bug 14053 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92050</commentid>
    <comment_count>9</comment_count>
    <who name="Andrei Gherzan">andrei</who>
    <bug_when>2021-11-21 13:36:51 +0000</bug_when>
    <thetext>This issue was fixed in master. To be more specific, the fixes firstly landed in  `2020-10-gatesgarth`. There are three patches that fix two sides of this issue:
1. fixes surfacing the server logs on parsing error
2. avoids `traceback` on `bb.cooker.CollectionError` - fixed logs above will be clear enough

On dunfell (bitbake 1.46)  three patches are needed:

86b24016 command: Ensure exceptions inheriting from BBHandledException are visible
e40fc16a tinfoil: When sending commands we need to process events
579f6896 process/knotty: Improve early exception handling

This report, as far as I can see, was raised against `thud` but I haven&apos;t checked how these patches apply against that release.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92051</commentid>
    <comment_count>10</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-11-21 13:41:12 +0000</bug_when>
    <thetext>Thanks Andrei, reassigning to Steve so we can fix this in dunfell and then close the bug as it was already fixed in master.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92052</commentid>
    <comment_count>11</comment_count>
    <who name="Andrei Gherzan">andrei</who>
    <bug_when>2021-11-21 13:48:59 +0000</bug_when>
    <thetext>(In reply to comment #9)
&gt; This issue was fixed in master. To be more specific, the fixes firstly
&gt; landed in  `2020-10-gatesgarth`. There are three patches that fix two sides
&gt; of this issue:
&gt; 1. fixes surfacing the server logs on parsing error
&gt; 2. avoids `traceback` on `bb.cooker.CollectionError` - fixed logs above will
&gt; be clear enough
&gt; 
&gt; On dunfell (bitbake 1.46)  three patches are needed:
&gt; 
&gt; 86b24016 command: Ensure exceptions inheriting from BBHandledException are
&gt; visible
&gt; e40fc16a tinfoil: When sending commands we need to process events
&gt; 579f6896 process/knotty: Improve early exception handling
&gt; 
&gt; This report, as far as I can see, was raised against `thud` but I haven&apos;t
&gt; checked how these patches apply against that release.

The git hashes I&apos;ve posted above were wrong (as they were from a branch with cherry-picked commits). Here are the right SHAs in the bitbake repository:

ef762d92 command: Ensure exceptions inheriting from BBHandledException are visible
64ae9d7e tinfoil: When sending commands we need to process events
6059d0e7 process/knotty: Improve early exception handling</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92160</commentid>
    <comment_count>12</comment_count>
    <who name="Steve Sakoman">steve</who>
    <bug_when>2021-12-13 23:18:18 +0000</bug_when>
    <thetext>Fixed in dunfell/1.46

7fdd43c5 process/knotty: Improve early exception handling
f20da524 tinfoil: When sending commands we need to process events
80348b68 command: Ensure exceptions inheriting from BBHandledException are visible</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>