<?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>1017</bug_id>
          
          <creation_ts>2011-04-29 14:10:28 +0000</creation_ts>
          <short_desc>Transient errors triggered by &quot;OperationalError: database is locked&quot;</short_desc>
          <delta_ts>2011-08-05 07:43:19 +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.0</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>1.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Darren Hart">dvhart</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>josh</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</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>13518</commentid>
    <comment_count>0</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2011-04-29 14:10:28 +0000</bug_when>
    <thetext>When doing highly parallel builds I hit the following once or multiple times during a build. The more recipes it needs to parse (versus use the cache), the more often I hit it. Simply restarting the build eventually works passed it.

$ time bitbake poky-image-sato-live
Pseudo is not present but is required, building this first before the main build
NOTE: Error expanding variable WORKDIR                          | ETA:  00:03:30
NOTE: Error expanding variable WORKDIR
ERROR: Error parsing /home/dvhart/source/poky.git/meta/recipes-graphics/libmatchbox/libmatchbox_git.bb: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception OperationalError: database is locked
ERROR: Command execution failed: Exited with 1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13578</commentid>
    <comment_count>1</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2011-05-04 16:57:32 +0000</bug_when>
    <thetext>As a data point, I tried building core-image-sato master today for atom-pc:
61018fda65fcb7a08d74b57abfe8e8809fcdaae0

I included meta and meta-yocto in meta layers. I deleted tmp and sstate-cache. 

BB_NUMBER_THREADS = &quot;24&quot;
PARALLEL_MAKE = &quot;-j 24&quot;

There was a lot of disk I/O from background rm processes.

It took my 5 runs to get it to complete parsing the recipes and start running tasks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13619</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-05-06 14:15:19 +0000</bug_when>
    <thetext>Crazy request but this code just changed heavily in master with changes from upstream. Could you retest please?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13622</commentid>
    <comment_count>3</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2011-05-06 14:33:43 +0000</bug_when>
    <thetext>Will do so tonight.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13627</commentid>
    <comment_count>4</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2011-05-06 17:27:16 +0000</bug_when>
    <thetext>Well, turns out I was a few commits behind on my build machine. Pulling the latest master (0788081ac7a04f94c349b2673ed6ae122aa7d1a8) and trying to build core-image-sato yields an immediate new kind of failure:


Pseudo is not present but is required, building this first before the main build
Traceback (most recent call last):
  File &quot;/home/dvhart/source/poky.git/bitbake/bin/bitbake&quot;, line 34, in &lt;module&gt;
    import bb
  File &quot;/home/dvhart/source/poky.git/bitbake/lib/bb/__init__.py&quot;, line 74, in &lt;module&gt;
    from bb import fetch2 as fetch
  File &quot;/home/dvhart/source/poky.git/bitbake/lib/bb/fetch2/__init__.py&quot;, line 31, in &lt;module&gt;
    import bb.data, bb.persist_data, bb.utils
  File &quot;/home/dvhart/source/poky.git/bitbake/lib/bb/persist_data.py&quot;, line 29, in &lt;module&gt;
    from bb.compat import total_ordering
ImportError: No module named compat
/home/dvhart/source/poky.git/bitbake/lib/bb/event.py:100: RuntimeWarning: Parent module &apos;bb&apos; not found while handling absolute import
  from bb.msg import BBLogFormatter
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File &quot;/usr/lib/python2.6/atexit.py&quot;, line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File &quot;/home/dvhart/source/poky.git/bitbake/lib/bb/event.py&quot;, line 100, in print_ui_queue
    from bb.msg import BBLogFormatter
  File &quot;/home/dvhart/source/poky.git/bitbake/lib/bb/__init__.py&quot;, line 74, in &lt;module&gt;
    from bb import fetch2 as fetch
  File &quot;/home/dvhart/source/poky.git/bitbake/lib/bb/fetch2/__init__.py&quot;, line 31, in &lt;module&gt;
    import bb.data, bb.persist_data, bb.utils
  File &quot;/home/dvhart/source/poky.git/bitbake/lib/bb/persist_data.py&quot;, line 29, in &lt;module&gt;
    from bb.compat import total_ordering
ImportError: No module named compat
Error in sys.exitfunc:
Traceback (most recent call last):
  File &quot;/usr/lib/python2.6/atexit.py&quot;, line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File &quot;/home/dvhart/source/poky.git/bitbake/lib/bb/event.py&quot;, line 100, in print_ui_queue
    from bb.msg import BBLogFormatter
  File &quot;/home/dvhart/source/poky.git/bitbake/lib/bb/__init__.py&quot;, line 74, in &lt;module&gt;
    from bb import fetch2 as fetch
  File &quot;/home/dvhart/source/poky.git/bitbake/lib/bb/fetch2/__init__.py&quot;, line 31, in &lt;module&gt;
    import bb.data, bb.persist_data, bb.utils
  File &quot;/home/dvhart/source/poky.git/bitbake/lib/bb/persist_data.py&quot;, line 29, in &lt;module&gt;
    from bb.compat import total_ordering
ImportError: No module named compat</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13628</commentid>
    <comment_count>5</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2011-05-06 17:35:58 +0000</bug_when>
    <thetext>Bisecting the last 45 patches unfortunately yielded a pair of different sorts of failures. The one reported above as well as:


Pseudo is not present but is required, building this first before the main build
Traceback (most recent call last):
  File &quot;/home/dvhart/source/poky.git/bitbake/bin/bitbake&quot;, line 219, in &lt;module&gt;
    ret = main()
  File &quot;/home/dvhart/source/poky.git/bitbake/bin/bitbake&quot;, line 193, in main
    cooker = bb.cooker.BBCooker(configuration, server)
  File &quot;/home/dvhart/source/poky.git/bitbake/lib/bb/cooker.py&quot;, line 82, in __init__
    self.parseConfigurationFiles(self.configuration.file)
  File &quot;/home/dvhart/source/poky.git/bitbake/lib/bb/cooker.py&quot;, line 628, in parseConfigurationFiles
    bb.fetch.fetcher_init(self.configuration.data)
  File &quot;/home/dvhart/source/poky.git/bitbake/lib/bb/fetch2/__init__.py&quot;, line 225, in fetcher_init
    pd = persist_data.persist(d)
NameError: global name &apos;persist_data&apos; is not defined


We should be ensuring our patch series are bisectable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13629</commentid>
    <comment_count>6</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2011-05-06 18:10:29 +0000</bug_when>
    <thetext>I think this is a separate issue. We&apos;re missing a module from upstream BitBake[1] which was added by a patch from Chris Larson[2].

1. http://git.openembedded.org/cgit.cgi/bitbake/tree/lib/bb/compat.py
2/ http://git.openembedded.org/cgit.cgi/bitbake/commit/lib/bb/compat.py?id=1190406c526c7bb7cf415867be83e0403812a7dd</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13632</commentid>
    <comment_count>7</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-05-07 01:00:37 +0000</bug_when>
    <thetext>compat.py is a separate issue which has been fixed. Changes should always be bisectable, I agree but in this case I failed to merge all the patches in the correct order and didn&apos;t realise until it was too late to be able to correct the series.

If you could test with the compat.py file added I&apos;d appreciate it, thanks and sorry about this mess.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13633</commentid>
    <comment_count>8</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2011-05-07 10:09:11 +0000</bug_when>
    <thetext>Sorry about the last two comments, those should have gone to the list, obviously not related.

With master as of:

commit 506241c914383c20561144069ba0b0d3850ce8cc
Author: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
Date:   Sat May 7 08:49:28 2011 +0100

    bitbake: Add missing file


I did 5 clean recipe parsings in a row for each of qemux86 and n450:

$ rm -rf tmp; bitbake core-image-sato

And saw no &quot;database is locked&quot; errors. Perhaps this is behind us? I suggest we close with the understand that without an explicit fix we may have just changed the race window sufficiently to mask the issue for a time. We may need to reopen.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15258</commentid>
    <comment_count>9</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-08-05 07:43:19 +0000</bug_when>
    <thetext>Closing as we&apos;re not seeing reports of these anymore. Please reopen or refile if these occur again.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>