Skip to content

Lots of connections causes Unix.select to fail with EINVAL #66

Closed

Description

@djs55

On OSX we see fatal errors from Lwt_main.run like

proxy: internal error, uncaught exception:
       Unix.Unix_error(Unix.EINVAL, "select", "")
       Raised by primitive operation at file "src/unix/lwt_engine.ml", line 371, characters 26-60
       Called from file "src/unix/lwt_engine.ml", line 312, characters 8-39
       Called from file "src/unix/lwt_main.ml", line 41, characters 8-82

This appears to be related to [ocsigen/lwt#222]

Activity

  1. djs55 commented on Jun 20, 2016

    @djs55
    CollaboratorAuthor

    It looks like even libev relies internally on select on OS X:

    (libev) select: Invalid argument
    

    I think we should switch to libuv as Windows is a first-class target via IOCP, it's used by node.js and they seem to know all the tricks. Apparently libuv started off as a wrapper around libev which also supported Windows via IOCP, but recently the libev dependency has been removed and it's now a standalone library.

    There seem to be several incomplete bindings:

    There's a discussion comparing the two here: https://www.reddit.com/r/ocaml/comments/2wop3h/ctypes_based_bindings_to_libuv/

    It's probably worth starting with uwt initially since the author is the person who maintains the OCaml on Windows port we're using and hopefully the Windows support is therefore first-class.

  2. added a commit that references this issue on May 5, 2017
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions