Knut Nesheim | 30 Jun 16:39 2015
Picon

Dirty schedulers and '-smp disable'

Dear list,

I ran into unexpected behaviour in the following situation:

 * OTP 18.0, compiled from the git tag with dirty schedulers enabled
 * NIF with the ERL_NIF_DIRTY_JOB_CPU_BOUND flag
 * Small machine with only one core (AWS t1.micro)
 * The first log line from startup with no explicit flags looks like
this: Erlang/OTP 18 [erts-7.0] [source] [64-bit] [async-threads:10]
[hipe] [kernel-poll:false]

When I call the NIF, the calling process hangs forever. When I call it
from the shell, I'm unable to interrupt the process (C-g, i 1 does
nothing useful).

If I explicitly use '-smp enable' as arguments to erl, the NIF runs
fine. In that case the first log line looks like this: Erlang/OTP 18
[erts-7.0] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:10]
[hipe] [kernel-poll:false]

This behaviour got me a bit confused, as there is no indication what
is happening except "something somewhere got stuck". It's not a common
case for me, as most machines have multiple cores except tiny cloud
instances or virtual machines.

Regards
Knut
_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
(Continue reading)

Rik Ribbers | 26 Jun 22:43 2015
Picon

ipv6 bug in inet:ntoa

Hello,

I've been playing around with ipv6 in erlang and came across at first strange behaviour in converting string to ipv6 and back

~ --> erl
Erlang/OTP 18 [erts-7.0] [source-4d83b58] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V7.0  (abort with ^G)
1>inet:parse_address("2a00:d78::147:94:198:152:68").
{ok,{10752,3448,0,327,148,408,338,104}}
2> inet:ntoa({10752,3448,0,327,148,408,338,104}).
"2A00:D78:0:147:94:198:152:68"

If you look closely you will see that there is an extra 0 introduced. This is actually correct. In IETF RFC5952 section 4.2.2 states that a single 0 must not be shortened. This however introduces however the question is the inet:parse_address is actually correct, however it is being friendly to its caller... 

The real issue is however that the addresses are displayed in uppercase which is simply wrong. As RFC5952 clearly states in section 4.3. There is even Errata on this issue that states it must be in lower case.

The RFC can be found here https://tools.ietf.org/html/rfc5952 

Kind regards,
Rik Ribbers

_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs
Leo Liu | 20 Jun 11:14 2015
Face
Picon

[PATCH] Export shell:catch_exception/1 as documented

diff --git a/lib/stdlib/src/shell.erl b/lib/stdlib/src/shell.erl
index c6ba574f..7343692f 100644
--- a/lib/stdlib/src/shell.erl
+++ b/lib/stdlib/src/shell.erl
 <at>  <at>  -22,7 +22,7  <at>  <at> 
 -export([whereis_evaluator/0, whereis_evaluator/1]).
 -export([start_restricted/1, stop_restricted/0]).
 -export([local_allowed/3, non_local_allowed/3]).
--export([prompt_func/1, strings/1]).
+-export([catch_exception/1, prompt_func/1, strings/1]).

 -define(LINEMAX, 30).
 -define(CHAR_MAX, 60).

_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs

Leo Liu | 20 Jun 09:31 2015
Face
Picon

[PATCH] Fix misleading argument name in shell:prompt_func/1

diff --git a/lib/stdlib/src/shell.erl b/lib/stdlib/src/shell.erl
index c6ba574f..87770d29 100644
--- a/lib/stdlib/src/shell.erl
+++ b/lib/stdlib/src/shell.erl
 <at>  <at>  -1485,8 +1485,8  <at>  <at>  catch_exception(Bool) ->
       PromptFunc :: 'default' | {module(),atom()},
       PromptFunc2 :: 'default' | {module(),atom()}.

-prompt_func(String) ->
-    set_env(stdlib, shell_prompt_func, String, ?DEF_PROMPT_FUNC).
+prompt_func(PromptFunc) ->
+    set_env(stdlib, shell_prompt_func, PromptFunc, ?DEF_PROMPT_FUNC).

 -spec strings(Strings) -> Strings2 when
       Strings :: boolean(),

_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs

Leo Liu | 20 Jun 04:20 2015
Face
Picon

./otp_build autoconf: sed: RE error: illegal byte sequence

On Yosemite, running ./otp_build autoconf gives:

=== running autoconf in lib/test_server/src
sed: RE error: illegal byte sequence

Leo

_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs

Leo Liu | 19 Jun 12:18 2015
Face
Picon

erlang/master fails to build on Yosemite

It appears erlang/otp 18 is about to be released. But building on
Yosemite failed today. My last successfully build was on 12 June 2015.

make[2]: Nothing to be done for `depend'.
 MAKE	emulator
 MAKE	opt
 GEN	x86_64-apple-darwin14.3.0/gen_git_version.mk
 LD	/Users/leo/sources/erlang/otp/bin/x86_64-apple-darwin14.3.0/beam.smp
Undefined symbols for architecture x86_64:
  "_erts_poll_get_table_len_kp", referenced from:
      _update_fallback_pollset in erl_poll.kp.o
  "_erts_poll_get_table_len_nkp", referenced from:
      _handle_update_requests in erl_poll.nkp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [/Users/leo/sources/erlang/otp/bin/x86_64-apple-darwin14.3.0/beam.smp] Error 1
make[2]: *** [opt] Error 2
make[1]: *** [smp] Error 2
make: *** [emulator] Error 2

Could someone take a look? Thanks.
Leo

_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs

Rory Byrne | 4 Jun 17:16 2015

Segmentation fault using './otp_build update_preloaded' on master

Hello,

I've tested this on Linux and FreeBSD with the following results:

#---------------------------
# On Linux (debian wheezy):
#---------------------------

$ uname -a
Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u2 x86_64 GNU/Linux

$ echo $MAKEFLAGS
-j8

$ git log | head -n 1
commit 99ccfe4d73b3ba82a8a461b53cb30cf512ee1bb9

$ ./otp_build update_preloaded --no-commit
rm -f ./erl_prim_loader.beam ./init.beam ./prim_file.beam ./prim_inet.beam ./zlib.beam
./prim_zip.beam ./otp_ring0.beam ./erlang.beam ./erts_internal.beam ./prim_eval.beam ../ebin/erts.app
 MAKE   preloaded
make[1]: Entering directory `/usr/local/erlang/otp_source_dev/erts/preloaded/src'
 ERLC   erl_prim_loader.beam
 ERLC   init.beam
 ERLC   prim_file.beam
 ERLC   prim_inet.beam
 ERLC   zlib.beam
 ERLC   prim_zip.beam
 ERLC   otp_ring0.beam
 ERLC   erlang.beam
 ERLC   erts_internal.beam
 ERLC   prim_eval.abstr
 VSN    ../ebin/erts.app
 GEN    prim_eval.beam
Segmentation fault
make[1]: *** [prim_inet.beam] Error 139
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/usr/local/erlang/otp_source_dev/erts/preloaded/src'
make: *** [preloaded] Error 2

#-------------
# On FreeBSD:
#-------------

$ uname -a
FreeBSD freebsd 10.1-RELEASE-p6 FreeBSD 10.1-RELEASE-p6 #0: Tue Feb 24 19:00:21 UTC 2015    
root <at> amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

$ git log | head -n 1
commit 99ccfe4d73b3ba82a8a461b53cb30cf512ee1bb9

$ ./otp_build update_preloaded --no-commit
rm -f ./erl_prim_loader.beam ./init.beam ./prim_file.beam ./prim_inet.beam ./zlib.beam
./prim_zip.beam ./otp_ring0.beam ./erlang.beam ./erts_internal.beam ./prim_eval.beam ../ebin/erts.app
 MAKE   preloaded
gmake[1]: Entering directory '/usr/local/erlang/otp_source_dev/erts/preloaded/src'
 ERLC   erl_prim_loader.beam
 ERLC   init.beam
 ERLC   prim_file.beam
 ERLC   prim_inet.beam
/usr/local/erlang/otp_source_dev/make/x86_64-unknown-freebsd10.1/otp.mk:131: recipe for
target 'prim_inet.beam' failed
gmake[1]: *** [prim_inet.beam] Segmentation fault (core dumped)
gmake[1]: Leaving directory '/usr/local/erlang/otp_source_dev/erts/preloaded/src'
Makefile:487: recipe for target 'preloaded' failed
gmake: *** [preloaded] Error 2

Regards,

Rory
_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs

Felix Gallo | 3 Jun 17:41 2015
Picon

segv compiling master (freebsd-10.1 on x64)

root <at> sov3:~/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 <at> erlang.org>
root <at> sov3:~/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 <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs
Tuncer Ayaz | 3 Jun 12:55 2015
Picon

Re: Observer Crashdump Viewer bug?

On Tue, Jun 2, 2015 at 8:09 AM, Dan Gudmundsson wrote:
> I have another branch in testing with crashdump extensions.

Thanks, that resolved the warnings.

[...]

>> WARNING: Found unexpected tag:scheduler
>> WARNING: Found unexpected tag:scheduler
>> WARNING: Found unexpected line in general information:
>> Calling Thread
>> WARNING: Found unexpected line in ETS info:
>> Chain Length Avg
>> [last two lines repeated 20 times]
_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs

Stavros Aronis | 2 Jun 10:21 2015
Picon

otp/master (b37c4e2) is currently broken

After the latest merge of 'maint', making 'master' fails with:

 ERLC ../ebin/ssh.beam
ssh.erl:363: syntax error before: '<<'
ssh.erl:268: function handle_option/3 undefined
ssh.erl:393: Warning: function handle_ssh_option/1 is unused
ssh.erl:486: Warning: function handle_inet_option/1 is unused
ssh.erl:503: Warning: function handle_pref_algs/1 is unused
[...]

This is to be expected given:


/Stavros
_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs
Thorsten Schütt | 1 Jun 12:35 2015
Picon

parameterised types for orddict:is_key/1

Hi,

did the following commit introduce a new element to the abstract representation of Erlang? Or is it the
first occurrence of {var, ‘Variablename’} without a line number? All other occurrences of
variables have the form {var, LineNumber, ‘Variablename’}.

Commit:
https://github.com/erlang/otp/commit/966e9e7ed0951db306c3c5dc4b1fd4c6eac25cf9

It introduces parameterised types/specs to the orddict module. I am in particular interested in the
is_key/1 function. The new spec is the following:

-spec is_key(Key, Orddict) -> boolean() when
Orddict :: orddict(Key, Value :: term()).

When I look at the abstract representation of the parser, I get the following:
{type,42,'fun',
	 [{type,42,product,
                  [{var,'Key'},
                   {user_type,43,orddict,
                          [{var,43,'Key'},
                           {ann_type,43,
                            [{var,43,'Value'},
                             {type,43,term,[]}]}]}]},
                   {type,42,boolean,[]}]}

The parser substituted the Orddict variable with the constraint from the when clause. The Orddict
variable disappeared and all the line numbers stayed at 43. However, the variable ‘Key’ lost its line
number. Is that on purpose?

Thanks,
  Thorsten
_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs

Gmane