<?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>15823</bug_id>
          
          <creation_ts>2025-04-07 08:22:48 +0000</creation_ts>
          <short_desc>AB-INT: cve-update-nvd2: JSONDecodeError</short_desc>
          <delta_ts>2025-04-10 14:33:59 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Test Plans/Suite</product>
          <component>test-plans/suite</component>
          <version>unspecified</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>AB-INT</status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>0.0.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mathieu Dubois-Briand">mathieu.dubois-briand</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>ccasciato</cc>
    
    <cc>richard.purdie</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>101571</commentid>
    <comment_count>0</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2025-04-07 08:22:48 +0000</bug_when>
    <thetext>Probably an error on the remote db, we had failures on two workers, roughly at the same time, and error is gone on rebuild.

ERROR: cve-update-nvd2-native-1.0-r0 do_fetch: Error executing a python function in exec_func_python() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: &apos;exec_func_python() autogenerated&apos;, lineno: 2, function: &lt;module&gt;
     0001:
 *** 0002:do_fetch(d)
     0003:
File: &apos;/srv/pokybuild/yocto-worker/metrics/build/meta/recipes-core/meta/cve-update-nvd2-native.bb&apos;, lineno: 83, function: do_fetch
     0079:    bb.utils.mkdirhier(db_dir)
     0080:    if os.path.exists(db_file):
     0081:        shutil.copy2(db_file, db_tmp_file)
     0082:
 *** 0083:    if update_db_file(db_tmp_file, d, database_time) == True:
     0084:        # Update downloaded correctly, can swap files
     0085:        shutil.move(db_tmp_file, db_file)
     0086:    else:
     0087:        # Update failed, do not modify the database
File: &apos;/srv/pokybuild/yocto-worker/metrics/build/meta/recipes-core/meta/cve-update-nvd2-native.bb&apos;, lineno: 219, function: update_db_file
     0215:            if raw_data is None:
     0216:                # We haven&apos;t managed to download data
     0217:                return False
     0218:
 *** 0219:            data = json.loads(raw_data)
     0220:
     0221:            index = data[&quot;startIndex&quot;]
     0222:            total = data[&quot;totalResults&quot;]
     0223:            per_page = data[&quot;resultsPerPage&quot;]
File: &apos;/srv/pokybuild/yocto-worker/metrics/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.11/json/__init__.py&apos;, lineno: 346, function: loads
     0342:
     0343:    if (cls is None and object_hook is None and
     0344:            parse_int is None and parse_float is None and
     0345:            parse_constant is None and object_pairs_hook is None and not kw):
 *** 0346:        return _default_decoder.decode(s)
     0347:    if cls is None:
     0348:        cls = JSONDecoder
     0349:    if object_hook is not None:
     0350:        kw[&apos;object_hook&apos;] = object_hook
File: &apos;/srv/pokybuild/yocto-worker/metrics/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.11/json/decoder.py&apos;, lineno: 337, function: decode
     0333:        &quot;&quot;&quot;Return the Python representation of ``s`` (a ``str`` instance
     0334:        containing a JSON document).
     0335:
     0336:        &quot;&quot;&quot;
 *** 0337:        obj, end = self.raw_decode(s, idx=_w(s, 0).end())
     0338:        end = _w(s, end).end()
     0339:        if end != len(s):
     0340:            raise JSONDecodeError(&quot;Extra data&quot;, s, end)
     0341:        return obj
File: &apos;/srv/pokybuild/yocto-worker/metrics/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.11/json/decoder.py&apos;, lineno: 355, function: raw_decode
     0351:        &quot;&quot;&quot;
     0352:        try:
     0353:            obj, end = self.scan_once(s, idx)
     0354:        except StopIteration as err:
 *** 0355:            raise JSONDecodeError(&quot;Expecting value&quot;, s, err.value) from None
     0356:        return obj, end
Exception: json.decoder.JSONDecodeError: Expecting value: line 1 column 2212228 (char 2212227)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101572</commentid>
    <comment_count>1</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2025-04-07 08:23:18 +0000</bug_when>
    <thetext>metrics alma8-vk-2 dunfell completed at 2025-04-05T06:17:54Z
https://autobuilder.yoctoproject.org/valkyrie/#/builders/103/builds/909/steps/14/logs/stdio

metrics alma9-vk-1 kirkstone completed at 2025-04-05T06:17:39Z
https://autobuilder.yoctoproject.org/valkyrie/#/builders/103/builds/910/steps/13/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101607</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2025-04-10 14:33:59 +0000</bug_when>
    <thetext>https://web.git.yoctoproject.org/poky/commit/?id=b9139b242e500a9f7ce9671d258439d0e57c2086</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>