Bug 15823 - AB-INT: cve-update-nvd2: JSONDecodeError
Summary: AB-INT: cve-update-nvd2: JSONDecodeError
Status: RESOLVED FIXED
Alias: None
Product: Test Plans/Suite
Classification: QA/Testing
Component: test-plans/suite (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Undecided normal
Target Milestone: 0.0.0
Assignee: Unassigned
QA Contact:
URL:
Whiteboard: AB-INT
Depends on:
Blocks:
 
Reported: 2025-04-07 08:22 UTC by Mathieu Dubois-Briand
Modified: 2025-04-10 14:33 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Dubois-Briand 2025-04-07 08:22:48 UTC
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: 'exec_func_python() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:do_fetch(d)
     0003:
File: '/srv/pokybuild/yocto-worker/metrics/build/meta/recipes-core/meta/cve-update-nvd2-native.bb', 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: '/srv/pokybuild/yocto-worker/metrics/build/meta/recipes-core/meta/cve-update-nvd2-native.bb', lineno: 219, function: update_db_file
     0215:            if raw_data is None:
     0216:                # We haven't managed to download data
     0217:                return False
     0218:
 *** 0219:            data = json.loads(raw_data)
     0220:
     0221:            index = data["startIndex"]
     0222:            total = data["totalResults"]
     0223:            per_page = data["resultsPerPage"]
File: '/srv/pokybuild/yocto-worker/metrics/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.11/json/__init__.py', 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['object_hook'] = object_hook
File: '/srv/pokybuild/yocto-worker/metrics/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.11/json/decoder.py', lineno: 337, function: decode
     0333:        """Return the Python representation of ``s`` (a ``str`` instance
     0334:        containing a JSON document).
     0335:
     0336:        """
 *** 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("Extra data", s, end)
     0341:        return obj
File: '/srv/pokybuild/yocto-worker/metrics/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.11/json/decoder.py', lineno: 355, function: raw_decode
     0351:        """
     0352:        try:
     0353:            obj, end = self.scan_once(s, idx)
     0354:        except StopIteration as err:
 *** 0355:            raise JSONDecodeError("Expecting value", s, err.value) from None
     0356:        return obj, end
Exception: json.decoder.JSONDecodeError: Expecting value: line 1 column 2212228 (char 2212227)
Comment 1 Mathieu Dubois-Briand 2025-04-07 08:23:18 UTC
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