Skip to content

Commit

Permalink
Move log warning about non-namespaced stacktraces
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 553472372
Change-Id: Iba43cba78edd1826afb29f49a7e08e919554ed80
  • Loading branch information
happyCoder92 authored and copybara-github committed Aug 3, 2023
1 parent 3f9e9a2 commit 4d625e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 0 additions & 5 deletions sandboxed_api/sandbox2/policybuilder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1213,11 +1213,6 @@ absl::StatusOr<std::unique_ptr<Policy>> PolicyBuilder::TryBuild() {
output->SetNamespace(std::make_unique<Namespace>(
allow_unrestricted_networking_, std::move(mounts_), hostname_,
allow_mount_propagation_));
} else {
// Not explicitly disabling them here as this is a technical limitation in
// our stack trace collection functionality.
LOG(WARNING) << "Using policy without namespaces, disabling stack traces on"
<< " crash";
}

output->collect_stacktrace_on_signal_ = collect_stacktrace_on_signal_;
Expand Down
6 changes: 6 additions & 0 deletions sandboxed_api/sandbox2/sandbox2.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include <utility>

#include "absl/base/macros.h"
#include "absl/log/check.h"
#include "absl/log/log.h"
#include "absl/status/statusor.h"
#include "sandboxed_api/sandbox2/comms.h"
#include "sandboxed_api/sandbox2/executor.h"
Expand All @@ -46,6 +48,10 @@ class Sandbox2 final {
notify_(std::move(notify)) {
CHECK(executor_ != nullptr);
CHECK(policy_ != nullptr);
// This is a technical limitation in our stack trace collection
// functionality.
LOG(WARNING) << "Using policy without namespaces, disabling stack traces on"
<< " crash";
}

Sandbox2(const Sandbox2&) = delete;
Expand Down

0 comments on commit 4d625e5

Please sign in to comment.