From pdalgd at gmail.com  Wed Apr  5 23:54:02 2017
From: pdalgd at gmail.com (peter dalgaard)
Date: Wed, 5 Apr 2017 23:54:02 +0200
Subject: [Rd] Very hard to reproduce bug (?) in R-devel
In-Reply-To: <CAFOpNVE95J2Jb3bmTMD1t1vXWYEiGzM1iw-_CV134W=8B_z9LQ@mail.gmail.com>
References: <CAFOpNVFQyz_UtDkuZFxa9ttCcQc6wvN7bDb5AbfsfTT_HuHeog@mail.gmail.com>
 <CAFOpNVG6RtN47SVvg_L1HKYSOPccnXgWjMX3ouLGxjCKXovc=Q@mail.gmail.com>
 <CAFOpNVGO4DEVE+=0Ujysb+zPksyJGA8t1mkB9929wSndJTS0gA@mail.gmail.com>
 <22756.41965.160956.187187@stat.math.ethz.ch>
 <CAFOpNVE95J2Jb3bmTMD1t1vXWYEiGzM1iw-_CV134W=8B_z9LQ@mail.gmail.com>
Message-ID: <B2D3B8AB-6274-49DA-ABAD-7A88DD7A0638@gmail.com>


> On 05 Apr 2017, at 20:40 , Winston Chang <winstonchang1 at gmail.com> wrote:
> 
> I think there's a good chance that this is due to a bug in R. I have
> been trying to track down the cause of the problem but haven't been
> able find it.
> 
> -Winston

Apologies in advance if this is just stating the obvious, but let me try and put some general ideas  on the table.

- is anything non-deterministic involved? (Doesn't sound so, but...)
- could it be something with the bytecompiler?
- can you get something (_anything_) to trigger the bug (in any variant) when running R under gdb? I'm thinking gctorture() etc.
- it is odd that you cannot immediately get the same behaviour with R -d gdb or valgrind. Are you sure you are actually running the same script in the same way?
- if you can get a hold of something inside gdb, then there should be some potential for backtracking using hardware watchpoints and such. As in: This memory location doesn't contain the value I expected; what changed it?

-pd


-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



[Rd] Very hard to reproduce bug (?) in R-devel
peter dalgaard