From walter.weinmann@REDACTED Thu Feb 2 17:13:08 2017 From: walter.weinmann@REDACTED (Walter Weinmann) Date: Thu, 2 Feb 2017 17:13:08 +0100 Subject: [erlang-bugs] Erlang Common Test: {require, param} not working Message-ID: OS version: Ubuntu 16.10 Erlang version: Erlang/OTP 19 [erts-8.2] [source-ac2de40] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false] Attached a small example file, the result message is: 1 my_require_SUITE my_group my_test < > 0.000s SKIPPED {require_failed,{not_available,param_suite}} -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: my_require_SUITE.erl Type: application/octet-stream Size: 636 bytes Desc: not available URL: From walter.weinmann@REDACTED Thu Feb 2 17:30:04 2017 From: walter.weinmann@REDACTED (Walter Weinmann) Date: Thu, 2 Feb 2017 17:30:04 +0100 Subject: [erlang-bugs] Erlang Common Test: {shuffle {seed}} not working Message-ID: OS version: Ubuntu 16.10 Erlang version: Erlang/OTP 19 [erts-8.2] [source-ac2de40] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false] Attached a small example file, the result in raw.log is: --- Test run on 2017/02/02 17:23:30 --- Converting "/home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress/." to "/home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress" and re-inserting with add_patha/1 Common Test v1.13 starting (cwd is /home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress) Common Test: Running make in test directories... Including the following directories: "/home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress/include" Recompile: my_shuffle_SUITE CWD set to: "/home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress/logs/ct_run.test@REDACTED " TEST INFO: 1 test(s), 1 suite(s) Cover compiling 2 modules - this may take some time... done Testing kvs_stress_idea.kvs_stress.my_shuffle_SUITE: Starting test (with repeated test cases) EXIT, reason {function_clause, [{rand,uniform_s,[1,{4711}],[{file,"rand.erl"},{line,145}]}, {test_server_ctrl,shuffle_cases,3, [{file,"test_server_ctrl.erl"},{line,3175}]}, {test_server_ctrl,run_test_cases_loop,5, [{file,"test_server_ctrl.erl"},{line,2591}]}, {test_server_ctrl,run_test_cases,3, [{file,"test_server_ctrl.erl"},{line,2150}]}, {test_server_ctrl,ts_tc,3, [{file,"test_server_ctrl.erl"},{line,1209}]}, {test_server_ctrl,init_tester,10, [{file,"test_server_ctrl.erl"},{line,1163}]}]}Cover analysing... done Updating /home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress/logs/index.html ... done Updating /home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress/logs/all_runs.html ... done Test run failed! Reason: {'EXIT', {function_clause, [{rand,uniform_s,[1,{4711}],[{file,"rand.erl"},{line,145}]}, {test_server_ctrl,shuffle_cases,3, [{file,"test_server_ctrl.erl"},{line,3175}]}, {test_server_ctrl,run_test_cases_loop,5, [{file,"test_server_ctrl.erl"},{line,2591}]}, {test_server_ctrl,run_test_cases,3, [{file,"test_server_ctrl.erl"},{line,2150}]}, {test_server_ctrl,ts_tc,3, [{file,"test_server_ctrl.erl"},{line,1209}]}, {test_server_ctrl,init_tester,10, [{file,"test_server_ctrl.erl"},{line,1163}]}]}} -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: my_shuffle_SUITE.erl Type: application/octet-stream Size: 372 bytes Desc: not available URL: From walter.weinmann@REDACTED Fri Feb 3 13:38:20 2017 From: walter.weinmann@REDACTED (Walter Weinmann) Date: Fri, 3 Feb 2017 13:38:20 +0100 Subject: [erlang-bugs] Erlang Common Test: {shuffle {seed}} not working In-Reply-To: References: Message-ID: Thanks Lars - got it wrong with the docs. But question, what is the meaning of these three integers? On 3 February 2017 at 13:07, Lars Hesel Christensen wrote: > Hi Walter, > > According to the ct docs (http://erlang.org/doc/man/common_test.html) > the shuffle seed should be on the form '{integer(),integer(),integer()}'. > > Cheers, > Lars > > On 02/02/2017 05:30 PM, Walter Weinmann wrote: > > OS version: Ubuntu 16.10 > > Erlang version: Erlang/OTP 19 [erts-8.2] [source-ac2de40] [64-bit] > > [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false] > > > > Attached a small example file, the result in raw.log is: > > > > --- Test run on 2017/02/02 17:23:30 --- > > Converting "/home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress/." to > > "/home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress" and re-inserting > > with add_patha/1 > > > > > > Common Test v1.13 starting (cwd is > > /home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress) > > > > > > Common Test: Running make in test directories... > > Including the following directories: > > "/home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress/include" > > Recompile: my_shuffle_SUITE > > > > CWD set to: > > "/home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress/ > logs/ct_run.test@REDACTED" > > > > TEST INFO: 1 test(s), 1 suite(s) > > > > Cover compiling 2 modules - this may take some time... done > > > > Testing kvs_stress_idea.kvs_stress.my_shuffle_SUITE: Starting test (with > > repeated test cases) > > EXIT, reason {function_clause, > > > > [{rand,uniform_s,[1,{4711}],[{file,"rand.erl"},{line,145}]}, > > {test_server_ctrl,shuffle_cases,3, > > [{file,"test_server_ctrl.erl"},{line,3175}]}, > > {test_server_ctrl,run_test_cases_loop,5, > > [{file,"test_server_ctrl.erl"},{line,2591}]}, > > {test_server_ctrl,run_test_cases,3, > > [{file,"test_server_ctrl.erl"},{line,2150}]}, > > {test_server_ctrl,ts_tc,3, > > [{file,"test_server_ctrl.erl"},{line,1209}]}, > > {test_server_ctrl,init_tester,10, > > > > [{file,"test_server_ctrl.erl"},{line,1163}]}]}Cover analysing... done > > > > Updating > > /home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress/logs/index.html ... > > done > > Updating > > /home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress/logs/all_runs.html > > ... done > > > > > > Test run failed! Reason: > > {'EXIT', > > {function_clause, > > [{rand,uniform_s,[1,{4711}],[{file,"rand.erl"},{line,145}]}, > > {test_server_ctrl,shuffle_cases,3, > > [{file,"test_server_ctrl.erl"},{line,3175}]}, > > {test_server_ctrl,run_test_cases_loop,5, > > [{file,"test_server_ctrl.erl"},{line,2591}]}, > > {test_server_ctrl,run_test_cases,3, > > [{file,"test_server_ctrl.erl"},{line,2150}]}, > > {test_server_ctrl,ts_tc,3, > > [{file,"test_server_ctrl.erl"},{line,1209}]}, > > {test_server_ctrl,init_tester,10, > > [{file,"test_server_ctrl.erl"},{line,1163}]}]}} > > > > > > > > _______________________________________________ > > erlang-bugs mailing list > > erlang-bugs@REDACTED > > http://erlang.org/mailman/listinfo/erlang-bugs > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From walter.weinmann@REDACTED Fri Feb 3 13:54:06 2017 From: walter.weinmann@REDACTED (Walter Weinmann) Date: Fri, 3 Feb 2017 13:54:06 +0100 Subject: [erlang-bugs] Erlang Common Test: {shuffle {seed}} not working In-Reply-To: References: Message-ID: Peter thanks for the help - I agree with the documentation issue. Best regards Walter On 3 February 2017 at 13:51, Peter Andersson E < peter.e.andersson@REDACTED> wrote: > Hi Walter, > > > > Please see the documentation for function random:seed/1. ( > http://erlang.org/doc/man/random.html#seed-1) > > > > The CT User?s Guide really should refer to this page to avoid confusion. > > > > Best regards, > > Peter > > > > Ericsson AB, Erlang/OTP > > > > *From:* erlang-bugs-bounces@REDACTED [mailto:erlang-bugs-bounces@ > erlang.org] *On Behalf Of *Walter Weinmann > *Sent:* den 3 februari 2017 13:38 > *To:* Lars Hesel Christensen > *Cc:* erlang-bugs > *Subject:* Re: [erlang-bugs] Erlang Common Test: {shuffle {seed}} not > working > > > > Thanks Lars - got it wrong with the docs. But question, what is the > meaning of these three integers? > > > > On 3 February 2017 at 13:07, Lars Hesel Christensen > wrote: > > Hi Walter, > > According to the ct docs (http://erlang.org/doc/man/common_test.html) > the shuffle seed should be on the form '{integer(),integer(),integer()}'. > > Cheers, > Lars > > > On 02/02/2017 05:30 PM, Walter Weinmann wrote: > > OS version: Ubuntu 16.10 > > Erlang version: Erlang/OTP 19 [erts-8.2] [source-ac2de40] [64-bit] > > [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false] > > > > Attached a small example file, the result in raw.log is: > > > > --- Test run on 2017/02/02 17:23:30 --- > > Converting "/home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress/." to > > "/home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress" and re-inserting > > with add_patha/1 > > > > > > Common Test v1.13 starting (cwd is > > /home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress) > > > > > > Common Test: Running make in test directories... > > Including the following directories: > > "/home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress/include" > > Recompile: my_shuffle_SUITE > > > > CWD set to: > > "/home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress/ > logs/ct_run.test@REDACTED" > > > > TEST INFO: 1 test(s), 1 suite(s) > > > > Cover compiling 2 modules - this may take some time... done > > > > Testing kvs_stress_idea.kvs_stress.my_shuffle_SUITE: Starting test (with > > repeated test cases) > > EXIT, reason {function_clause, > > > > [{rand,uniform_s,[1,{4711}],[{file,"rand.erl"},{line,145}]}, > > {test_server_ctrl,shuffle_cases,3, > > [{file,"test_server_ctrl.erl"},{line,3175}]}, > > {test_server_ctrl,run_test_cases_loop,5, > > [{file,"test_server_ctrl.erl"},{line,2591}]}, > > {test_server_ctrl,run_test_cases,3, > > [{file,"test_server_ctrl.erl"},{line,2150}]}, > > {test_server_ctrl,ts_tc,3, > > [{file,"test_server_ctrl.erl"},{line,1209}]}, > > {test_server_ctrl,init_tester,10, > > > > [{file,"test_server_ctrl.erl"},{line,1163}]}]}Cover analysing... done > > > > Updating > > /home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress/logs/index.html ... > > done > > Updating > > /home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress/logs/all_runs.html > > ... done > > > > > > Test run failed! Reason: > > {'EXIT', > > {function_clause, > > [{rand,uniform_s,[1,{4711}],[{file,"rand.erl"},{line,145}]}, > > {test_server_ctrl,shuffle_cases,3, > > [{file,"test_server_ctrl.erl"},{line,3175}]}, > > {test_server_ctrl,run_test_cases_loop,5, > > [{file,"test_server_ctrl.erl"},{line,2591}]}, > > {test_server_ctrl,run_test_cases,3, > > [{file,"test_server_ctrl.erl"},{line,2150}]}, > > {test_server_ctrl,ts_tc,3, > > [{file,"test_server_ctrl.erl"},{line,1209}]}, > > {test_server_ctrl,init_tester,10, > > [{file,"test_server_ctrl.erl"},{line,1163}]}]}} > > > > > > > > > _______________________________________________ > > erlang-bugs mailing list > > erlang-bugs@REDACTED > > http://erlang.org/mailman/listinfo/erlang-bugs > > > > > > > ____ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lars@REDACTED Fri Feb 3 13:07:09 2017 From: lars@REDACTED (Lars Hesel Christensen) Date: Fri, 3 Feb 2017 13:07:09 +0100 Subject: [erlang-bugs] Erlang Common Test: {shuffle {seed}} not working In-Reply-To: References: Message-ID: Hi Walter, According to the ct docs (http://erlang.org/doc/man/common_test.html) the shuffle seed should be on the form '{integer(),integer(),integer()}'. Cheers, Lars On 02/02/2017 05:30 PM, Walter Weinmann wrote: > OS version: Ubuntu 16.10 > Erlang version: Erlang/OTP 19 [erts-8.2] [source-ac2de40] [64-bit] > [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false] > > Attached a small example file, the result in raw.log is: > > --- Test run on 2017/02/02 17:23:30 --- > Converting "/home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress/." to > "/home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress" and re-inserting > with add_patha/1 > > > Common Test v1.13 starting (cwd is > /home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress) > > > Common Test: Running make in test directories... > Including the following directories: > "/home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress/include" > Recompile: my_shuffle_SUITE > > CWD set to: > "/home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress/logs/ct_run.test@REDACTED" > > TEST INFO: 1 test(s), 1 suite(s) > > Cover compiling 2 modules - this may take some time... done > > Testing kvs_stress_idea.kvs_stress.my_shuffle_SUITE: Starting test (with > repeated test cases) > EXIT, reason {function_clause, > > [{rand,uniform_s,[1,{4711}],[{file,"rand.erl"},{line,145}]}, > {test_server_ctrl,shuffle_cases,3, > [{file,"test_server_ctrl.erl"},{line,3175}]}, > {test_server_ctrl,run_test_cases_loop,5, > [{file,"test_server_ctrl.erl"},{line,2591}]}, > {test_server_ctrl,run_test_cases,3, > [{file,"test_server_ctrl.erl"},{line,2150}]}, > {test_server_ctrl,ts_tc,3, > [{file,"test_server_ctrl.erl"},{line,1209}]}, > {test_server_ctrl,init_tester,10, > > [{file,"test_server_ctrl.erl"},{line,1163}]}]}Cover analysing... done > > Updating > /home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress/logs/index.html ... > done > Updating > /home/wwe/SoftDevelopment/kvs_stress_idea/kvs_stress/logs/all_runs.html > ... done > > > Test run failed! Reason: > {'EXIT', > {function_clause, > [{rand,uniform_s,[1,{4711}],[{file,"rand.erl"},{line,145}]}, > {test_server_ctrl,shuffle_cases,3, > [{file,"test_server_ctrl.erl"},{line,3175}]}, > {test_server_ctrl,run_test_cases_loop,5, > [{file,"test_server_ctrl.erl"},{line,2591}]}, > {test_server_ctrl,run_test_cases,3, > [{file,"test_server_ctrl.erl"},{line,2150}]}, > {test_server_ctrl,ts_tc,3, > [{file,"test_server_ctrl.erl"},{line,1209}]}, > {test_server_ctrl,init_tester,10, > [{file,"test_server_ctrl.erl"},{line,1163}]}]}} > > > > _______________________________________________ > erlang-bugs mailing list > erlang-bugs@REDACTED > http://erlang.org/mailman/listinfo/erlang-bugs > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From alttagil@REDACTED Mon Feb 6 23:39:25 2017 From: alttagil@REDACTED (Alex Hudich) Date: Tue, 7 Feb 2017 01:39:25 +0300 Subject: [erlang-bugs] snmpa_mib_data_tttn.erl hangs Message-ID: <2228243D-6AC4-42DC-8839-60E98AA042F0@gmail.com> Hi! I was wondering why simple erlang program hangs and consumes a lot of memory when it starts agent with simpliest MIB file: JSM-MIB DEFINITIONS ::= BEGIN IMPORTS OBJECT-TYPE FROM RFC-1212 experimental FROM RFC1155-SMI ; jsm OBJECT IDENTIFIER ::= { experimental 17780513 } jsmName OBJECT-TYPE SYNTAX OCTET STRING (SIZE (0..255)) ACCESS read-only STATUS mandatory DESCRIPTION ?Description? ::= { jsm 1 } END So I've found that in snmpa_mib_data_tttn.erl function integrate_indexes creates a huge list of undefined_nodes atoms before it could insert MIB data at 17780513 position! integrate_indexes(CurIndex, [{CurIndex, Data} | T]) -> [Data | integrate_indexes(CurIndex + 1, T)]; integrate_indexes(_Index, []) -> []; integrate_indexes(CurIndex, L) -> [undefined_node | integrate_indexes(CurIndex + 1, L)]. Why not use maps for the purpose of indexing and just skip unset positions? Alexander Hudich @alttagil -------------- next part -------------- An HTML attachment was scrubbed... URL: From Dinislam.Salikhov@REDACTED Fri Feb 17 10:20:52 2017 From: Dinislam.Salikhov@REDACTED (Salikhov Dinislam) Date: Fri, 17 Feb 2017 12:20:52 +0300 Subject: [erlang-bugs] Port driver use-after-free Message-ID: Hello, Failure scenario: 1. A process calls erlang:port_control() and passes a binary to port driver. 2. The driver is not invoked immediately, so the binary's refc is incremented and the pointers to binary and to binary's data are kept in struct ErtsProc2PortSigData_ for later call. The process is in pending queue. 3. The pending process is the only one having the refcount to binary. 4. An event occurs causing garbage collecting of the pending process. 5. The binary is relocated, so the pointers kept in ErtsProc2PortSigData_ become invalid. 6. The driver manipulates with already freed data. Unfortunately, I don't have the minimal code sample reproducing the issue. The described behavior is observed only on high loads and leads to VM crash. The issue presents in OTP-18.3 release. I didn't try it for later releases, but I couldn't find any related fixes done either. The memory for binary was first allocated as: 0x481a39 0x481c06 0x58db08 0x58dc91 0x591362 0x44177b 0x508a27 0x68f72d And then reallocated as: 0x482026 0x4828f9 0x482ac1 0x585984 0x586200 0x58caac 0x58a37e 0x586ca8 0x43c36b 0x508a27 0x68f72d In the attachment there is a patch with a quick fix for the issue. The idea is to always copy the data passed to the port driver if the actual call is pended. It is fine for small data, but can lead to performance degradation if megabytes-size binaries are passed to port_control(), that's why I haven't done a PR. Salikhov Dinislam -------------- next part -------------- A non-text attachment was scrubbed... Name: erlang.patch Type: text/x-patch Size: 1433 bytes Desc: not available URL: From lukas@REDACTED Tue Feb 21 09:47:09 2017 From: lukas@REDACTED (Lukas Larsson) Date: Tue, 21 Feb 2017 09:47:09 +0100 Subject: [erlang-bugs] Port driver use-after-free In-Reply-To: References: Message-ID: Hello, Thanks for the bug report and fix. The solution which I will include upstream is to add a call to erts_emasculate_writable_binary in the code that your patch deleted. Lukas On Fri, Feb 17, 2017 at 10:20 AM, Salikhov Dinislam < Dinislam.Salikhov@REDACTED> wrote: > Hello, > > Failure scenario: > 1. A process calls erlang:port_control() and passes a binary to port > driver. > 2. The driver is not invoked immediately, so the binary's refc is > incremented and the pointers to binary and to binary's data are kept in > struct ErtsProc2PortSigData_ for later call. The process is in pending > queue. > 3. The pending process is the only one having the refcount to binary. > 4. An event occurs causing garbage collecting of the pending process. > 5. The binary is relocated, so the pointers kept in ErtsProc2PortSigData_ > become invalid. > 6. The driver manipulates with already freed data. > > Unfortunately, I don't have the minimal code sample reproducing the issue. > The described behavior is observed only on high loads and leads to VM > crash. > The issue presents in OTP-18.3 release. I didn't try it for later > releases, but I couldn't find any related fixes done either. > > The memory for binary was first allocated as: > 0x481a39 > 0x481c06 > 0x58db08 > 0x58dc91 > 0x591362 > 0x44177b > 0x508a27 > 0x68f72d > > And then reallocated as: > 0x482026 > 0x4828f9 > 0x482ac1 > 0x585984 > 0x586200 > 0x58caac > 0x58a37e > 0x586ca8 > 0x43c36b > 0x508a27 > 0x68f72d > > In the attachment there is a patch with a quick fix for the issue. > The idea is to always copy the data passed to the port driver if the > actual call is pended. > It is fine for small data, but can lead to performance degradation if > megabytes-size binaries are passed to port_control(), that's why I haven't > done a PR. > > Salikhov Dinislam > > _______________________________________________ > erlang-bugs mailing list > erlang-bugs@REDACTED > http://erlang.org/mailman/listinfo/erlang-bugs > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vicent.ferrerguasch@REDACTED Thu Feb 23 13:32:43 2017 From: vicent.ferrerguasch@REDACTED (Ferrer Guasch Vicent) Date: Thu, 23 Feb 2017 12:32:43 +0000 Subject: [erlang-bugs] diameter_transport any/loopback atoms not accepted Message-ID: <3b9cea3b818d4233abd4aa5720e18215@aalto.fi> Hello, I am using erlang 19.2.3. I have detected that when adding a transport to the diameter service, the options {ip, any} or {ip, loopback} are not accepted, even though it is defined on the spec "IP = inet:ip_address() | any | loopback" For example: Opts = [{transport_module, diameter_sctp}, {transport_config, [ {ip, any]}], {ok, _T} = diameter:add_transport(?SERVER, {listen, Opts}), This happens with both diameter_sctp and diameter_tcp, you can check the errors given bellow. Rgds, Vicent TCP: {error, {invalid_address, [{diameter_lib,ip,1,[{file,"base/diameter_lib.erl"},{line,287}]}, {diameter_lib,ipaddr,1,[{file,"base/diameter_lib.erl"},{line,270}]}, {diameter_tcp,get_addr,2,[{file,"transport/diameter_tcp.erl"},{line,387}]}, {diameter_tcp,i,1,[{file,"transport/diameter_tcp.erl"},{line,255}]}, {diameter_tcp,init,1,[{file,"transport/diameter_tcp.erl"},{line,195}]}, {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]} ] } } in diameter_tcp:init/7 line 293 SCTP: {error, {invalid_address, [{diameter_lib,ip,1,[{file,"base/diameter_lib.erl"},{line,287}]}, {diameter_lib,ipaddr,1,[{file,"base/diameter_lib.erl"},{line,270}]}, {diameter_sctp,'-addrs/2-lc$^1/1-0-',1,[{file,"transport/diameter_sctp.erl"},{line,325}]}, {diameter_sctp,addrs,2,[{file,"transport/diameter_sctp.erl"},{line,325}]}, {diameter_sctp,open,3,[{file,"transport/diameter_sctp.erl"},{line,312}]}, {diameter_sctp,i,1,[{file,"transport/diameter_sctp.erl"},{line,223}]}, {diameter_sctp,init,1,[{file,"t..."},...]},...] } } in diameter_sctp:s/4 line 151 From vicent.ferrerguasch@REDACTED Mon Feb 27 12:44:43 2017 From: vicent.ferrerguasch@REDACTED (Ferrer Guasch Vicent) Date: Mon, 27 Feb 2017 11:44:43 +0000 Subject: [erlang-bugs] diameter_transport any/loopback atoms not accepted In-Reply-To: <22708.3814.495878.36119@gargle.gargle.HOWL> References: <22708.3814.495878.36119@gargle.gargle.HOWL> Message-ID: Hi, This is the documentation thread I used to get to that conclusion. The TCP parameter is equivalent. Rgds, Vicent According to http://erlang.org/doc/man/diameter.html#add_transport-2 -> Opt = transport_opt() http://erlang.org/doc/man/diameter.html#transport_opt -> {transport_config, term(), Unsigned32() | infinity} Term passed as the third argument to the start/3 function of the relevant transport module in order to start a transport process. http://erlang.org/doc/man/diameter_sctp.html#start-3 -> Opt = OwnOpt | SctpOpt OwnOpt = {raddr, inet:ip_address()} | {rport, integer()} | {accept, Match} SctpOpt = term() -> Remaining options are any accepted by gen_sctp:open/1, with the exception of options mode, binary, list, active and sctp_events. Note that options ip and port specify the local address and port respectively. http://erlang.org/doc/man/gen_sctp.html#open-1 -> Opts = [Opt] Opt = {ip, IP} | {ifaddr, IP} | inet:address_family() | {port, Port} | {type, SockType} | option() IP = inet:ip_address() | any | loopback > -----Original Message----- > From: anders.gs.svensson@REDACTED > [mailto:anders.gs.svensson@REDACTED] > Sent: 27. helmikuuta 2017 13:35 > To: erlang-bugs@REDACTED > Subject: Re: diameter_transport any/loopback atoms not accepted > > Hi Vincent. > > Neither diameter_tcp nor diameter_sctp document any|loopback as > acceptable that I can see: they require an inet:ip_address(), neither or which > is an atom. Where are you looking? > > That said, I'm not sure offhand why they don't/shouldn't handle these. > > Anders, Erlang/OTP > > > erlang-bugs-request@REDACTED writes: > > > > Hello, > > > > I am using erlang 19.2.3. I have detected that when adding a transport to > the diameter service, the options {ip, any} or {ip, loopback} are not > accepted, even though it is defined on the spec "IP = inet:ip_address() | any > | loopback" > > For example: > > > > Opts = [{transport_module, diameter_sctp}, > > {transport_config, [ {ip, any]}], > > {ok, _T} = diameter:add_transport(?SERVER, {listen, Opts}), > > > > This happens with both diameter_sctp and diameter_tcp, you can check > the errors given bellow. > > Rgds, > > Vicent > > > > TCP: > > {error, > > {invalid_address, > > [{diameter_lib,ip,1,[{file,"base/diameter_lib.erl"},{line,287}]}, > > {diameter_lib,ipaddr,1,[{file,"base/diameter_lib.erl"},{line,270}]}, > > > {diameter_tcp,get_addr,2,[{file,"transport/diameter_tcp.erl"},{line,387}]}, > > {diameter_tcp,i,1,[{file,"transport/diameter_tcp.erl"},{line,255}]}, > > {diameter_tcp,init,1,[{file,"transport/diameter_tcp.erl"},{line,195}]}, > > {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]} > > ] > > } > > } in diameter_tcp:init/7 line 293 > > > > SCTP: > > {error, > > {invalid_address, > > [{diameter_lib,ip,1,[{file,"base/diameter_lib.erl"},{line,287}]}, > > {diameter_lib,ipaddr,1,[{file,"base/diameter_lib.erl"},{line,270}]}, > > {diameter_sctp,'-addrs/2-lc$^1/1-0- > ',1,[{file,"transport/diameter_sctp.erl"},{line,325}]}, > > {diameter_sctp,addrs,2,[{file,"transport/diameter_sctp.erl"},{line,325}]}, > > {diameter_sctp,open,3,[{file,"transport/diameter_sctp.erl"},{line,312}]}, > > {diameter_sctp,i,1,[{file,"transport/diameter_sctp.erl"},{line,223}]}, > > {diameter_sctp,init,1,[{file,"t..."},...]},...] > > } > > } in diameter_sctp:s/4 line 151 > > > > > > ------------------------------ > > > > _______________________________________________ > > erlang-bugs mailing list > > erlang-bugs@REDACTED > > http://erlang.org/mailman/listinfo/erlang-bugs > > > > > > End of erlang-bugs Digest, Vol 256, Issue 2 > > ******************************************* From anders.gs.svensson@REDACTED Mon Feb 27 12:35:02 2017 From: anders.gs.svensson@REDACTED (anders.gs.svensson@REDACTED) Date: Mon, 27 Feb 2017 12:35:02 +0100 Subject: [erlang-bugs] diameter_transport any/loopback atoms not accepted In-Reply-To: References: Message-ID: <22708.3814.495878.36119@gargle.gargle.HOWL> Hi Vincent. Neither diameter_tcp nor diameter_sctp document any|loopback as acceptable that I can see: they require an inet:ip_address(), neither or which is an atom. Where are you looking? That said, I'm not sure offhand why they don't/shouldn't handle these. Anders, Erlang/OTP erlang-bugs-request@REDACTED writes: > > Hello, > > I am using erlang 19.2.3. I have detected that when adding a transport to the diameter service, the options {ip, any} or {ip, loopback} are not accepted, even though it is defined on the spec "IP = inet:ip_address() | any | loopback" > For example: > > Opts = [{transport_module, diameter_sctp}, > {transport_config, [ {ip, any]}], > {ok, _T} = diameter:add_transport(?SERVER, {listen, Opts}), > > This happens with both diameter_sctp and diameter_tcp, you can check the errors given bellow. > Rgds, > Vicent > > TCP: > {error, > {invalid_address, > [{diameter_lib,ip,1,[{file,"base/diameter_lib.erl"},{line,287}]}, > {diameter_lib,ipaddr,1,[{file,"base/diameter_lib.erl"},{line,270}]}, > {diameter_tcp,get_addr,2,[{file,"transport/diameter_tcp.erl"},{line,387}]}, > {diameter_tcp,i,1,[{file,"transport/diameter_tcp.erl"},{line,255}]}, > {diameter_tcp,init,1,[{file,"transport/diameter_tcp.erl"},{line,195}]}, > {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]} > ] > } > } in diameter_tcp:init/7 line 293 > > SCTP: > {error, > {invalid_address, > [{diameter_lib,ip,1,[{file,"base/diameter_lib.erl"},{line,287}]}, > {diameter_lib,ipaddr,1,[{file,"base/diameter_lib.erl"},{line,270}]}, > {diameter_sctp,'-addrs/2-lc$^1/1-0-',1,[{file,"transport/diameter_sctp.erl"},{line,325}]}, > {diameter_sctp,addrs,2,[{file,"transport/diameter_sctp.erl"},{line,325}]}, > {diameter_sctp,open,3,[{file,"transport/diameter_sctp.erl"},{line,312}]}, > {diameter_sctp,i,1,[{file,"transport/diameter_sctp.erl"},{line,223}]}, > {diameter_sctp,init,1,[{file,"t..."},...]},...] > } > } in diameter_sctp:s/4 line 151 > > > ------------------------------ > > _______________________________________________ > erlang-bugs mailing list > erlang-bugs@REDACTED > http://erlang.org/mailman/listinfo/erlang-bugs > > > End of erlang-bugs Digest, Vol 256, Issue 2 > ******************************************* From anders.gs.svensson@REDACTED Mon Feb 27 12:56:39 2017 From: anders.gs.svensson@REDACTED (anders.gs.svensson@REDACTED) Date: Mon, 27 Feb 2017 12:56:39 +0100 Subject: [erlang-bugs] diameter_transport any/loopback atoms not accepted In-Reply-To: References: <22708.3814.495878.36119@gargle.gargle.HOWL> Message-ID: <22708.5111.799226.931489@gargle.gargle.HOWL> Ah, you're right, I was looking at the wrong address. There's probably no good reason why any|loopback shouldn't be accepted, but I'll have to take a closer look. Anders Ferrer Guasch Vicent writes: > Hi, > > This is the documentation thread I used to get to that conclusion. The TCP parameter is equivalent. > Rgds, > Vicent > > According to > http://erlang.org/doc/man/diameter.html#add_transport-2 > -> Opt = transport_opt() > > http://erlang.org/doc/man/diameter.html#transport_opt > -> {transport_config, term(), Unsigned32() | infinity} > Term passed as the third argument to the start/3 function of the relevant transport module in order to start a transport process. > > http://erlang.org/doc/man/diameter_sctp.html#start-3 > -> Opt = OwnOpt | SctpOpt > OwnOpt = {raddr, inet:ip_address()} | {rport, integer()} | {accept, Match} > SctpOpt = term() > -> Remaining options are any accepted by gen_sctp:open/1, with the exception of options mode, binary, list, active and sctp_events. Note that options ip and port specify the local address and port respectively. > > http://erlang.org/doc/man/gen_sctp.html#open-1 > -> Opts = [Opt] > Opt = > {ip, IP} | > {ifaddr, IP} | > inet:address_family() | > {port, Port} | > {type, SockType} | > option() > IP = inet:ip_address() | any | loopback > > > > > -----Original Message----- > > From: anders.gs.svensson@REDACTED > > [mailto:anders.gs.svensson@REDACTED] > > Sent: 27. helmikuuta 2017 13:35 > > To: erlang-bugs@REDACTED > > Subject: Re: diameter_transport any/loopback atoms not accepted > > > > Hi Vincent. > > > > Neither diameter_tcp nor diameter_sctp document any|loopback as > > acceptable that I can see: they require an inet:ip_address(), neither or which > > is an atom. Where are you looking? > > > > That said, I'm not sure offhand why they don't/shouldn't handle these. > > > > Anders, Erlang/OTP > > > > > > erlang-bugs-request@REDACTED writes: > > > > > > Hello, > > > > > > I am using erlang 19.2.3. I have detected that when adding a transport to > > the diameter service, the options {ip, any} or {ip, loopback} are not > > accepted, even though it is defined on the spec "IP = inet:ip_address() | any > > | loopback" > > > For example: > > > > > > Opts = [{transport_module, diameter_sctp}, > > > {transport_config, [ {ip, any]}], > > > {ok, _T} = diameter:add_transport(?SERVER, {listen, Opts}), > > > > > > This happens with both diameter_sctp and diameter_tcp, you can check > > the errors given bellow. > > > Rgds, > > > Vicent > > > > > > TCP: > > > {error, > > > {invalid_address, > > > [{diameter_lib,ip,1,[{file,"base/diameter_lib.erl"},{line,287}]}, > > > {diameter_lib,ipaddr,1,[{file,"base/diameter_lib.erl"},{line,270}]}, > > > > > {diameter_tcp,get_addr,2,[{file,"transport/diameter_tcp.erl"},{line,387}]}, > > > {diameter_tcp,i,1,[{file,"transport/diameter_tcp.erl"},{line,255}]}, > > > {diameter_tcp,init,1,[{file,"transport/diameter_tcp.erl"},{line,195}]}, > > > {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]} > > > ] > > > } > > > } in diameter_tcp:init/7 line 293 > > > > > > SCTP: > > > {error, > > > {invalid_address, > > > [{diameter_lib,ip,1,[{file,"base/diameter_lib.erl"},{line,287}]}, > > > {diameter_lib,ipaddr,1,[{file,"base/diameter_lib.erl"},{line,270}]}, > > > {diameter_sctp,'-addrs/2-lc$^1/1-0- > > ',1,[{file,"transport/diameter_sctp.erl"},{line,325}]}, > > > {diameter_sctp,addrs,2,[{file,"transport/diameter_sctp.erl"},{line,325}]}, > > > {diameter_sctp,open,3,[{file,"transport/diameter_sctp.erl"},{line,312}]}, > > > {diameter_sctp,i,1,[{file,"transport/diameter_sctp.erl"},{line,223}]}, > > > {diameter_sctp,init,1,[{file,"t..."},...]},...] > > > } > > > } in diameter_sctp:s/4 line 151 > > > > > > > > > ------------------------------ > > > > > > _______________________________________________ > > > erlang-bugs mailing list > > > erlang-bugs@REDACTED > > > http://erlang.org/mailman/listinfo/erlang-bugs > > > > > > > > > End of erlang-bugs Digest, Vol 256, Issue 2 > > > *******************************************