<?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>13108</bug_id>
          
          <creation_ts>2018-12-28 15:00:09 +0000</creation_ts>
          <short_desc>log show many fetch error after commit: bitbake: persist_data: Retry database setup</short_desc>
          <delta_ts>2019-01-05 15:09:25 +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</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>2.7 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>openatv</reporter>
          <assigned_to name="Joshua Watt">JPEWhacker</assigned_to>
          <cc>nickersk</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <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>82621</commentid>
    <comment_count>0</comment_count>
    <who name="">openatv</who>
    <bug_when>2018-12-28 15:00:09 +0000</bug_when>
    <thetext>we test master branch and after this commit
https://github.com/openembedded/bitbake/commit/5a2a95b0396e39662968690b3065d2f88167a71c

we get many fetch issue i must start build 4-5 times and its running without the fetch error any idea  here the log

ERROR: Traceback (most recent call last):
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/data_smart.py&quot;, line 423, in expandWithRefs
    s = __expand_python_regexp__.sub(varparse.python_sub, s)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/data_smart.py&quot;, line 148, in python_sub
    value = utils.better_eval(codeobj, DataContext(self.d), {&apos;d&apos; : self.d})
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/utils.py&quot;, line 429, in better_eval
    return eval(source, ctx, locals)
  File &quot;Var &lt;SRCPV&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/fetch2/__init__.py&quot;, line 758, in get_srcrev
    fetcher = Fetch(d.getVar(&apos;SRC_URI&apos;).split(), d)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/fetch2/__init__.py&quot;, line 1604, in __init__
    self.ud[url] = FetchData(url, d, localonly)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/fetch2/__init__.py&quot;, line 1275, in __init__
    self.method.urldata_init(self, d)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/fetch2/git.py&quot;, line 242, in urldata_init
    ud.setup_revisions(d)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/fetch2/__init__.py&quot;, line 1305, in setup_revisions
    self.revisions[name] = srcrev_internal_helper(self, d, name)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/fetch2/__init__.py&quot;, line 1170, in srcrev_internal_helper
    srcrev = ud.method.latest_revision(ud, d, name)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/fetch2/__init__.py&quot;, line 1560, in latest_revision
    revs = bb.persist_data.persist(&apos;BB_URI_HEADREVS&apos;, d)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/persist_data.py&quot;, line 308, in persist
    return SQLTable(cachefile, domain)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/persist_data.py&quot;, line 98, in __init__
    self._execute_single(&quot;CREATE TABLE IF NOT EXISTS %s(key TEXT PRIMARY KEY NOT NULL, value TEXT);&quot; % table)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/persist_data.py&quot;, line 55, in wrap_func
    self.reconnect()
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/persist_data.py&quot;, line 115, in reconnect
    self._setup_database()
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/persist_data.py&quot;, line 60, in wrap_func
    return f(self, *args, **kwargs)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/persist_data.py&quot;, line 89, in wrap_func
    return f(self, cursor, *args, **kwargs)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/persist_data.py&quot;, line 103, in _setup_database
    cursor.execute(&quot;pragma synchronous = off;&quot;)
sqlite3.OperationalError: locking protocol

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/bin/bitbake-worker&quot;, line 236, in child
    the_data = bb_cache.loadDataFull(fn, appends)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/cache.py&quot;, line 339, in loadDataFull
    bb_data = self.load_bbfile(virtualfn, appends, virtonly=True)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/cache.py&quot;, line 352, in load_bbfile
    datastores = parse_recipe(bb_data, bbfile, appends, mc)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/cache.py&quot;, line 315, in parse_recipe
    bb_data = bb.parse.handle(bbfile, bb_data)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/parse/__init__.py&quot;, line 117, in handle
    return h[&apos;handle&apos;](fn, data, include)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/parse/parse_py/BBHandler.py&quot;, line 155, in handle
    return ast.multi_finalize(fn, d)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/parse/ast.py&quot;, line 399, in multi_finalize
    finalize(fn, d)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/parse/ast.py&quot;, line 358, in finalize
    runAnonFuncs(d)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/parse/ast.py&quot;, line 342, in runAnonFuncs
    bb.utils.better_exec(&quot;\n&quot;.join(code), {&quot;d&quot;: d})
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/utils.py&quot;, line 404, in better_exec
    exec(code, get_context(), context)
  File &quot;&lt;code&gt;&quot;, line 3, in &lt;module&gt;
  File &quot;/home/oe1/nextp3/build-enviroment/openembedded-core/meta/classes/base.bbclass&quot;, line 666, in __anon_694__home_oe1_nextp3_build_enviroment_openembedded_core_meta_classes_base_bbclass
    fpaths = (d.getVar(&apos;FILESPATH&apos;) or &apos;&apos;).split(&apos;:&apos;)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/data_smart.py&quot;, line 616, in getVar
    return self.getVarFlag(var, &quot;_content&quot;, expand, noweakdefault, parsing)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/data_smart.py&quot;, line 814, in getVarFlag
    parser = self.expandWithRefs(value, cachename)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/data_smart.py&quot;, line 421, in expandWithRefs
    s = __expand_var_regexp__.sub(varparse.var_sub, s)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/data_smart.py&quot;, line 109, in var_sub
    var = self.d.getVarFlag(key, &quot;_content&quot;)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/data_smart.py&quot;, line 814, in getVarFlag
    parser = self.expandWithRefs(value, cachename)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/data_smart.py&quot;, line 421, in expandWithRefs
    s = __expand_var_regexp__.sub(varparse.var_sub, s)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/data_smart.py&quot;, line 109, in var_sub
    var = self.d.getVarFlag(key, &quot;_content&quot;)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/data_smart.py&quot;, line 814, in getVarFlag
    parser = self.expandWithRefs(value, cachename)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/data_smart.py&quot;, line 421, in expandWithRefs
    s = __expand_var_regexp__.sub(varparse.var_sub, s)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/data_smart.py&quot;, line 109, in var_sub
    var = self.d.getVarFlag(key, &quot;_content&quot;)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/data_smart.py&quot;, line 814, in getVarFlag
    parser = self.expandWithRefs(value, cachename)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/data_smart.py&quot;, line 436, in expandWithRefs
    raise ExpansionError(varname, s, exc).with_traceback(tb) from exc
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/data_smart.py&quot;, line 423, in expandWithRefs
    s = __expand_python_regexp__.sub(varparse.python_sub, s)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/data_smart.py&quot;, line 148, in python_sub
    value = utils.better_eval(codeobj, DataContext(self.d), {&apos;d&apos; : self.d})
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/utils.py&quot;, line 429, in better_eval
    return eval(source, ctx, locals)
  File &quot;Var &lt;SRCPV&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/fetch2/__init__.py&quot;, line 758, in get_srcrev
    fetcher = Fetch(d.getVar(&apos;SRC_URI&apos;).split(), d)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/fetch2/__init__.py&quot;, line 1604, in __init__
    self.ud[url] = FetchData(url, d, localonly)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/fetch2/__init__.py&quot;, line 1275, in __init__
    self.method.urldata_init(self, d)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/fetch2/git.py&quot;, line 242, in urldata_init
    ud.setup_revisions(d)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/fetch2/__init__.py&quot;, line 1305, in setup_revisions
    self.revisions[name] = srcrev_internal_helper(self, d, name)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/fetch2/__init__.py&quot;, line 1170, in srcrev_internal_helper
    srcrev = ud.method.latest_revision(ud, d, name)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/fetch2/__init__.py&quot;, line 1560, in latest_revision
    revs = bb.persist_data.persist(&apos;BB_URI_HEADREVS&apos;, d)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/persist_data.py&quot;, line 308, in persist
    return SQLTable(cachefile, domain)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/persist_data.py&quot;, line 98, in __init__
    self._execute_single(&quot;CREATE TABLE IF NOT EXISTS %s(key TEXT PRIMARY KEY NOT NULL, value TEXT);&quot; % table)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/persist_data.py&quot;, line 55, in wrap_func
    self.reconnect()
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/persist_data.py&quot;, line 115, in reconnect
    self._setup_database()
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/persist_data.py&quot;, line 60, in wrap_func
    return f(self, *args, **kwargs)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/persist_data.py&quot;, line 89, in wrap_func
    return f(self, cursor, *args, **kwargs)
  File &quot;/home/oe1/nextp3/build-enviroment/bitbake/lib/bb/persist_data.py&quot;, line 103, in _setup_database
    cursor.execute(&quot;pragma synchronous = off;&quot;)
bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception OperationalError: locking protocol</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82655</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2019-01-03 16:37:11 +0000</bug_when>
    <thetext>http://lists.openembedded.org/pipermail/bitbake-devel/2019-January/019688.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82658</commentid>
    <comment_count>2</comment_count>
    <who name="">openatv</who>
    <bug_when>2019-01-03 17:39:17 +0000</bug_when>
    <thetext>this fix the issue

i test new on fresh build no fetch issue 

thx for fix it</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82659</commentid>
    <comment_count>3</comment_count>
    <who name="">nickersk</who>
    <bug_when>2019-01-03 17:52:19 +0000</bug_when>
    <thetext>I can confirm, this patch fixed the issue.
Thank you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82686</commentid>
    <comment_count>4</comment_count>
    <who name="">nickersk</who>
    <bug_when>2019-01-05 15:09:25 +0000</bug_when>
    <thetext>see http://lists.openembedded.org/pipermail/bitbake-devel/2019-January/019688.html</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>