beam.smp coredump when exiting riak #22

Closed
jonmeredith opened this Issue Jun 7, 2012 · 3 comments

Comments

Projects
None yet
2 participants
Contributor

jonmeredith commented Jun 7, 2012

When run with R15B against the current master branch, beam.smp coredumps on emulator exit.

jonmeredith was assigned Jun 7, 2012

Contributor

jonmeredith commented Jun 15, 2012

Reproducer, run with erl +A1 from the top level erlang_js dir t:run(). q(). will trigger

-module(t).
-compile([export_all]).

run() ->
    code:add_path("ebin"),
    ok = application:start(sasl),
    ok = application:start(erlang_js),
    true = (erlang:system_info(thread_pool_size) > 0),
    ThreadStack = 1,
    HeapSize = 1,
    js_driver:new(ThreadStack, HeapSize). 
Contributor

jonmeredith commented Jun 15, 2012

Smaller reproducer


% Have to add -compile([export_all]) to js_driver.erl
-module(t).
-compile([export_all]).
-define(DRIVER_NAME, "erlang_js_drv").

run() ->
    code:add_path("ebin"),
    ok = application:start(sasl),
    ok = application:start(erlang_js),
    true = (erlang:system_info(thread_pool_size) > 0),
    ThreadStack = 1,
    HeapSize = 1,
    js_driver:load_driver(),
    Port = open_port({spawn, ?DRIVER_NAME}, [binary]),
    js_driver:call_driver(Port, "ij", [ThreadStack, HeapSize], 5000),
    js_driver:define_js(Port, <<"avar.js">>, <<"var v;">>, 5000). %% This call is critical

No coredump unless define_js is called.

Contributor

jonmeredith commented Jun 15, 2012

Fixed in #25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment