Skip to content

Address is use #46

Description

@holsee

When performing basic stress testing the following error occurs:

10:27:31.339 request_id=Ff2tuFY7vDKkyNYAAEki pid=<0.2931.0> module=Plug.Logger [info]  Sent 200 in 202ms

10:27:31.340 pid=<0.2627.0> module=gen_server [error] GenServer Chroxy.ProxyListener terminating
** (CaseClauseError) no case clause matching: {:error, :emfile}
    (chroxy 0.6.3) lib/chroxy/proxy_listener.ex:85: Chroxy.ProxyListener.handle_cast/2
    (stdlib 3.9) gen_server.erl:637: :gen_server.try_dispatch/4
    (stdlib 3.9) gen_server.erl:711: :gen_server.handle_msg/6
    (stdlib 3.9) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: {:"$gen_cast", {:accept, [dyn_hook: #Function<0.68892742/1 in Chroxy.ChromeProxy.handle_call/3>]}}
State: %{listen_socket: #Port<0.1125>}

10:27:31.340 pid=<0.2933.0> module=Plug.Logger [info]  GET /api/v1/connection

10:27:31.341 pid=<0.2935.0> module=Chroxy.ProxyListener [error] TCP Listen failed due to: :eaddrinuse

When the Chroxy.ProxyListener fails to obtain address to bind to, within a race condition between the restart of the tcp listener and the clean-up of the native resource after the crash, then the system will enter a bad state where Chrome page sessions will be created as part of the http request for a page session to chroxy, but the websocket proxy will not be able to be created.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions