Track broker-backed eventfd lifecycle and blocking semantics

Open
#966 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust

Research direction

Start by reading PR #965 and the broker-backed eventfd introduction in PR #880, then trace EventCounter's broker ObjectHandle lifecycle and read/write blocking paths. Done means broker references are released when eventfd descriptions close and blocking behavior is explicitly made safe or restricted until broker failure notifications can wake waiters.

Written by the indexing model from the issue text.

Description

Follow-up from the broker message-layer cleanup work in PR #965. These issues appear to predate that PR (broker-backed eventfds were introduced in PR #880), so they should be handled in a focused lifecycle/blocking-semantics follow-up.

Issues to address

  1. Broker object lifecycle for broker-backed eventfds

    • EventCounter stores a broker ObjectHandle, but there is no close/drop path that releases the broker object reference when the eventfd file description is closed.
    • Broker references are currently released when the whole broker session drops, so repeated eventfd create/close loops can exhaust broker reference limits for the lifetime of a broker connection.
  2. Blocking vs nonblocking behavior for broker-backed eventfds

    • Broker-backed eventfds are created for nonblocking eventfds, but the file status can later be changed to blocking.
    • Blocking EventCounter::read/write waits on a local Pollee, but broker readiness/error notifications are not wired to wake waiters if the broker/control channel fails while a waiter is parked.

Possible directions

  • Add an explicit broker object close lifecycle, likely a generic close-object operation routed through protocol/local/host/core and used by EventCounter/eventfd teardown.
  • Define broker-backed eventfd blocking semantics. Until broker readiness/error notifications exist, either keep broker-backed eventfds effectively nonblocking-only or add the notification path needed to make blocking waits safe.
Dominant language
Rust
Stars
2.7k
Forks
144
Avg merge
12h 21m
Merged PRs (30d)
146

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/litebox

All issues in microsoft/litebox

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.