[erlang-patches] fix 64-bit related memory management bugs

Henrik Nord <>
Mon Aug 15 16:58:30 CEST 2011


On 08/13/2011 10:13 PM, Richard Carlsson wrote:
> We discovered that if a single Erlang process tried to grow above 32 
> GB (i.e., more 64-bit words than can be counted by a 32-bit number), 
> the VM failed to find the next larger heap size, even though there 
> were plenty more heap sizes left to pick from and even though we had a 
> lot more memory available on the machine. (Obviously, this is only 
> applicable on 64-bit Erlang.)
>
> It turned out to be due to some 'int' variables in the heap resizing 
> parts of erl_gc.c not being properly updated to 'Uint' or 'Sint'. Once 
> that was fixed, I got segfaults instead as soon as the heap got larger 
> than 2^32 words, due to even more 'int' declarations in the same file, 
> but now in the GC code.
>
> After fixing this as well, I successfully ran an Erlang node in which 
> a single Erlang process had a heap so large that I'm not at liberty to 
> divulge the exact size, but I think the scientific term is 
> "humongous", and I'm confident that there are no further immediate 
> problems with very very large individual process heaps.
>
> A patch against R14B03 is here:
>
>   https://github.com/richcarl/otp/tree/r14-gc-fix
>
> and here's another against R13B04:
>
>   https://github.com/richcarl/otp/tree/r13-gc-fix
>
>
>     /Richard
> _______________________________________________
> erlang-patches mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-patches
Hi

Your branch is now running in 'opu' for testing.

However we found your commit message a bit to small.
We corrected this by adding the information from this email into the 
commit msg.

Next time it would be lovely if you could try to make the commit msg as 
descriptive as possible.
So that one can deduce the purpose and nature of the change from the 
commit msg itself as was the case in this email.


(https://github.com/erlang/otp/wiki/Writing-good-commit-messages)

Thank you for your contribution!


-- 
/Henrik Nord Erlang/OTP



More information about the erlang-patches mailing list