The process GetSelf
method can produce incorrect results when used with an alternate hostfs
#147
Labels
GetSelf
method can produce incorrect results when used with an alternate hostfs
#147
Right now,
process.GetSelf()
fetches the pid of the process withos.Getpid()
and then uses the alternate hostfs to fetch the metrics from/proc/GETPID/
There's a problem with this, which you can demonstrate with a small test:This returns:
The namespacing is actually smart enough to handle something like
/hostfs/proc/self/
, but if you doos.Getpid()
and then pass that to/hostfs/proc
, you'll get an invalid result.On linux, when we're using hostfs,
GetSelf()
should use/hostfs/proc/self
instead.The text was updated successfully, but these errors were encountered: