kellymclaughlin / rebar3-eqc-plugin

A rebar3 plugin to enable the execution of Erlang QuickCheck properties
Apache License 2.0
13 stars 20 forks source link

Running distributed nodes #16

Closed ThomasArts closed 8 years ago

ThomasArts commented 8 years ago

In rebar3 you can start a shell with --sname option, or use the ERL_FLAGS environment parameter to get a distributed node. But when using this qith the QuickCheck plug-in, it does not work. It seems to me an issue with rebar3, since when you run the plug-in, it has already started Erlang.

~/myapp [git:^*master?]: ERL_FLAGS="-sname eqc" rebar3 shell ===> Verifying dependencies... ===> Compiling storage_backend Erlang/OTP 18 [erts-7.2.1] [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false] [dtrace]

Eshell V7.2.1 (abort with ^G) (eqc@ThomasComputer)1> halt(). ~/myapp [git:^*master?]: ERL_FLAGS="-sname eqc" rebar3 eqc ===> Verifying dependencies... ===> Compiling storage_backend Starting Quviq QuickCheck Automotive version 1.37.0 (compiled at {{2016,1,22},{12,4,1}}) Licence for Quviq AB reserved until {{2016,2,24},{21,12,2}} Running EQC tests...

===== robust_eqc:prop_robust_eqc ===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace ===> When submitting a bug report, please include the output of `rebar3 report "your command"

For completeness sake, I add the report, in case it is a rebar3 thing and you need to forward it.

rebar3 report Rebar3 report version 3.0.0-beta.4+build.3316.ref2d2b8a7

generated at 2016-02-24T19:15:47+00:00

Please submit this along with your issue at https://github.com/rebar/rebar3/issues (and feel free to edit out private information, if any)

Task: Entered as:


Operating System: x86_64-apple-darwin15.2.0 ERTS: Erlang/OTP 18 [erts-7.2.1] [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false] [dtrace] Root Directory: /usr/local/Cellar/erlang/18.2.1/lib/erlang

Library directory: /usr/local/Cellar/erlang/18.2.1/lib/erlang/lib

Loaded Applications: bbmustache: 1.0.4 certifi: 0.3.0 cf: 0.1.2 common_test: 1.11.1 compiler: 6.0.2 crypto: 3.6.2 cth_readable: 1.2.0 dialyzer: 2.8.2 edoc: 0.7.17 erlware_commons: 0.19.0 eunit: 2.2.12 eunit_formatters: 0.3.1 getopt: 0.8.2 inets: 6.1 kernel: 4.1.1 providers: 1.6.0 public_key: 1.1 relx: 3.17.0 sasl: 2.6.1 snmp: 5.2.1 ssl_verify_hostname: 1.0.5 stdlib: 2.7 syntax_tools: 1.7 tools: 2.8.2


Escript path: /Users/thomas/bin/rebar3 Providers: app_discovery as clean compile compile cover ct deps dialyzer do edoc eqc escriptize eunit help install install_deps list lock new path pkgs release relup report shell tar tree unlock update upgrade upgrade upgrade version xref

kellymclaughlin commented 8 years ago

Hi Thomas. Thanks for the report. I tried running a relatively simple properties with ERL_FLAGS="-sname eqc" set, but I didn't receive a similar crash. I wonder if you would be able to run the same command with DEBUG=1 set in order to produce a stacktrace to get a better idea of where things are going wrong. I also have some more complicated properties I can test with and attempt to reproduce the behavior.

ThomasArts commented 8 years ago

Thanks for your response. It turns out to be an Erlang issue. You can start a distributed node with Erl_flags, but that node times out when you try to start a slave in it, or check whether it is alive.

Thus, using ERL_Flags in rebar3 eqc doesn't work for that kind of actions: start a slave and rpc to the slave.

Awaiting an answer from OTP team before we can say what to do in rebar or your plugin

Regards Thomas

On 25 Feb 2016, at 06:08, Kelly McLaughlin notifications@github.com wrote:

Hi Thomas. Thanks for the report. I tried running a relatively simple properties with ERL_FLAGS="-sname eqc" set, but I didn't receive a similar crash. I wonder if you would be able to run the same command with DEBUG=1 set in order to produce a stacktrace to get a better idea of where things are going wrong. I also have some more complicated properties I can test with and attempt to reproduce the behavior.

— Reply to this email directly or view it on GitHub.

ThomasArts commented 8 years ago

See http://bugs.erlang.org/browse/ERL-99 The ERL_FLAGS are OS environment variables, thus the slave that starts gets two -sname flags.

Logical, if you think about it. Back to the drawing board to find a way to use eqc plugin with several nodes.