Bug 14956

Summary: AB-INT: buildperf: FileNotFoundError: [Errno 2] No such file or directory: 'hashserv.db-wal'
Product: [QA/Testing] Functional (self) Testing Reporter: Alexandre Belloni <alexandre.belloni>
Component: oe-selftestAssignee: Unassigned <unassigned>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Medium CC: alexandre.belloni, poky.bs.watcher, poky.watcher, randy.macleod, richard.purdie
Version: unspecified   
Target Milestone: 6.99   
Hardware: x86   
OS: Multiple   
Whiteboard: AB-INT AB-HAVE-PLAN
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Alexandre Belloni 2022-11-03 10:28:54 UTC
https://autobuilder.yoctoproject.org/typhoon/#/builders/133/builds/786/steps/12/logs/stdio

ERROR: test3 (oeqa.buildperf.test_basic.Test3)
Bitbake parsing (bitbake -p)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/buildperf-alma8/build/meta/lib/oe/path.py", line 157, in remove
    os.unlink(name)
IsADirectoryError: [Errno 21] Is a directory: '/home/pokybuild/build-perf-test/build-5200799866-20221002090025/cache'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/buildperf-alma8/build/meta/lib/oeqa/buildperf/test_basic.py", line 82, in test3
    self.rm_cache()
  File "/home/pokybuild/yocto-worker/buildperf-alma8/build/meta/lib/oeqa/buildperf/base.py", line 476, in rm_cache
    oe.path.remove(self.bb_vars['PERSISTENT_DIR'], recurse=True)
  File "/home/pokybuild/yocto-worker/buildperf-alma8/build/meta/lib/oe/path.py", line 160, in remove
    shutil.rmtree(name)
  File "/usr/lib64/python3.6/shutil.py", line 486, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/usr/lib64/python3.6/shutil.py", line 444, in _rmtree_safe_fd
    onerror(os.unlink, fullname, sys.exc_info())
  File "/usr/lib64/python3.6/shutil.py", line 442, in _rmtree_safe_fd
    os.unlink(name, dir_fd=topfd)
FileNotFoundError: [Errno 2] No such file or directory: 'hashserv.db-wal'
Comment 1 Randy MacLeod 2022-11-03 14:44:05 UTC
Clean-up race?
Comment 2 Richard Purdie 2022-11-03 14:44:37 UTC
We fixed this for oe-selftest and others, we need to make sure hashserv is shut down before removing files.
Comment 3 Randy MacLeod 2023-10-30 15:37:24 UTC
Build move to 5.0 -- ../Randy
Comment 5 Randy MacLeod 2024-04-24 20:30:26 UTC
Bulk move from 5.0* to 5.99 to indicate that there isn't any one available to work on this issue.
Comment 6 Richard Purdie 2025-09-08 13:56:14 UTC
The wal file is created by sqlite as a journal and means there was still some process actively using the database which hadn't exited yet.

We need to audit the codepaths and work out which database file this was (bitbake hashserv?) and then add something to the cleanup code so that it waits for everything to exit before deleting.
Comment 7 Mathieu Dubois-Briand 2025-09-22 11:20:46 UTC
metrics rocky9-vk-3 scarthgap completed at 2025-09-20 06:34:47+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/103/builds/1888/steps/23/logs/stdio