Elements that try to install files to /tmp, /dev or /proc
- From: Sam Thursfield <sam thursfield codethink co uk>
- To: buildstream-list gnome org
- Subject: Elements that try to install files to /tmp, /dev or /proc
- Date: Mon, 21 Aug 2017 15:44:17 +0100
Hi
We've been looking at converting Baserock definitions to BuildStream for
a while now. As we convert more systems we find new issues!
Here is today's:
https://gitlab.com/baserock/definitions/-/jobs/29659150
There is a series of problems here:
1. genivi/genivi-demo-platform/audiomanager-at-gdp.bst installs files
to %{install-root}/tmp, for whatever reason. (We can probably just
stop it from doing that to work around the following issues, but
they deserve discussing in any case).
2. genivi/genivi-demo-platform/audiomanagerdemo.bst depends on
audiomanager-at-gdp.bst. Thus it gets a sandbox which has files in
/tmp. The _sandboxbwrap.py module considers this a bug[1] and raises
an exception, which should cause the build to abort.
3. The build subprocess never actually aborts, something deadlocks and
the process runs forever.
I wrote a testcase to reproduce the issue which can be found here:
https://gitlab.com/BuildStream/buildstream-tests/merge_requests/14
Interestingly the testcase doesn't suffer from the deadlock issue (3) --
it exits as expected.
There are two things that need fixing here. Firstly, if we are going to
raise an exception when an element installs stuff to /tmp we should do
so at the point that it happens, i.e. when we create the artifact. Or
should we fix the sandboxbwrap module so that it allows files to be
installed there ?
Secondly, we shouldn't deadlock :-) I haven't had time to work out what
causes that -- the fact that it doesn't occur for a small testcase
suggests that it's something to do with a queue becoming blocked by long
messages, but that's just a guess so far.
You can (probably) reproduce the above issues by checking out
https://gitlab.com/baserock/definitions/commit/a1b739ac6c49cd9a57e75dd3466fe55575fce814
and running `bst build systems/genivi-demo-platform-content.bst`.
Sam
1.
https://gitlab.com/BuildStream/buildstream/blob/master/buildstream/_sandboxbwrap.py#L294
--
Sam Thursfield, Codethink Ltd.
Office telephone: +44 161 236 5575
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]