dhruve commented on a change in pull request #31945:
URL: https://github.com/apache/spark/pull/31945#discussion_r601864462



##########
File path: 
core/src/main/scala/org/apache/spark/executor/ProcfsMetricsGetter.scala
##########
@@ -210,11 +212,16 @@ private[spark] class ProcfsMetricsGetter(procfsDir: 
String = "/proc/") extends L
     val pids = computeProcessTree
     var allMetrics = ProcfsMetrics(0, 0, 0, 0, 0, 0)
     for (p <- pids) {

Review comment:
       We could avoid this race by figuring out the pid/child pids and 
immediately do a stat. Turning the pids or computeProcessTree in an iterator 
should help solve this issue.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to