Thread overview
[dmd-internals] Need help tracking down a machine-dependent heisenbug
Nov 16, 2011
Don Clugston
Nov 16, 2011
Walter Bright
Nov 16, 2011
Don Clugston
Nov 16, 2011
Martin Nowak
Nov 16, 2011
Don Clugston
Nov 16, 2011
Walter Bright
Nov 16, 2011
Don Clugston
November 16, 2011
My CTFE developement is currently blocked by a problem I cannot reproduce.

On DMD, checkout commit feaf4911ec (pull request #506)
Build DMD.
Compile Phobos unittests.
Does the compiler segfault while compiling?

On my machine (Win7, dual core) it compiles OK.
On the autotester it also seems to have been OK.
But on Walter's Windows machine, and on his Linux machine, it segfaults.
(on Windows, it's when doing dmd -O -nofloat -w -d -L/co -c -unittest
-ofunittest12.obj std\array.d std\functional.d std\range
.d std\path.d std\outbuffer.d std\utf.d)

>From the log output, it is clear that the execution order is different
on these two cases. Something is different, and I don't have any idea
what it could be.
So I need more data. I'd like to know if other people can reproduce
the segfault.
November 16, 2011

On 11/16/2011 12:42 AM, Don Clugston wrote:
> My CTFE developement is currently blocked by a problem I cannot reproduce.
>

Hi Don, I sent you some more data on it this evening. If you didn't receive it, I'll resend.
November 16, 2011
On Wed, 16 Nov 2011 09:42:15 +0100, Don Clugston <dclugston at googlemail.com> wrote:

> My CTFE developement is currently blocked by a problem I cannot reproduce.
>
> On DMD, checkout commit feaf4911ec (pull request #506)
> Build DMD.
> Compile Phobos unittests.
> Does the compiler segfault while compiling?
>
> On my machine (Win7, dual core) it compiles OK.
> On the autotester it also seems to have been OK.
> But on Walter's Windows machine, and on his Linux machine, it segfaults.
> (on Windows, it's when doing dmd -O -nofloat -w -d -L/co -c -unittest
> -ofunittest12.obj std\array.d std\functional.d std\range
> .d std\path.d std\outbuffer.d std\utf.d)
>
> From the log output, it is clear that the execution order is different
> on these two cases. Something is different, and I don't have any idea
> what it could be.
> So I need more data. I'd like to know if other people can reproduce
> the segfault.
> _______________________________________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals

I could not reproduce it, but found a latent bug which could be responsible for it. https://github.com/D-Programming-Language/dmd/pull/506#r232299
November 16, 2011
On 16 November 2011 10:19, Walter Bright <walter at digitalmars.com> wrote:
>
>
> On 11/16/2011 12:42 AM, Don Clugston wrote:
>>
>> My CTFE developement is currently blocked by a problem I cannot reproduce.
>>
>
> Hi Don, I sent you some more data on it this evening. If you didn't receive it, I'll resend.

Thanks, just got it. I'd still like to know why there's a difference. It's a bit of a worry if we get tests incorrectly passing on some machines.
November 16, 2011
On 16 November 2011 11:10, Martin Nowak <dawg at dawgfoto.de> wrote:
> On Wed, 16 Nov 2011 09:42:15 +0100, Don Clugston <dclugston at googlemail.com> wrote:
>
>> My CTFE developement is currently blocked by a problem I cannot reproduce.
>>
>> On DMD, checkout commit feaf4911ec (pull request #506)
>> Build DMD.
>> Compile Phobos unittests.
>> Does the compiler segfault while compiling?
>>
>> On my machine (Win7, dual core) it compiles OK.
>> On the autotester it also seems to have been OK.
>> But on Walter's Windows machine, and on his Linux machine, it segfaults.
>> (on Windows, it's when doing dmd -O -nofloat -w -d -L/co -c -unittest
>> -ofunittest12.obj std\array.d std\functional.d std\range
>> .d std\path.d std\outbuffer.d std\utf.d)
>>
>> From the log output, it is clear that the execution order is different
>> on these two cases. Something is different, and I don't have any idea
>> what it could be.
>> So I need more data. I'd like to know if other people can reproduce
>> the segfault.
>> _______________________________________________
>> dmd-internals mailing list
>> dmd-internals at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/dmd-internals
>
> I could not reproduce it, but found a latent bug which could be responsible
> for it.
> https://github.com/D-Programming-Language/dmd/pull/506#r232299

Good catch, but that's not the cause (the initial value of that
variable is irrelevant unless there's a bug somewhere else.
Initializing it to eg, 1245464 doesn't cause a segfault). Walter has
found the root cause. But, the machine dependency really interests me,
because I am *sure* it will hit us again.
At this stage it looks to be Walter-specific...
November 16, 2011

On 11/16/2011 3:09 AM, Don Clugston wrote:
>
> At this stage it looks to be Walter-specific...
>

That may be because I'm using an older version of Phobos, not the latest.
November 16, 2011
On 16 November 2011 18:36, Walter Bright <walter at digitalmars.com> wrote:
>
>
> On 11/16/2011 3:09 AM, Don Clugston wrote:
>>
>> At this stage it looks to be Walter-specific...
>>
>
> That may be because I'm using an older version of Phobos, not the latest.

When I used the version of Phobos you sent me, it didn't change anything. I guess the version of druntime could be different. That's about the only plausible candidate left.