CyberShadow / Digger

A tool to build D and bisect old D versions
Other
57 stars 9 forks source link

Permission denied #77

Closed John-Colvin closed 5 years ago

John-Colvin commented 5 years ago

With latest digger (https://github.com/CyberShadow/Digger/commit/f80a1196e98ea3bf46b22bc694dd353fd62b775b) built with dmd 2.084.1

$ ~/Git/digger/digger build
digger: Building spec: master
digger: First run detected.
Please be patient, cloning everything might take a few minutes...

digger: Cloning initial repository...
Cloning into '/home/john/tmp/work/repo.1542.140292284162048.temp'...
remote: Counting objects: 145490, done.
remote: Compressing objects: 100% (61050/61050), done.
remote: Total 145490 (delta 90690), reused 133359 (delta 84440)
Receiving objects: 100% (145490/145490), 17.42 MiB | 5.52 MiB/s, done.
Resolving deltas: 100% (90690/90690), done.
std.file.FileException@std/file.d(983): /home/john/tmp/work/repo: Permission denied
----------------
??:? @trusted bool std.file.cenforce!(bool).cenforce(bool, scope const(char)[], scope const(char)*, immutable(char)[], ulong) [0x583d51a2]
??:? @trusted void std.file.renameImpl(scope const(char)[], scope const(char)[], scope const(char)*, scope const(char)*) [0x5852d000]
??:? @safe void std.file.rename!(immutable(char)[], immutable(char)[]).rename(immutable(char)[], immutable(char)[]) [0x583da2dc]
??:? void ae.sys.file.atomic!(ae.sys.d.manager.DManager.MetaRepository.performClone(immutable(char)[], immutable(char)[]), 1uL).atomic(immutable(char)[], immutable(char)[]) [0x5842ea29]
??:? void ae.sys.file.atomic!(ae.sys.d.manager.DManager.MetaRepository.performClone(immutable(char)[], immutable(char)[]), "target/to/name/dst").atomic(immutable(char)[], immutable(char)[]) [0x5842e7c2]
??:? void ae.sys.d.manager.DManager.MetaRepository.needRepo() [0x584a4f99]
??:? void ae.sys.d.repo.ManagedRepository.update() [0x584ed2f3]
??:? void ae.sys.d.manager.DManager.update() [0x584aebd4]
??:? void repo.DiggerManager.needUpdate() [0x584144e8]
??:? immutable(char)[] repo.parseRev(immutable(char)[]) [0x58414792]
??:? ae.sys.d.manager.DManager.SubmoduleState custom.parseSpec(immutable(char)[]) [0x58468821]
??:? void custom.buildCustom(immutable(char)[]) [0x58468e40]
??:? int digger.Digger.build(ae.utils.funopt.OptionImpl!(0, bool, "hiddenOption", \x00, null, "64").OptionImpl, ae.utils.funopt.OptionImpl!(1, immutable(char)[], "Select models (32, 64, or, on Windows, 32mscoff). You can specify multiple models by comma-separating them.\x0aOn this system, the default is 64 [build.components.common.models]", \x00, null, "model").OptionImpl, ae.utils.funopt.OptionImpl!(1, immutable(char)[][], "Do not build a component (that would otherwise be built by default). List of default components: dmd, druntime, phobos-includes, phobos, rdmd [build.components.enable.COMPONENT=false]", \x00, "COMPONENT", "without").OptionImpl, ae.utils.funopt.OptionImpl!(1, immutable(char)[][], "Specify an additional D component to build. List of available additional components: tools, website, extras, curl [build.components.enable.COMPONENT=true]", \x00, "COMPONENT", "with").OptionImpl, ae.utils.funopt.OptionImpl!(1, immutable(char)[][], "Additional make parameters, e.g. "HOST_CC=g++48" [build.components.common.makeArgs]", \x00, "ARG", "makeArgs").OptionImpl, ae.utils.funopt.OptionImpl!(0, bool, "Bootstrap the compiler (build from C++ source code) instead of downloading a pre-built binary package [build.components.dmd.bootstrap.fromSource]", \x00, null, "bootstrap").OptionImpl, ae.utils.funopt.OptionImpl!(0, bool, "hiddenOption", \x00, null, "use-vc").OptionImpl, ae.utils.funopt.OptionImpl!(2, immutable(char)[], "D ref (branch / tag / point in time) to build, plus any additional fo... [0x583aeff3]
??:? int ae.utils.funopt.funopt!(digger.Digger.build(ae.utils.funopt.OptionImpl!(0, bool, "hiddenOption", \x00, null, "64").OptionImpl, ae.utils.funopt.OptionImpl!(1, immutable(char)[], "Select models (32, 64, or, on Windows, 32mscoff). You can specify multiple models by comma-separating them.\x0aOn this system, the default is 64 [build.components.common.models]", \x00, null, "model").OptionImpl, ae.utils.funopt.OptionImpl!(1, immutable(char)[][], "Do not build a component (that would otherwise be built by default). List of default components: dmd, druntime, phobos-includes, phobos, rdmd [build.components.enable.COMPONENT=false]", \x00, "COMPONENT", "without").OptionImpl, ae.utils.funopt.OptionImpl!(1, immutable(char)[][], "Specify an additional D component to build. List of available additional components: tools, website, extras, curl
[build.components.enable.COMPONENT=true]", \x00, "COMPONENT", "with").OptionImpl, ae.utils.funopt.OptionImpl!(1, immutable(char)[][], "Additional make parameters, e.g. "HOST_CC=g++48" [build.components.common.makeArgs]", \x00, "ARG", "makeArgs").OptionImpl, ae.utils.funopt.OptionImpl!(0, bool, "Bootstrap the compiler (build from C++ source code) instead of downloading a pre-built binary package [build.components.dmd.bootstrap.fromSource]", \x00, null, "bootstrap").OptionImpl, ae.utils.funopt.OptionImpl!(0, bool, "hiddenOption", \x00, null, "use-vc").OptionImpl, ae.utils.funopt.OptionImpl!(2, immutable(char)[], "D ref (branch / tag / point in time) to build... [0x58478753]
??:? int ae.utils.funopt.funoptDispatch!(digger.Digger, ae.utils.funopt.FunOptConfig(null), digger.digger().usageFun(immutable(char)[])).funoptDispatch(immutable(char)[][]).fun(immutable(char)[], immutable(char)[][]) [0x584771a7]
??:? int ae.utils.funopt.funopt!(ae.utils.funopt.funoptDispatch!(digger.Digger, ae.utils.funopt.FunOptConfig(null), digger.digger().usageFun(immutable(char)[])).funoptDispatch(immutable(char)[][]).fun(immutable(char)[], immutable(char)[][]), ae.utils.funopt.FunOptConfig([6]), ae.utils.funopt.funoptDispatch!(digger.Digger, ae.utils.funopt.FunOptConfig(null), digger.digger().usageFun).funoptDispatch(immutable(char)[][]).myUsageFun(immutable(char)[])).funopt(immutable(char)[][]) [0x58490f6a]
??:? int ae.utils.funopt.funoptDispatch!(digger.Digger, ae.utils.funopt.FunOptConfig(null), digger.digger().usageFun(immutable(char)[])).funoptDispatch(immutable(char)[][]) [0x58477026]
??:? int digger.digger() [0x583af72e]
??:? int digger.__mixin21.run(immutable(char)[][]) [0x583afae8]
??:? _Dmain [0x583afb0b]

Manually doing the rename works, so I do have the necessary permissions.

CyberShadow commented 5 years ago

The failure is coming from your filesystem, so look for the problem there.

Things I would check for:

From looking at the stack trace and the log you posted, I don't see how this can be due to Digger doing something wrong. If you can reproduce the issue reliably, we can try to narrow it down, but I would start with checking your environment as described above.

John-Colvin commented 5 years ago

Hmm, yes this problem does seem to be exclusive to WSL, but I can reproduce it on multiple WSL instances on different windows machines.

CyberShadow commented 5 years ago

Okay, thanks for letting me know. Unfortunately I'm not interested in spending time researching workarounds for WSL bugs. If this problem is important to you, I suggest narrowing it down to a simple test case, then filing a bug with Microsoft and/or submitting the workaround as a pull request to Digger / ae.