Skip to content
This repository has been archived by the owner on May 16, 2020. It is now read-only.

Thread Unsafe? in multi process access (common slave) #46

Open
c-bik opened this issue May 15, 2019 · 1 comment
Open

Thread Unsafe? in multi process access (common slave) #46

c-bik opened this issue May 15, 2019 · 1 comment
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@c-bik
Copy link
Member

c-bik commented May 15, 2019

Password = ...
User = ...
Tns = ...
TS = fun() -> calendar:now_to_local_time(os:timestamp()) end.

[spawn(fun() ->
    io:format("~p:~p connecting...~n", [TS(), [M]]),
    {ok, Pid} = dpi:load(),
    io:format("~p:~p dpi:load ~p~n", [TS(), [M], Pid]),
    Context = dpi:context_create(3, 0),
    io:format("~p:~p dpi:context_create ~p~n", [TS(), [M], Context]),
    Conn = (catch dpi:conn_create(Context, User, Password, Tns, #{}, #{})),
    io:format("~p:~p dpi:conn_create ~p~n", [TS(), [M], Conn]),
    io:format("~p:~p connected!~n", [TS(), [M]])
end) || M <- ".$"].

Crashes

{{2019,5,15},{15,9,15}}:"." connecting...
{{2019,5,15},{15,9,15}}:"$" connecting...
{{2019,5,15},{15,9,15}}:"$" dpi:load <50820.67.0>
{{2019,5,15},{15,9,15}}:"$" dpi:context_create #Ref<50820.355671296.2690777089.113003>
{{2019,5,15},{15,9,15}}:"$" dpi:conn_create #Ref<50820.355671296.2690777089.113004>
{{2019,5,15},{15,9,15}}:"$" connected!
2019-05-15 15:09:47.123 [error]  Error in process <0.12928.3> on node '...' with exit value:
{{badmatch,{error,timeout}},[{erl_eval,expr,3,[]}]}

Please analyze and provide with a root cause report and / or fix

@c-bik c-bik added bug Something isn't working question Further information is requested labels May 15, 2019
@c-bik
Copy link
Member Author

c-bik commented Jul 3, 2019

Retry reproduce

@c-bik c-bik assigned c-bik and unassigned KarlKeiser Jul 4, 2019
@c-bik c-bik changed the title Thread Unsafe(?) Thread Unsafe? in multi process access (common slave) Jul 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants