Skip to content

Commit

Permalink
processmanager: Fix process exit regression (#337) (#338)
Browse files Browse the repository at this point in the history
Co-authored-by: Florian Lehner <[email protected]>
  • Loading branch information
christos68k and florianl authored Feb 5, 2025
1 parent 48471c0 commit 815fa42
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions processmanager/processinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,15 +530,14 @@ func (pm *ProcessManager) processPIDExit(pid libpf.PID) {
log.Debugf("Skip process exit handling for unknown PID %d", pid)
return
}
if pm.interpreterTracerEnabled && len(pm.interpreters[pid]) > 0 {
// ProcessPIDExit may be called multiple times in short succession
// for the same PID, don't update exitKTime if we've previously recorded it.
if _, pidExitProcessed := pm.exitEvents[pid]; !pidExitProcessed {
pm.exitEvents[pid] = exitKTime
} else {
log.Debugf("Skip duplicate process exit handling for PID %d", pid)
return
}

// ProcessPIDExit may be called multiple times in short succession
// for the same PID, don't update exitKTime if we've previously recorded it.
if _, pidExitProcessed := pm.exitEvents[pid]; !pidExitProcessed {
pm.exitEvents[pid] = exitKTime
} else {
log.Debugf("Skip duplicate process exit handling for PID %d", pid)
return
}

// Delete all entries we have for this particular PID from pid_page_to_mapping_info.
Expand Down

0 comments on commit 815fa42

Please sign in to comment.