Skip to content

Unhandled socket timeout errors #51

@marcelotto

Description

@marcelotto

In the Panpipe library (an Elixir wrapper for Pandoc that uses exile), users reported crashes under high concurrency: marcelotto/panpipe#8

[error] GenServer #PID<0.517.0> terminating
** (MatchError) no match of right hand side value: {:error, :timeout}
    (exile 0.12.0) lib/exile/process/exec.ex:78: Exile.Process.Exec.receive_fds/2
    (exile 0.12.0) lib/exile/process/exec.ex:40: Exile.Process.Exec.start/2
    (exile 0.12.0) lib/exile/process.ex:906: Exile.Process.exec/1
    (exile 0.12.0) lib/exile/process.ex:628: Exile.Process.handle_continue/2
    (stdlib 6.0) gen_server.erl:2163: :gen_server.try_handle_continue/3
    (stdlib 6.0) gen_server.erl:2072: :gen_server.loop/7
    (stdlib 6.0) proc_lib.erl:329: :proc_lib.init_p_do_apply/3

Looking at the code in lib/exile/process/exec.ex:78 the issue appears to be an unhandled timeout:

  {:ok, sock} = :socket.accept(lsock, @socket_timeout)

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