Skip to content

Commit b2bf6c2

Browse files
committed
Attach uprobes even if buildinfo cannot be read
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
1 parent 456d3c0 commit b2bf6c2

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

src/stirling/source_connectors/socket_tracer/uprobe_manager.cc

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -888,14 +888,19 @@ int UProbeManager::DeployGoUProbes(const absl::flat_hash_set<md::UPID>& pids) {
888888
}
889889

890890
auto build_info_s = ReadGoBuildInfo(elf_reader.get());
891-
if (!build_info_s.ok()) {
891+
obj_tools::BuildInfo build_info;
892+
std::string go_version;
893+
if (build_info_s.ok()) {
894+
auto& build_info_pair = build_info_s.ValueOrDie();
895+
go_version = build_info_pair.first;
896+
build_info = std::move(build_info_pair.second);
897+
} else {
892898
VLOG(1) << absl::Substitute(
893-
"Failed to read build info from binary $0. Cannot deploy uprobes. "
899+
"Failed to read build info from binary $0. Likely a Go binary built with an older "
900+
"version of Go without module support (pre 1.12)."
894901
"Message = $1",
895902
binary, build_info_s.status().msg());
896-
continue;
897903
}
898-
auto& [go_version, build_info] = build_info_s.ValueOrDie();
899904

900905
std::unique_ptr<DwarfReader> dwarf_reader = dwarf_reader_status.ConsumeValueOrDie();
901906
std::unique_ptr<GoOffsetLocator> offset_locator =

0 commit comments

Comments
 (0)