Skip to content

Report use of closed FDs better#255

Merged
talex5 merged 1 commit intoocaml-multicore:mainfrom
talex5:closed-fd
Jul 18, 2022
Merged

Report use of closed FDs better#255
talex5 merged 1 commit intoocaml-multicore:mainfrom
talex5:closed-fd

Conversation

@talex5
Copy link
Copy Markdown
Collaborator

@talex5 talex5 commented Jul 18, 2022

Previously, attempting to use a closed FD would raise an exception in the scheduler context, causing the whole event loop to exit. Now it's just reported back to the caller as an error. This means you get a stack trace, a chance to clean up or recover, and you get to see some output from MDX.

Previously, attempting to use a closed FD would raise an exception in
the scheduler context, causing the whole event loop to exit. Now it's
just reported back to the caller as an error. This means you get a stack
trace, a chance to clean up or recover, and you get to see some output
from MDX.
@talex5 talex5 merged commit c180013 into ocaml-multicore:main Jul 18, 2022
@talex5 talex5 deleted the closed-fd branch July 18, 2022 13:27
talex5 added a commit to talex5/opam-repository that referenced this pull request Aug 4, 2022
CHANGES:

Note: Eio 0.4 drops compatibility with OCaml 4.12+domains. Use OCaml 5.0.0~alpha1 instead.

API changes:

- `Eio.Dir` has gone. Use `Eio.Path` instead (@talex5 ocaml-multicore/eio#266 ocaml-multicore/eio#270).

- `Eio_unix.FD.{take,peek}` were renamed to `take_opt`/`peek_opt` to make way for non-optional versions.

New features:

- Fiber-local storage (@SquidDev ocaml-multicore/eio#256).
  Attach key/value bindings to fibers. These are inherited across forks.

- `Eio.Path.{unlink,rmdir,rename}` (@talex5 ocaml-multicore/eio#264 ocaml-multicore/eio#265).

- `Eio_main.run` can now return a value (@talex5 ocaml-multicore/eio#263).
  This is useful for e.g. cmdliner.

- `Eio_unix.socketpair` (@talex5 ocaml-multicore/eio#260).

- `Fiber.fork_daemon` (@talex5 ocaml-multicore/eio#252).
  Create a helper fiber that does not prevent the switch from exiting.

- Add `Fiber.{iter,map,filter,fiter_map}` (@talex5 ocaml-multicore/eio#248 ocaml-multicore/eio#250).
  These are concurrent versions of the corresponding operations in `List`.

Bug fixes:

- Fix scheduling fairness in luv backend (@talex5 ocaml-multicore/eio#269).

- Implement remaining shutdown commands for luv (@talex5 ocaml-multicore/eio#268).

- Fix IPv6 support with uring backend (@haesbaert ocaml-multicore/eio#261 ocaml-multicore/eio#262).

- Use `Eio.Net.Connection_reset` exception in more places (@talex5 ocaml-multicore/eio#257).

- Report use of closed FDs better (@talex5 ocaml-multicore/eio#255).
  Using a closed FD could previously cause the whole event loop to exit.

- Some fixes for cancellation (@talex5 ocaml-multicore/eio#254).

- Ensure `Buf_write` still flushes if an exception is raised (@talex5 ocaml-multicore/eio#246).

- Do not allow close on `accept_fork` socket (@talex5 ocaml-multicore/eio#245).

Documentation:

- Document integrations with Unix, Lwt and Async (@talex5 ocaml-multicore/eio#247).

- Add a Dockerfile for easy testing (@talex5 ocaml-multicore/eio#224).
talex5 added a commit to talex5/opam-repository that referenced this pull request Aug 4, 2022
CHANGES:

Note: Eio 0.4 drops compatibility with OCaml 4.12+domains. Use OCaml 5.0.0~alpha1 instead.

API changes:

- `Eio.Dir` has gone. Use `Eio.Path` instead (@talex5 ocaml-multicore/eio#266 ocaml-multicore/eio#270).

- `Eio_unix.FD.{take,peek}` were renamed to `take_opt`/`peek_opt` to make way for non-optional versions.

New features:

- Fiber-local storage (@SquidDev ocaml-multicore/eio#256).
  Attach key/value bindings to fibers. These are inherited across forks.

- `Eio.Path.{unlink,rmdir,rename}` (@talex5 ocaml-multicore/eio#264 ocaml-multicore/eio#265).

- `Eio_main.run` can now return a value (@talex5 ocaml-multicore/eio#263).
  This is useful for e.g. cmdliner.

- `Eio_unix.socketpair` (@talex5 ocaml-multicore/eio#260).

- `Fiber.fork_daemon` (@talex5 ocaml-multicore/eio#252).
  Create a helper fiber that does not prevent the switch from exiting.

- Add `Fiber.{iter,map,filter,fiter_map}` (@talex5 ocaml-multicore/eio#248 ocaml-multicore/eio#250).
  These are concurrent versions of the corresponding operations in `List`.

Bug fixes:

- Fix scheduling fairness in luv backend (@talex5 ocaml-multicore/eio#269).

- Implement remaining shutdown commands for luv (@talex5 ocaml-multicore/eio#268).

- Fix IPv6 support with uring backend (@haesbaert ocaml-multicore/eio#261 ocaml-multicore/eio#262).

- Use `Eio.Net.Connection_reset` exception in more places (@talex5 ocaml-multicore/eio#257).

- Report use of closed FDs better (@talex5 ocaml-multicore/eio#255).
  Using a closed FD could previously cause the whole event loop to exit.

- Some fixes for cancellation (@talex5 ocaml-multicore/eio#254).

- Ensure `Buf_write` still flushes if an exception is raised (@talex5 ocaml-multicore/eio#246).

- Do not allow close on `accept_fork` socket (@talex5 ocaml-multicore/eio#245).

Documentation:

- Document integrations with Unix, Lwt and Async (@talex5 ocaml-multicore/eio#247).

- Add a Dockerfile for easy testing (@talex5 ocaml-multicore/eio#224).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant