Skip to content

run cleanupRelay only once in TerminalIO and StandardIO #153

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

elijah-wright
Copy link

possibly fixes #124

@elijah-wright
Copy link
Author

@adityaramani I think the formatting issues have been fixed

@adityaramani
Copy link
Contributor

Im gonna pull in the changes locally and test it out as well

@elijah-wright
Copy link
Author

thank you, I've been depending on the workflow tests and it's not fair to you that they're not passing

@adityaramani
Copy link
Contributor

No worries at all!

@adityaramani
Copy link
Contributor

Tried running the tests in a loop and it failed with this, and there werent any other logs from the guest

2025-06-18T14:50:23-0700 error com.apple.containerization : [containerization_integration] ❌ test multiple concurrent processes with output stress failed: internalError: "failed to start process" (cause: "internal error (13): startProcess: failed to start process: Error Domain=NSCocoaErrorDomain Code=256 "(null)"UserInfo={NSUnderlyingError=Error Domain=NSPOSIXErrorDomain Code=9 "Bad file descriptor"}")

I'll try combining your change with what I was testing out with the writeFd being deinited

@elijah-wright
Copy link
Author

dang, I really thought that was going to solve it. I'm going to look at this again when I get home, I got caught in a literal sandpit 💀

@adityaramani
Copy link
Contributor

Thanks! I think your changes look good - and I tested it after adding in a couple of other fixes (see here https://github.com/adityaramani/containerization/tree/vminitd-crash)

Although I do think there maybe some other issues in the process handling flow, this change makes it more stable.

Will wait for the others to review

@elijah-wright
Copy link
Author

@adityaramani do you want me to cherry pick your commit? it's only partially signed so I don't know

@adityaramani
Copy link
Contributor

adityaramani commented Jun 21, 2025

Yeah go for it. Take that commit in. If the signature are a problem just apply the diff

@elijah-wright
Copy link
Author

ok done, but it says unverified

@adityaramani
Copy link
Contributor

Yeah. Maybe try removing me as author?

Signed-off-by: Aditya Ramani <a_ramani@apple.com>
@elijah-wright
Copy link
Author

@adityaramani if I could ask, what are the specs of the machine you're testing on?

@adityaramani
Copy link
Contributor

It's an M2 Pro with 64 gb of ram. Are you asking cause you don't see the issue on your end?

I need to run the test on a loop and see it failing once in like 15 times

@elijah-wright
Copy link
Author

I was just wondering, I think it has to be a race condition then. increasing system load (stress-ng) might make it more predictable for testing if that's true

for proc in processes {
let pid = proc.pid
self.log?.debug("checking for exit of managed process", metadata: ["pid": "\(pid)", "exits": "\(exited)"])
self.log?.debug("checking for exit of managed process", metadata: ["exits": "\(exited)", "processes": "\(processes.count)"])
Copy link
Member

Choose a reason for hiding this comment

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

Great catch 😆

Copy link
Member

@dcantah dcantah left a comment

Choose a reason for hiding this comment

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

This looks good to me (and sorry for delay), but I'll wait for either @adityaramani or @crosbymichael to give it a second thumbs up.

@adityaramani
Copy link
Contributor

LGTM! I think Michael should take a look as well

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.

[Bug]: The CI has a high failure rate
4 participants