Skip to content

Commit 1d16925

Browse files
Sandboxed API Teamcopybara-github
authored andcommitted
Remove the fd limit in the unwind sandbox
Some users are running sandboxes concurrently, and it is possible that we are at some point launching unwind sandboxes concurrently as well. If that happens, we could theoretically reach the kernel limit of fds in flight in sockets. PiperOrigin-RevId: 895895003 Change-Id: Icca7183ae37d0268d5c5a7f374855c1ee6298690
1 parent 4949a3a commit 1d16925

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

sandboxed_api/sandbox2/stack_trace.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ absl::StatusOr<std::vector<std::string>> StackTracePeer::LaunchLibunwindSandbox(
190190
auto executor = absl::WrapUnique(new Executor(pid, recursion_depth));
191191

192192
executor->limits()->set_rlimit_cpu(10).set_walltime_limit(absl::Seconds(5));
193+
// See b/492118811.
194+
// When running sandboxes concurrently, we might get a problem with sending
195+
// the unotify file descriptor in the unwind sandbox, as we might exceed the
196+
// maximum number of file descriptors.
197+
executor->limits()->set_rlimit_nofile(RLIM64_INFINITY);
193198

194199
// Get path to the binary.
195200
// app_path contains the path like it is also in /proc/pid/maps. It is

0 commit comments

Comments
 (0)