for i in $(seq 0 65535); do sudo chown $i:$i /tmp/guix-build-binutils-mesboot0-2.14.drv-0/binutils-2.14/config.cache && /gnu/store/m89p469fxwn4hj7an9givd1ry9vk7j2l-bash-mesboot0-2.05b/bin/sh -c "test -w /tmp/guix-build-binutils-mesboot0-2.14.drv-0/binutils-2.14/config.cache" && echo "Winner: $i" && break; done
This is designed to iterate through all possible uid values, chown the config.cache file, and test if that uid makes the “test” builtin think that it is writable. If there is one, it’ll print “Winner: <uid>” and exit
The result: Nothing was printed and the exit status was 1
Not sure where to go from here.
Toggle quote (51 lines)
> On Dec 15, 2020, at 7:46 PM, Carl Dong <email@example.com> wrote:
> Hi all,
> I think I have a new lead!
> Here’s what I did:
> 1. cd /tmp/guix-build-binutils-mesboot0-2.14.drv-0/binutils-2.14
> 2. env -i bash --rcfile environment-variables
> 3. Ran the configure command from the log, just to check:
I think you might be right that this is a kernel thing. As I’ve been able to reproduce this when running guix inside an ubuntu 20.04 docker container on the same machine, but not when I run ubuntu 20.04 in a VPS.
1. My "uname -a”: Linux dai 5.9.14-arch1-1 #1 SMP PREEMPT Sat, 12 Dec 2020 14:37:12 +0000 x86_64 GNU/Linux
I was able to bisect this down to a few kernel configuration options, so perhaps those with more kernel experience can help me track down what’s going on.
The two Kconfig options which seem to influence the behavior are:
CONFIG_EXPERT=y, CONFIG_UID16=y -> status code = 0
CONFIG_EXPERT=y, CONFIG_UID16=n -> status code = 1
CONFIG_EXPERT=y, CONFIG_UID16 not set -> status code = 1
CONFIG_EXPERT=n, any CONFIG_UID16 -> status code = 0
This is somewhat perplexing to me, as looking at the entry for CONFIG_UID16, I see that the default value is “y”, so I would expect there not to be a difference between CONFIG_UID16=y and CONFIG_UID16 not being set when CONFIG_EXPERT=y.