On 24 April 2017 at 20:04, Matthias Klumpp <matth...@tenstral.net> wrote: > Hi! > > Here is a short summary on the bug: > > 1) It only happens on Debian buildds, Fedora and Arch are not > affected. I examined the build logs and the environments are > relatively similar, with a notable difference for Fedora being that > they build with GCC 7 > > 2) The issue itself is an infinite loop in > `TemplateInstance::needsCodegen` which shouldn't be possible, and > upstream has no idea why it happens. Debugging the issue is really > hard. > > 3) Suddenly we started to get the same bug reproducibly on i386 > buildds as well for LDC itself, see[1]. There, the bug is in the > bootstrap process, which uses an older compiler that worked fine > already for many Debian releases. This suggests that the actual issue > might be in a different portion of the code, or something else has > changed that is now triggering the issue. > > 4) Compiling LDC in a i386 chroot on an arm64 host always works > without any issues - the problem appears only on the buildd (which > itself is an amd64 host...). > > 5) The same applied to the crash on armhf which never happens when > cross-compiling, but only on a real armhf machine. > > 6) The problem is not LDC being miscompiled during bootstrap, nor does > compiling with LLVM 3.8 instead of 3.9 change anything. > > 7) The crash disappears when running in GDB (or valgrind) > > I am really out of ideas on this - upstream suggested some valgrinding > and gdb-ing, but doing that is very cumbersome as the only place where > I can reproduce this bug that isn't a Debian buildd is an armhf > porterbox (and armhf is really slow...), and as soon as you run the > application in gdb the crash vanishes. > > Creating a minimized testcase would take multiple weeks on armhf, and > ultimately failed a few weeks back - but we uncovered another bug in > the process, which was resolved meanwhile, so at least something good > came out of it. > > Any help would be highly appreciated! > Cheers, > Matthias Klumpp > > [1]: > https://buildd.debian.org/status/fetch.php?pkg=ldc&arch=i386&ver=1%3A1.1.1-3&stamp=1493055455&raw=0 >
If running in gdb makes the problem go away, have you tried turning on core dumps in buildd? -- Iain.