[erlang-patches] fix of hipe crashes in gc

Mikael Pettersson mikpe@REDACTED
Sat Jul 17 15:56:29 CEST 2010


Paul Guyot writes:
 > Hello,
 > 
 > I have been experiencing crashes in the garbage collector when running erlang with natively compiled modules, and especially with OTP configured with --enable-native-libs.
 > 
 > This has been discussed before, including by others:
 > http://www.erlang.org/cgi-bin/ezmlm-cgi/4/50033

No test case was ever provided, though in hindsight the "arity=<large value>"
should have caught my eye.

 > http://www.erlang.org/cgi-bin/ezmlm-cgi/4/39462

Missed that one.  Nothing in $Subject or the first two messages indicated
native code, so the third message was likely ignored.  Again, "arity=<large value>"
in the third message is the crucial hint.

 > http://www.erlang.org/cgi-bin/ezmlm-cgi/2/1583

That one was apparently resolved as being a different problem.
Nothing there indicates that ertc_gc_after_bif_call was involved.

 > 
 > I finally got a reproduceable case and nailed the bug down. The bug was introduced in R12B-0, when the function erts_gc_after_bif_call was updated to take 4 parameters but the assembly glue code was not updated to pass proper values for the third and fourth parameters.
 > 
 > A fix is available here:
 > 
 > git fetch git://github.com/pguyot/otp.git pg/fix-hipe-crash-in-gc_after_bif
 > http://github.com/pguyot/otp/commit/c42ba9962d7e83accec797c56e5480a2d0b6281a

Thanks for identifying the cause.  The fix looks reasonable, but can you
please post it with git-send-email or somesuch, there are coding style
details I want you to fix but I cannot accurately describe them without
the text of the patch itself.

/Mikael

(Not directed at you personally, but this is a good example IMO of how
the Erlang adaptation of git has failed.  Not providing patches inline
(together with git links) makes it difficult to review them and discuss
specific details.  In contrast, the Linux kernel community gets this right.)


More information about the erlang-patches mailing list