[LLVMdev] MCJIT RemoteMemoryManager Failures on ARM

Renato Golin renato.golin at linaro.org
Tue Nov 26 16:30:26 PST 2013


On 26 November 2013 23:29, Kaylor, Andrew <andrew.kaylor at intel.com> wrote:

>  Looking at the code, one obvious source of intermittent failure is that
> the Linux implementations of ReadBytes and WriteBytes don’t check for
> EINTR.  I doubt that’s the failure you’re seeing because it would be more
> randomly distributed but it’s something that should be fixed.
>

Agreed.


 More likely as the cause of failure in your case is that read is returning
> less than the number of bytes requested.   In theory, this can happen if we
> read one end of the pipe while the other end is being written, but the
> current code doesn’t check for it.  A race condition like this seems more
> likely than a code generation problem.
>

Right. What I meant by a codegen problem was not *just* a crash in the
client, but code movement that would induce instability, like moving things
beyond memory barriers, etc. However, I agree that the code, as it is, is
not robust enough and that the compiler can be more aggressive to remove
the lucky balance it has now.


I’m attaching a patch (which I haven’t even tried to compile) that I think
> addresses these issues.  Can you try it out and see if it fixes this
> problem for you?
>

The patch indeed fixes the problem, but it introduces lock-ups on other
(random) tests when they run simultaneously, but not so when I run them
independently.

cheers,
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131127/7dacd5f7/attachment.html>


More information about the llvm-dev mailing list