mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Automated rollback of commit a946cedc95
.
PiperOrigin-RevId: 555902433 Change-Id: I93efb401e64b90ba114911b87ed680456037d248
This commit is contained in:
parent
a946cedc95
commit
8b70461db4
|
@ -38,7 +38,6 @@
|
|||
#include "absl/log/log.h"
|
||||
#include "absl/status/status.h"
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/time/clock.h"
|
||||
#include "absl/time/time.h"
|
||||
#include "sandboxed_api/config.h"
|
||||
#include "sandboxed_api/sandbox2/client.h"
|
||||
|
@ -231,10 +230,6 @@ bool PtraceMonitor::KillSandboxee() {
|
|||
SetExitStatusCode(Result::INTERNAL_ERROR, Result::FAILED_KILL);
|
||||
return false;
|
||||
}
|
||||
constexpr absl::Duration kGracefullKillTimeout = absl::Milliseconds(500);
|
||||
if (hard_deadline_ == absl::InfiniteFuture()) {
|
||||
hard_deadline_ = absl::Now() + kGracefullKillTimeout;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -308,12 +303,6 @@ void PtraceMonitor::Run() {
|
|||
// All possible still running children of main process, will be killed due to
|
||||
// PTRACE_O_EXITKILL ptrace() flag.
|
||||
while (result().final_status() == Result::UNSET) {
|
||||
if (absl::Now() >= hard_deadline_) {
|
||||
LOG(WARNING) << "Hard deadline exceeded (timed_out=" << timed_out_
|
||||
<< ", external_kill=" << external_kill_
|
||||
<< ", network_violation=" << network_violation_ << ").";
|
||||
break;
|
||||
}
|
||||
int64_t deadline = deadline_millis_.load(std::memory_order_relaxed);
|
||||
if (deadline != 0 && absl::Now() >= absl::FromUnixMillis(deadline)) {
|
||||
VLOG(1) << "Sandbox process hit timeout due to the walltime timer";
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "absl/container/flat_hash_map.h"
|
||||
#include "absl/synchronization/mutex.h"
|
||||
#include "absl/synchronization/notification.h"
|
||||
#include "absl/time/time.h"
|
||||
#include "sandboxed_api/sandbox2/executor.h"
|
||||
#include "sandboxed_api/sandbox2/monitor_base.h"
|
||||
#include "sandboxed_api/sandbox2/notify.h"
|
||||
|
@ -155,8 +154,6 @@ class PtraceMonitor : public MonitorBase {
|
|||
// Syscalls that are running, whose result values we want to inspect.
|
||||
absl::flat_hash_map<pid_t, Syscall> syscalls_in_progress_;
|
||||
sigset_t sset_;
|
||||
// Deadline after which sandboxee get terminated via PTRACE_O_EXITKILL.
|
||||
absl::Time hard_deadline_ = absl::InfiniteFuture();
|
||||
|
||||
// Monitor thread object.
|
||||
std::unique_ptr<std::thread> thread_;
|
||||
|
|
Loading…
Reference in New Issue
Block a user