[Omake] SVN Commit: OMake Build System [0.9.8.x] (Rev. 12456)
Aleksey Nogin
anogin at hrl.com
Tue Oct 30 14:02:29 PDT 2007
On 30.10.2007 12:47, Jason J. Hickey wrote:
> I believe I have solved the problem with bogus termination on Windows XP.
> See the message titled "Parallel builds on windows xp" from Doug Rabson on
> Aug 9, 2007.
>
> I *can't* reproduce the problem, but I have an explanation.
>
> If correct, the problem was a double-allocation in omake_shell_sys.c:handle_wait,
> where
> 1. tuple = alloc_tuple(2);
> 2. Field(tuple, 0) = ...
> 3. Field(tuple, 1) = Val_unit;
> 4. status = alloc_small(...)
> 5. Field(tuple, 1) = status;
>
> Line 5 violates the assignment policy, which says that direct
> assignment is allowed only if the tuple was just allocated.
>
> So, the explanation would be that a GC happens at line 4, moving the
> tuple to the major heap, and the assignment on line 5 violates the
> generational invariant (by not keeping track of the old->young pointer).
> This leads to heap corruption, and the result looks like "process stopped",
> only because the stopped case is the last one in pattern matching,
> so it serves as the default.
Makes sense. And note that for the corruption to happen there needs to
be another GC before the value is consumed (which happens quite quickly)
- so this will probably require another memory-hungry thread intervening
in parallel. This would explain why Doug is the only one seeing this -
there must be something fairly unique in his setup, since hitting this
bug requires quite an unusual set of circumstances.
Ah, I wish there was a better way to make sure the C code is not
breaking things. I am sure it took you quite a while to find this :-(
We should probably ask Doug to try out the latest code to see if this
have indeed solved his problem.
Aleksey
--
Aleksey Nogin, Research Scientist
Advanced Technologies Department, Information & System Sciences Lab
HRL Laboratories, LLC, Malibu, CA
More information about the OMake-Devel
mailing list