Skip to content
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

Close stdin used to send config to Interchange #3501

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

benclifford
Copy link
Collaborator

This was introduced in PR #3463 and at the time I incorrectly assumed that interchange exit would close both ends of the pipe. That is untrue.

For example: pytest parsl/tests/test_htex/ --config local ends with 341 fds open before this PR,
and 327 file descriptors open after this PR.

Changed Behaviour

nothing should be user visible, but less file descriptor usage

Type of change

  • Bug fix

This was introduced in PR #3463 and at the time I incorrectly assumed that
interchange exit would close both ends of the pipe. That is untrue.

For example: pytest parsl/tests/test_htex/ --config local
ends with 341 fds open before this PR,
and 327 file descriptors open after this PR.
Comment on lines 553 to 555
stdin.flush()
stdin.close()
logger.debug("Sent config object. Requesting worker ports")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggest adding some version of a UT for this. It's not an important detail, per se, but it's also a detail that I can see being easily forgotten/missed in a refactor. Especially from newer contributors.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

#3397 is a longer term plan to catch all leftover fds and threads

@benclifford benclifford merged commit 04a797b into master Jul 1, 2024
7 checks passed
@benclifford benclifford deleted the benc-interchange-close-stdin branch July 1, 2024 14:56
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.

2 participants