CyberShadow / Digger

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

Bump bootstrap compiler to something more recent #97

Open Geod24 opened 1 year ago

Geod24 commented 1 year ago

I was trying to bisect a regression introduced between v2.097 and v2.098. Digger downloaded v2.079 and tried to compiler v2.098 with this, which segfaults the compiler. I easily found the setting in the INI file to change the host compiler, but as time passes, it's more likely that people will hit this more.

CyberShadow commented 1 year ago

How can I reproduce this segfault?

Geod24 commented 1 year ago

For clarity: dmd host (v2.079) SEGV, not digger.

$ mkdir -p test && cd test
$ cat >bisect.ini<<EOF           
bad  = v2.098.1
good = v2.097.1
tester = dmd --version
EOF
$ dub run digger -- bisect bisect.ini
             Building package digger in /home/geod24/.dub/packages/digger-3.0.8/digger/
    Starting Performing "debug" build using /usr/bin/dmd for x86_64.
  Up-to-date digger 3.0.8: target for configuration [application] is up to date.
    Finished To force a rebuild of up-to-date targets, run again with --force
     Running ../../../../.dub/packages/digger-3.0.8/digger/digger bisect bisect.ini
digger: Loading bisect configuration from bisect.ini
digger: First run detected.
Please be patient, cloning everything might take a few minutes...

digger: Cloning initial repository...
Cloning into '/home/geod24/projects/dlang/dmd/foo/work/repo.385055.140575144239744.temp'...
Receiving objects: 100% (266086/266086), 39.88 MiB | 9.56 MiB/s, done.
Resolving deltas: 100% (124351/124351), done.
digger: Updating repo...
Fetching origin
digger: Resolved GOOD revision `v2.097.1` to 0027578c27f9c9ffc476ed6709e3814bb8f4e9e3.
digger: Resolved BAD revision `v2.098.1` to db86519a6150a63f4544c4304a5edc9a35d0ca90.
digger: Sanity-check, testing GOOD revision 0027578c27f9c9ffc476ed6709e3814bb8f4e9e3...
digger: Testing revision: 0027578c27f9c9ffc476ed6709e3814bb8f4e9e3
digger: Starting at meta repository commit 0027578c27f9c9ffc476ed6709e3814bb8f4e9e3
digger: Building components dmd, druntime, phobos-includes, phobos, rdmd
digger: needInstalled: dmd-a5c112430f1c24122d9ea0b56b4f4f0c4f61080d-f1629ad6873af4ac572576c2ed09b628
digger: Clearing temporary cache
digger: Cache miss.
digger: needBuild: dmd-a5c112430f1c24122d9ea0b56b4f4f0c4f61080d-f1629ad6873af4ac572576c2ed09b628
digger: Initializing and updating submodule dmd...
Submodule 'dmd' (https://github.com/dlang/dmd) registered for path 'dmd'
Cloning into '/home/geod24/projects/dlang/dmd/foo/work/repo/dmd'...
Submodule path 'dmd': checked out '87a6b322fcb68284d805ca9ece36245ee9700c50'
digger: Cleaning repository dmd...
HEAD is now at 87a6b322fc Fix typo "boostrap" -> "bootstrap" in bootstrap.sh
digger: Checking out dmd commit a5c112430f1c24122d9ea0b56b4f4f0c4f61080d...
Previous HEAD position was 87a6b322fc Fix typo "boostrap" -> "bootstrap" in bootstrap.sh
HEAD is now at a5c112430f bump VERSION to v2.097.1
digger: Building dmd-a5c112430f1c24122d9ea0b56b4f4f0c4f61080d-f1629ad6873af4ac572576c2ed09b628
digger: Preparing DMD v2.079.0
digger: Installing DigitalMars D compiler v2.079.0 to /home/geod24/projects/dlang/dmd/foo/work/dl/dmd-2.079.0...
digger: Downloading http://downloads.dlang.org/releases/2.x/2.079.0/dmd.2.079.0.linux.zip to /home/geod24/projects/dlang/dmd/foo/work/dl/dmd.2.079.0.linux.zip...
digger: Verifying dmd.2.079.0.linux.zip.385055.140575144239744.temp...
digger: Unpacking /home/geod24/projects/dlang/dmd/foo/work/dl/dmd.2.079.0.linux.zip to /home/geod24/projects/dlang/dmd/foo/work/dl/dmd-2.079.0.385055.140575144239744.temp...
digger: Done installing DigitalMars D compiler v2.079.0.
digger: hostDC=/home/geod24/projects/dlang/dmd/foo/work/dl/dmd-2.079.0/dmd2/linux/bin64/dmd
digger: Cleaning repository dmd...
HEAD is now at a5c112430f bump VERSION to v2.097.1
digger: Environment: TMPDIR=/home/geod24/projects/dlang/dmd/foo/work/tmp
digger: Environment: PATH=/home/geod24/projects/dlang/dmd/foo/work/bin:/bin:/usr/bin:/usr/local/bin
digger: Environment: TMP=/home/geod24/projects/dlang/dmd/foo/work/tmp
digger: Environment: HOME=/home/geod24/projects/dlang/dmd/foo/work/home
digger: Environment: TEMP=/home/geod24/projects/dlang/dmd/foo/work/tmp
digger: Working directory: /home/geod24/projects/dlang/dmd/foo/work/repo/dmd/src
digger: Running: 'make' '-f' 'posix.mak' 'MODEL=64' 'HOST_DC=/home/geod24/projects/dlang/dmd/foo/work/dl/dmd-2.079.0/dmd2/linux/bin64/dmd'
posix.mak:42: ===== DEPRECATION NOTICE ===== 
posix.mak:43: ===== DEPRECATION: posix.mak is deprecated. Please use src/build.d instead.
posix.mak:44: ============================== 
posix.mak:88: ========== Use HOST_DMD instead of HOST_DC ========== 
/home/geod24/projects/dlang/dmd/foo/work/dl/dmd-2.079.0/dmd2/linux/bin64/dmd -of../generated/build -g build.d
Testing for -no-pie...
../generated/build OS="linux" BUILD="release" MODEL="64" HOST_DMD="/home/geod24/projects/dlang/dmd/foo/work/dl/dmd-2.079.0/dmd2/linux/bin64/dmd" CXX="c++" AUTO_BOOTSTRAP="" DOCDIR="" STDDOC="" DOC_OUTPUT_DIR="" MAKE="/bin/make" VERBOSE="" ENABLE_RELEASE="" ENABLE_DEBUG="" ENABLE_ASSERTS="" ENABLE_UNITTEST="" ENABLE_PROFILE="" ENABLE_COVERAGE="" DFLAGS="" dmd
Segmentation fault (core dumped)
make: *** [posix.mak:107: dmd] Error 139
digger: Saving to cache.
digger: Clearing temporary cache
digger: Build failed: object.Exception@../../../.dub/packages/ae-0.0.3227/ae/sys/d/manager.d(898): Command ["make", "-f", "posix.mak", "MODEL=64", "HOST_DC=/home/geod24/projects/dlang/dmd/foo/work/dl/dmd-2.079.0/dmd2/linux/bin64/dmd"] failed with status 2
----------------
/usr/include/dmd/phobos/std/exception.d:518 pure @safe noreturn std.exception.bailOut!(Exception).bailOut(immutable(char)[], ulong, scope const(char)[]) [0x56535276f8e6]
/usr/include/dmd/phobos/std/exception.d:439 pure @safe bool std.exception.enforce!().enforce!(bool).enforce(bool, lazy const(char)[], immutable(char)[], ulong) [0x56535276f85e]
../../../.dub/packages/ae-0.0.3227/ae/sys/d/manager.d:898 void ae.sys.d.manager.DManager.Component.run(const(immutable(char)[])[], in immutable(char)[][immutable(char)[]], immutable(char)[]) [0x5653528d6ab9]
../../../.dub/packages/ae-0.0.3227/ae/sys/d/manager.d:1185 void ae.sys.d.manager.DManager.DMD.performBuild() [0x5653528d8403]
../../../.dub/packages/ae-0.0.3227/ae/sys/d/manager.d:552 void ae.sys.d.manager.DManager.Component.needBuild(bool) [0x5653528d51ef]
../../../.dub/packages/ae-0.0.3227/ae/sys/d/manager.d:702 void ae.sys.d.manager.DManager.Component.needInstalled() [0x5653528d59d4]
../../../.dub/packages/ae-0.0.3227/ae/sys/d/manager.d:2284 void ae.sys.d.manager.DManager.build(ae.sys.d.manager.DManager.SubmoduleState, bool) [0x5653528dee2c]
../../../.dub/packages/digger-3.0.8/digger/bisect.d:276 int bisect.doBisectStep(immutable(char)[]) [0x5653527658f2]
../../../.dub/packages/digger-3.0.8/digger/bisect.d:90 void bisect.doBisect(bool, immutable(char)[], immutable(char)[][]).test(bool, immutable(char)[]) [0x56535276529f]
../../../.dub/packages/digger-3.0.8/digger/bisect.d:116 int bisect.doBisect(bool, immutable(char)[], immutable(char)[][]) [0x565352764627]
../../../.dub/packages/digger-3.0.8/digger/digger.d:157 int digger.Digger.bisect(ae.utils.funopt._OptionImpl!(0, bool, "Skip sanity-check of the GOOD/BAD commits.", \x00, null, null)._OptionImpl, ae.utils.funopt._OptionImpl!(1, immutable(char)[][], "Additional bisect configuration. Equivalent to bisect.ini settings.", 'c', "NAME=VALUE", "config")._OptionImpl, ae.utils.funopt._OptionImpl!(2, immutable(char)[], "Location of the bisect.ini file containing the bisection description.", \x00, null, null)._OptionImpl) [0x56535287c667]
../../../.dub/packages/ae-0.0.3227/ae/utils/funopt.d:308 int ae.utils.funopt.funopt!(digger.Digger.bisect(ae.utils.funopt._OptionImpl!(0, bool, "Skip sanity-check of the GOOD/BAD commits.", \x00, null, null)._OptionImpl, ae.utils.funopt._OptionImpl!(1, immutable(char)[][], "Additional bisect configuration. Equivalent to bisect.ini settings.", 'c', "NAME=VALUE", "config")._OptionImpl, ae.utils.funopt._OptionImpl!(2, immutable(char)[], "Location of the bisect.ini file containing the bisection description.", \x00, null, null)._OptionImpl), ae.utils.funopt.FunOptConfig(null), digger.digger().usageFun(immutable(char)[])).funopt(immutable(char)[][]) [0x5653529625e3]
../../../.dub/packages/ae-0.0.3227/ae/utils/funopt.d:844 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)[][]) [0x5653529536f8]
../../../.dub/packages/ae-0.0.3227/ae/utils/funopt.d:308 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).funopt(immutable(char)[][]) [0x56535296a5a5]
../../../.dub/packages/ae-0.0.3227/ae/utils/funopt.d:858 int ae.utils.funopt.funoptDispatch!(digger.Digger, ae.utils.funopt.FunOptConfig(null), digger.digger().usageFun(immutable(char)[])).funoptDispatch(immutable(char)[][]) [0x565352952d93]
../../../.dub/packages/digger-3.0.8/digger/digger.d:275 int digger.digger() [0x56535287cb51]
../../../.dub/packages/ae-0.0.3227/ae/utils/main.d:36 int digger.__mixin21.main(immutable(char)[][]).run(immutable(char)[][]) [0x56535287cfb0]
../../../.dub/packages/ae-0.0.3227/ae/utils/main.d:47 int digger.__mixin21.main(immutable(char)[][]).runCatchingException!(std.getopt.GetOptException, "Usage error").runCatchingException(immutable(char)[][]) [0x56535287de20]
../../../.dub/packages/ae-0.0.3227/ae/utils/main.d:70 _Dmain [0x56535287cf92]
object.Exception@../../../.dub/packages/digger-3.0.8/digger/bisect.d(91): GOOD revision 0027578c27f9c9ffc476ed6709e3814bb8f4e9e3 is not testable
----------------
/usr/include/dmd/phobos/std/exception.d:518 pure @safe noreturn std.exception.bailOut!(Exception).bailOut(immutable(char)[], ulong, scope const(char)[]) [0x56535276f8e6]
/usr/include/dmd/phobos/std/exception.d:439 pure @safe bool std.exception.enforce!().enforce!(bool).enforce(bool, lazy const(char)[], immutable(char)[], ulong) [0x56535276f85e]
../../../.dub/packages/digger-3.0.8/digger/bisect.d:91 void bisect.doBisect(bool, immutable(char)[], immutable(char)[][]).test(bool, immutable(char)[]) [0x5653527652dc]
../../../.dub/packages/digger-3.0.8/digger/bisect.d:116 int bisect.doBisect(bool, immutable(char)[], immutable(char)[][]) [0x565352764627]
../../../.dub/packages/digger-3.0.8/digger/digger.d:157 int digger.Digger.bisect(ae.utils.funopt._OptionImpl!(0, bool, "Skip sanity-check of the GOOD/BAD commits.", \x00, null, null)._OptionImpl, ae.utils.funopt._OptionImpl!(1, immutable(char)[][], "Additional bisect configuration. Equivalent to bisect.ini settings.", 'c', "NAME=VALUE", "config")._OptionImpl, ae.utils.funopt._OptionImpl!(2, immutable(char)[], "Location of the bisect.ini file containing the bisection description.", \x00, null, null)._OptionImpl) [0x56535287c667]
../../../.dub/packages/ae-0.0.3227/ae/utils/funopt.d:308 int ae.utils.funopt.funopt!(digger.Digger.bisect(ae.utils.funopt._OptionImpl!(0, bool, "Skip sanity-check of the GOOD/BAD commits.", \x00, null, null)._OptionImpl, ae.utils.funopt._OptionImpl!(1, immutable(char)[][], "Additional bisect configuration. Equivalent to bisect.ini settings.", 'c', "NAME=VALUE", "config")._OptionImpl, ae.utils.funopt._OptionImpl!(2, immutable(char)[], "Location of the bisect.ini file containing the bisection description.", \x00, null, null)._OptionImpl), ae.utils.funopt.FunOptConfig(null), digger.digger().usageFun(immutable(char)[])).funopt(immutable(char)[][]) [0x5653529625e3]
../../../.dub/packages/ae-0.0.3227/ae/utils/funopt.d:844 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)[][]) [0x5653529536f8]
../../../.dub/packages/ae-0.0.3227/ae/utils/funopt.d:308 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).funopt(immutable(char)[][]) [0x56535296a5a5]
../../../.dub/packages/ae-0.0.3227/ae/utils/funopt.d:858 int ae.utils.funopt.funoptDispatch!(digger.Digger, ae.utils.funopt.FunOptConfig(null), digger.digger().usageFun(immutable(char)[])).funoptDispatch(immutable(char)[][]) [0x565352952d93]
../../../.dub/packages/digger-3.0.8/digger/digger.d:275 int digger.digger() [0x56535287cb51]
../../../.dub/packages/ae-0.0.3227/ae/utils/main.d:36 int digger.__mixin21.main(immutable(char)[][]).run(immutable(char)[][]) [0x56535287cfb0]
../../../.dub/packages/ae-0.0.3227/ae/utils/main.d:47 int digger.__mixin21.main(immutable(char)[][]).runCatchingException!(std.getopt.GetOptException, "Usage error").runCatchingException(immutable(char)[][]) [0x56535287de20]
../../../.dub/packages/ae-0.0.3227/ae/utils/main.d:70 _Dmain [0x56535287cf92]
Error Program exited with code 1
dub run digger -- bisect bisect.ini  33.84s user 4.17s system 94% cpu 40.080 total
CyberShadow commented 1 year ago

I can't reproduce it :(

It also doesn't happen on the server which builds dlang.org.

Any idea what might cause the segfault on this machine?