[erlang-bugs] segv compiling master (freebsd-10.1 on x64)

Felix Gallo felixgallo@REDACTED
Wed Jun 3 22:34:17 CEST 2015


fresh git clone into a new directory, git checkout master, git clean -fxd;

root@REDACTED:~/otp # uname -a
FreeBSD sov3 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11
21:02:49 UTC 2014     root@REDACTED:/usr/obj/usr/src/sys/GENERIC
 amd64
root@REDACTED:~/otp # git describe
OTP-18.0-rc2-244-g65bf43e
root@REDACTED:~/otp # ./otp_build autoconf && ./configure && gmake

[...snip...]

=== Entering application hipe
gmake[3]: Entering directory '/root/otp/lib/hipe/rtl'
 ERLC ../ebin/hipe_rtl.beam
/root/otp/make/x86_64-unknown-freebsd10.1/otp.mk:122: recipe for target
'../ebin/hipe_rtl.beam' failed
gmake[3]: *** [../ebin/hipe_rtl.beam] Segmentation fault (core dumped)

Hm.

After further exploration -- creating two entirely new freebsd 10.1
servers, one with 8G RAM and one, like sov3, with only 512M RAM; both
absolutely barebones except for 'pkg install gmake autoconf git' and
checking out master from github/erlang/otp -- that bootstrap erlc built on
the systems with only 512M RAM segfaults, but bootstrap erlc built on the
8G machine works fine.

As a test to see if maybe something in the build process itself was running
out of memory, I added 7 gigabytes of swap to the 512M RAM machine,
cleaned, and rebuilt; same result; compile fails, bootstrap built erlc is
throwing segfaults:

root@REDACTED:/usr/home/freebsd/otp # ./bootstrap/bin/erlc
lib/edoc/src/edoc_refs.erl
lib/edoc/src/edoc.hrl:40: can't find include file "edoc_doclet.hrl"
Segmentation fault (core dumped)

however, on that same 512M machine, checking out OTP-17.5 and building
works fine and the resulting erlc is a happy erlc.

Perhaps it is the case that erlc in 18.x is now over some threshold in
memory size which has been fine to date, but which the kernel can't now fit
into 512M RAM by (essentially) itself.

As far as only subscribers being allowed to post to erlang-bugs: it turns
out that my first post, pre-subscribe, did make it into the moderator queue
after all, actually (which was my expected result), but that I didn't get
any notification that it did.  Then, when I subscribed and re-posted,
thinking that the first had been rejected, I did get a moderator queue
notice.  I'd suspect the most optimal behavior would be for non-subscribers
to be able to post, but for them to get the moderator queue notice so that
they don't do what I did.

F.


On Wed, Jun 3, 2015 at 9:23 AM, Björn-Egil Dahlberg <
wallentin.dahlberg@REDACTED> wrote:

> No known problems exists here and I cannot reproduce this problem.
> I tested on:
> (65bf43e...) egil@REDACTED /ldisk/egil/otp $ git describe
> OTP-18.0-rc2-244-g65bf43e
> (65bf43e...) egil@REDACTED /ldisk/egil/otp $ uname -a
> FreeBSD luthien 10.1-RELEASE-p9 FreeBSD 10.1-RELEASE-p9 #0: Tue Apr  7
> 01:09:46 UTC 2015
>
> building:
>
> (65bf43e...) egil@REDACTED /ldisk/egil/otp $ ./otp_build autoconf &&
> ./configure && gmake
> ...
> (65bf43e...) egil@REDACTED /ldisk/egil/otp $ bin/erl
>
> Erlang/OTP 18 [RELEASE CANDIDATE 2] [erts-7.0] [source] [64-bit] [smp:4:4]
> [async-threads:10] [hipe] [kernel-poll:false]
>
> Eshell V7.0  (abort with ^G)
> 1>
>
>
> Make sure you have a clean environment when building, i.e. git clean -fxd.
>
> No, it is not a bug that you have to subscribe in order to send mails to
> this list. It's a feature. =)
>
> // Björn-Egil
>
> 2015-06-03 17:41 GMT+02:00 Felix Gallo <felixgallo@REDACTED>:
>
>> root@REDACTED:~/otp # git status | sed 2q ; git log | sed 3q
>> On branch master
>> Your branch is up-to-date with 'origin/master'.
>> commit 65bf43e82a8ec731aafdbac74d41d65b63c7f49c
>> Merge: 2373536 f9af336
>> Author: Henrik Nord <henrik@REDACTED>
>> root@REDACTED:~/otp # ./otp_build autoconf && ./configure && gmake
>>
>> [...snip...]
>>
>> === Entering application hipe
>> gmake[3]: Entering directory '/root/otp/lib/hipe/rtl'
>> erlc -W  +debug_info +inline +warn_unused_import +warn_exported_vars
>> -o../ebin hipe_rtl.erl
>> /root/otp/make/x86_64-unknown-freebsd10.1/otp.mk:122: recipe for target
>> '../ebin/hipe_rtl.beam' failed
>> gmake[3]: *** [../ebin/hipe_rtl.beam] Segmentation fault (core dumped)
>>
>> appears to be on first use of the bootstrapped erlc, which seems familiar
>> from threads on erlang-questions but those appear to have been resolved (?).
>>
>> same problem appears to occur on 8.0rc2.
>>
>> Additionally, it appears you can't send mail to erlang-bugs without being
>> a subscriber, which itself may be a bug.
>>
>> F.
>>
>> _______________________________________________
>> erlang-bugs mailing list
>> erlang-bugs@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-bugs
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20150603/e35f90e7/attachment.htm>


More information about the erlang-bugs mailing list