Skip to content

Commit

Permalink
Fix golang runtime detection for containers (parca-dev#2903)
Browse files Browse the repository at this point in the history
Co-authored-by: Tommy Reilly <[email protected]>
  • Loading branch information
umanwizard and gnurizen authored Jul 2, 2024
1 parent d45b125 commit 18aade2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/runtime/golang/golang.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ func RuntimeInfo(proc procfs.Proc, cim *runtime.CompilerInfoManager) (*Info, err
if err != nil {
return nil, err
}
path := filepath.Join(fmt.Sprintf("/proc/%d/root", proc.PID), exe)

f, err := elf.Open(exe)
f, err := elf.Open(path)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -171,7 +172,7 @@ func RuntimeInfo(proc procfs.Proc, cim *runtime.CompilerInfoManager) (*Info, err
return nil, err
}

compiler, err := cim.Fetch(exe)
compiler, err := cim.Fetch(path)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 18aade2

Please sign in to comment.