Commit Graph

7 Commits

Author SHA1 Message Date
df92df4565 fix(agent): filter out GOTRACEBACK=none (#16924)
With the switch to Go 1.24.1, our dogfood workspaces started setting
`GOTRACEBACK=none` in the environment, resulting in missing stacktraces
for users.

This is due to the capability changes we do when
`USE_CAP_NET_ADMIN=true`.

564b387262/provisionersdk/scripts/bootstrap_linux.sh (L60-L76)

This most likely triggers a change in securitybits which sets
`_AT_SECURE` for the process.

a1ddbdd3ef/src/runtime/os_linux.go (L297-L327)

Which in turn triggers secure mode:

a1ddbdd3ef/src/runtime/security_unix.go

This should not affect workspaces as template authors can still set the
environment on the agent resource.

See https://pkg.go.dev/runtime#hdr-Security
2025-03-17 11:10:14 +02:00
354d0fc4c8 fix: filter agent-exec env vars (#15764)
- Filters env vars specific to agent-exec from the exec'd process. This
is to prevent any issues when developing Coder in Coder, particularly
agent tests in the cli pkg.
2024-12-05 16:33:27 +00:00
f8d938d299 fix: fix oom_score adjustments failing if caps set (#15758)
- Fixes an issue where oom scores would fail to be adjusted in cases
where the `coder` binary has capabilities set on it. This is because
`PR_SET_DUMPABLE` is set to `0` when a process is executed with elevated
capabilities. The fix is to flip `PR_SET_DUMPABLE` to `1` prior to
writing to `oom_score_adj`.
2024-12-05 15:30:58 +02:00
ce573b9faa fix: add agent exec abstraction (#15717) 2024-12-04 23:30:25 +02:00
24d44b4518 fix: add additional context to agent exec errors (#15676) 2024-11-27 21:29:08 +02:00
1f238fed59 feat: integrate new agentexec pkg (#15609)
- Integrates the `agentexec` pkg into the agent and removes the
legacy system of iterating over the process tree. It adds some linting
rules to hopefully catch future improper uses of `exec.Command` in the package.
2024-11-27 20:12:15 +02:00
bbc549d2df feat: add agent exec pkg (#15577) 2024-11-25 17:22:12 +02:00