Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix broken pipe during test and gracefully exit the server #4701

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
soulomoon wants to merge 50 commits into master
base: master
Choose a base branch
Loading
from 1875-tests-randomly-fail-with-exception-fd111-hputbuf-resource-vanished-broken-pipe---test-option-j1-workaround

Conversation

Copy link
Collaborator

@soulomoon soulomoon commented Aug 21, 2025

gracefully exit the server

fendor reacted with heart emoji
gracefully exit the server
@soulomoon soulomoon changed the title (削除) Fix broken pip during test (削除ここまで) (追記) Fix broken pipe during test (追記ここまで) Aug 22, 2025
soulomoon added 12 commits August 22, 2025 08:35
...111-hputbuf-resource-vanished-broken-pipe---test-option-j1-workaround
Copy link
Collaborator Author

Key idea:

  1. Wait for the refactor loop to finish in shutdown handler.
  2. After sending the shutdown response, stop sending further response to client. (This is done in lsp)

The worker thread checks this flag before dequeuing each job; if set, it exits immediately,
ensuring that no new work is started after shutdown is requested.
This mechanism is necessary because some downstream code may swallow async exceptions,
making 'cancel' unreliable for stopping the thread in all cases.
If 'cancel' does interrupt the thread (e.g., while blocked in STM or in a cooperative job),
the thread exits immediately and never checks the TMVar; in such cases, the stop flag is redundant.
@soulomoon soulomoon changed the title (削除) Fix broken pipe during test (削除ここまで) (追記) Fix broken pipe during test and gracefully exit the server (追記ここまで) Aug 26, 2025
soulomoon added 25 commits August 26, 2025 21:59
- Update flakiness workflow to build additional test suite.
- Refactor test workflow to simplify test commands.
- Introduce TestReporting style for progress reporting in IDE options.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@michaelpj michaelpj Awaiting requested review from michaelpj michaelpj will be requested when the pull request is marked ready for review michaelpj is a code owner

@fendor fendor Awaiting requested review from fendor fendor will be requested when the pull request is marked ready for review fendor is a code owner

@wz1000 wz1000 Awaiting requested review from wz1000 wz1000 will be requested when the pull request is marked ready for review wz1000 is a code owner

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Tests randomly fail with "Exception: fd:111: hPutBuf: resource vanished (Broken pipe)" (--test-option=-j1 workaround)
1 participant

AltStyle によって変換されたページ (->オリジナル) /