Commit 59d9551
authored
[AGENTRUN-1240] fix(loader): retry unix.Poll on EINTR instead of starting trace-agent (#49943)
## What does this PR do?
When `unix.Poll` is interrupted by a signal, it returns `EINTR` (interrupted system call). This is not a real error — the signal did not kill the process, so it's safe and correct to retry the poll.
Previously, any `EINTR` from `poll(2)` caused the loader to immediately exec the trace-agent, spiking its PSS even when no traces were arriving. This was the root cause of the quality gate PSS failure in incident-53566.
## Changes
- On `EINTR`, log a warning and retry the poll loop
- Promote the non-EINTR poll error from `Warn` to `Error` (it's an unexpected failure)
## Testing
Verified the binary builds cleanly. The fix is behaviorally equivalent to the `SA_RESTART` convention for signal-interrupted syscalls.
Co-authored-by: pierre.gimalac <pierre.gimalac@datadoghq.com>1 parent 48038ec commit 59d9551
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
140 | 145 | | |
141 | 146 | | |
142 | 147 | | |
| |||
0 commit comments