bst deletes objects that are needed for the session
Summary
Steps to reproduce
take a big project and a small disk, and launch the build.
to be sure this is not a corrupted cache, I deleted ~/.cache/buildstream
(and have sourcedir configured outside of it), and launched a full rebuild with no remote cache configured. The build was run with --on-error continue
What is the current bug behavior?
One element build fails with the following error
[--:--:--] START freedesktop-sdk.bst:extensions/mesa/mesa.bst: Staging dependencies
[--:--:--] START freedesktop-sdk.bst:bootstrap/gnu-config.bst: Staging bootstrap/gnu-config.bst/39fb0a36
[00:00:00] FAILURE freedesktop-sdk.bst:bootstrap/gnu-config.bst: Staging bootstrap/gnu-config.bst/39fb0a36
[00:00:00] FAILURE freedesktop-sdk.bst:extensions/mesa/mesa.bst: Staging dependencies
[00:00:00] FAILURE freedesktop-sdk.bst:extensions/mesa/mesa.bst: Directory not found in local cache: [Errno 2] No such file or directory: '/home/abderrahim/.cache/buildstream/cas/objects/6d/08cdaaa5b10bfe42c9f28dac47ce7d82bdf46736db5d47a6eff9b1d9e39494'
What is the expected correct behavior?
Relevant logs and/or screenshots
File "/home/abderrahim/.virtualenvs/bst-master/bin/bst", line 8, in <module>
sys.exit(cli())
File "/home/abderrahim/.virtualenvs/bst-master/lib/python3.7/site-packages/click/core.py", line 766, in __call__
return self.main(*args, **kwargs)
File "/home/abderrahim/Projects/bst-master/src/buildstream/_frontend/cli.py", line 281, in override_main
original_main(self, args=args, prog_name=prog_name, complete_var=None, standalone_mode=standalone_mode, **extra)
File "/home/abderrahim/.virtualenvs/bst-master/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/abderrahim/.virtualenvs/bst-master/lib/python3.7/site-packages/click/core.py", line 1139, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/abderrahim/.virtualenvs/bst-master/lib/python3.7/site-packages/click/core.py", line 958, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/abderrahim/.virtualenvs/bst-master/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/abderrahim/.virtualenvs/bst-master/lib/python3.7/site-packages/click/decorators.py", line 27, in new_func
return f(get_current_context().obj, *args, **kwargs)
File "/home/abderrahim/Projects/bst-master/src/buildstream/_frontend/cli.py", line 491, in build
app.stream.build(elements, selection=deps, ignore_junction_targets=ignore_junction_targets, remote=remote)
File "/home/abderrahim/Projects/bst-master/src/buildstream/_stream.py", line 326, in build
self._run()
File "/home/abderrahim/Projects/bst-master/src/buildstream/_stream.py", line 1363, in _run
status = self._scheduler.run(self.queues, self._context.get_cascache().get_casd_process_manager())
File "/home/abderrahim/Projects/bst-master/src/buildstream/_scheduler/scheduler.py", line 211, in run
self.loop.run_forever()
File "/usr/lib/python3.7/asyncio/base_events.py", line 538, in run_forever
self._run_once()
File "/usr/lib/python3.7/asyncio/base_events.py", line 1782, in _run_once
handle._run()
File "/usr/lib/python3.7/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/home/abderrahim/Projects/bst-master/src/buildstream/_scheduler/scheduler.py", line 458, in real_schedule
self._sched_queue_jobs()
File "/home/abderrahim/Projects/bst-master/src/buildstream/_scheduler/scheduler.py", line 438, in _sched_queue_jobs
self._start_job(job)
File "/home/abderrahim/Projects/bst-master/src/buildstream/_scheduler/scheduler.py", line 386, in _start_job
job.start()
File "/home/abderrahim/Projects/bst-master/src/buildstream/_scheduler/jobs/job.py", line 187, in start
self._process.start()
File "/home/abderrahim/Projects/bst-master/src/buildstream/_scheduler/_multiprocessing.py", line 62, in start
self._popen = self._Popen(self)
File "/usr/lib/python3.7/multiprocessing/context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/usr/lib/python3.7/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "/usr/lib/python3.7/multiprocessing/popen_fork.py", line 20, in __init__
self._launch(process_obj)
File "/usr/lib/python3.7/multiprocessing/popen_fork.py", line 74, in _launch
code = process_obj._bootstrap()
File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
self.run()
File "/home/abderrahim/Projects/bst-master/src/buildstream/_scheduler/_multiprocessing.py", line 69, in run
super().run()
File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "/home/abderrahim/Projects/bst-master/src/buildstream/_scheduler/jobs/job.py", line 707, in child_action
result = self.child_process() # pylint: disable=assignment-from-no-return
File "/home/abderrahim/Projects/bst-master/src/buildstream/_scheduler/jobs/elementjob.py", line 103, in child_process
return self._action_cb(self._element)
File "/home/abderrahim/Projects/bst-master/src/buildstream/_scheduler/queues/buildqueue.py", line 93, in _assemble_element
return element._assemble()
File "/home/abderrahim/Projects/bst-master/src/buildstream/element.py", line 1589, in _assemble
self.stage(sandbox)
File "/home/abderrahim/Projects/bst-master/src/buildstream/buildelement.py", line 223, in stage
self.stage_dependency_artifacts(sandbox, Scope.BUILD)
File "/home/abderrahim/Projects/bst-master/src/buildstream/element.py", line 729, in stage_dependency_artifacts
result = dep.stage_artifact(sandbox, path=path, include=include, exclude=exclude, orphans=orphans)
File "/home/abderrahim/Projects/bst-master/src/buildstream/element.py", line 679, in stage_artifact
files_vdir = self.__artifact.get_files() # type: ignore
File "/home/abderrahim/Projects/bst-master/src/buildstream/_artifact.py", line 79, in get_files
return CasBasedDirectory(self._cas, digest=files_digest)
File "/home/abderrahim/Projects/bst-master/src/buildstream/storage/_casbaseddirectory.py", line 143, in __init__
self._reset(digest=digest)
Possible fixes
Other relevant information
- BuildStream version affected: /milestone %BuildStream_v1.x