Skip to content

Introduced RemoteRuntime wrapper in the agent #3227

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

Merged
merged 13 commits into from
Apr 2, 2025

Conversation

Razz4780
Copy link
Contributor

@Razz4780 Razz4780 commented Apr 1, 2025

Instead of spawning a new OS thread for each background task that needs access to the target's network, spawn just one, at agent startup. The thread runs a tokio runtime and spawns Futures from fetched from an mpsc channel.

Also, don't spawn extra threads when we don't need to join the target's network namespace:

  1. Targetless (nothing to join)
  2. Ephemeral (already in the same network namespace)

@Razz4780 Razz4780 requested a review from meowjesty April 2, 2025 12:52
Copy link
Member

@meowjesty meowjesty left a comment

Choose a reason for hiding this comment

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

Small stuff. Only 1 I'm worried about is the missing pid from ephemeral, have you moved it to somewhere else?

Copy link
Member

@meowjesty meowjesty left a comment

Choose a reason for hiding this comment

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

👍

@Razz4780 Razz4780 enabled auto-merge April 2, 2025 21:11
@Razz4780 Razz4780 added this pull request to the merge queue Apr 2, 2025
Merged via the queue into metalbear-co:main with commit fcd9025 Apr 2, 2025
17 checks passed
@Razz4780 Razz4780 deleted the remote-runtime branch April 2, 2025 21:48
aviramha added a commit to aviramha/mirrord that referenced this pull request Apr 17, 2025
github-merge-queue bot pushed a commit that referenced this pull request Apr 17, 2025
* Revert "Introduced `RemoteRuntime` wrapper in the agent (#3227)"

This reverts commit fcd9025.

* Rollback RemoteRuntime change fixing OOMKilled

* ..ops

* ..

* update lock
Razz4780 added a commit to Razz4780/mirrord that referenced this pull request Apr 17, 2025
github-merge-queue bot pushed a commit that referenced this pull request Apr 17, 2025
* ...

* Reapply "Introduced `RemoteRuntime` wrapper in the agent (#3227)" (#3261)

This reverts commit 8798707.

* Fixed passthrough address

* Rollback multithread

* Changelog
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