BobBuildTool/bob

bob fails mid air with a stacktrace

Closed this issue · 3 comments

Bob version 0.19.1
Traceback (most recent call last):
File "/home/user/.local/lib/python3.8/site-packages/bob/scripts.py", line 147, in catchErrors
ret = fun(*args, **kwargs)
File "/home/user/.local/lib/python3.8/site-packages/bob/scripts.py", line 248, in cmd
ret = cmd(args.args, bobRoot)
File "/home/user/.local/lib/python3.8/site-packages/bob/scripts.py", line 29, in __develop
doDevelop(*args, **kwargs)
File "/home/user/.local/lib/python3.8/site-packages/bob/cmds/build/build.py", line 313, in doDevelop
commonBuildDevelop(parser, argv, bobRoot, True)
File "/home/user/.local/lib/python3.8/site-packages/bob/cmds/build/build.py", line 217, in commonBuildDevelop
if develop: developPersister.prime(packages)
File "/home/user/.local/lib/python3.8/site-packages/bob/cmds/build/state.py", line 145, in prime
packages.getRootPackage())
File "/home/user/.local/lib/python3.8/site-packages/bob/pathspec.py", line 843, in getRootPackage
self.__root = self.__generator()
File "/home/user/.local/lib/python3.8/site-packages/bob/input.py", line 3771, in
lambda: self.__generatePackages(nameFormatter, cacheKey, sandboxEnabled))
File "/home/user/.local/lib/python3.8/site-packages/bob/input.py", line 3736, in __generatePackages
tmp = PackageUnpickler(f, self.getRecipe, self.__plugins,
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xac in position 56: invalid start byte

Could you provide more context when/how the error happened?

Apparently the cache of data structures on the disk has been corrupted. It looks like some disk/RAM failure. It could theoretically also be a Python bug but this is unlikely.

The error should go away if you delete ".bob-packages.pickle". It would be interesting to know if it can be reproduced again. A simple "bob ls" will re-create the cache...

The issue occurred when running a bob dev ... command. The system is an ubuntu 20.04, running inside virtualbox. However, after deleting ".bob-packages.pickle", actually after wiping the entire checkout folder and starting over from scratch, the issue was gone.

Thanks. Bob will now catch the error and re-create the cache in case such an error happens again.