Skip to content

fix: file descriptor conflicts in terminal ws#8896

Merged
mscolnick merged 2 commits intomainfrom
ms/term-ws
Mar 27, 2026
Merged

fix: file descriptor conflicts in terminal ws#8896
mscolnick merged 2 commits intomainfrom
ms/term-ws

Conversation

@mscolnick
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 27, 2026 14:24
@mscolnick mscolnick requested a review from manzt as a code owner March 27, 2026 14:24
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Mar 27, 2026 4:24pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses PTY file-descriptor lifecycle conflicts in the terminal WebSocket endpoint by avoiding os.fdopen() wrappers that can implicitly close shared descriptors, and slightly delays Renovate updates.

Changes:

  • Replace os.fdopen(...)/file.write() with os.read() / os.write() for the shared PTY master fd in terminal WS read/write loops.
  • Update Renovate’s minimumReleaseAge from 3 days to 7 days.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
marimo/_server/api/endpoints/terminal.py Avoids double-close behavior by removing per-task fdopen() context managers around the shared PTY fd.
.github/renovate.json5 Increases Renovate minimum release age to reduce update churn.

@mscolnick mscolnick added the bug Something isn't working label Mar 27, 2026
select.select() has a FD_SETSIZE limitation where file descriptors must
be < 1024, causing ValueError on Python 3.14 CI when many FDs are open.
The selectors module uses epoll/kqueue and has no such limitation.
@mscolnick mscolnick merged commit 56a061d into main Mar 27, 2026
43 checks passed
@mscolnick mscolnick deleted the ms/term-ws branch March 27, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants