fix(apiserver): carry exec_user on job submit so jobs don't run as nobody (bug-1500)
modelJobToSubmit built the C job_startinfo_t without setting execuser, so the controller forwarded a NULL execuser in the startjob request and the worker ran every job as "nobody". Now the submit carries the resolved exec user: an explicit exec_user wins, otherwise the job runs as the submitting user. - add resolveExecUser() (plain-Go, unit-testable) + TestResolveExecUser - set si.execuser in modelJobToSubmit, free it in freeJobSubmit Note: deploying this exposed an ASAN heap-use-after-free in the apiserver's submit/notification path (strncpy reading freed memory); the fix is committed but needs the memory-lifecycle investigation before it can ship safely. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
ee7dee0ed4
commit
5b47ee603f
8 changed files with 1138 additions and 379 deletions
|
|
@ -1,386 +1,84 @@
|
|||
{
|
||||
"session_id": "session-2026-07-30-0409",
|
||||
"started": "2026-07-30T11:09:15.945Z",
|
||||
"session_id": "session-2026-08-03-0843",
|
||||
"started": "2026-08-03T08:43:53.877Z",
|
||||
"files_read": {
|
||||
"/home/rshen/projects/xce/worktrees/config/.kiro/specs/admin-config-tool/tasks.md": {
|
||||
"/home/lchen/code/xce/.mcp.json": {
|
||||
"count": 1,
|
||||
"tokens": 9072,
|
||||
"first_read": "2026-07-30T12:19:14.341Z"
|
||||
"tokens": 7,
|
||||
"first_read": "2026-08-03T08:44:41.511Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/xceadmin/tests/test_e2e_live_push.py": {
|
||||
"count": 7,
|
||||
"tokens": 2779,
|
||||
"first_read": "2026-07-30T12:19:14.613Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/tools/deploy-ha.sh": {
|
||||
"count": 3,
|
||||
"tokens": 1054,
|
||||
"first_read": "2026-07-30T12:19:29.564Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/xceadmin/src/xcecommon/discovery.py": {
|
||||
"/home/lchen/code/xce/src/configs/hosts.yaml": {
|
||||
"count": 1,
|
||||
"tokens": 0,
|
||||
"first_read": "2026-07-30T12:19:29.992Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/xceadmin/src/xceadmin/discovery.py": {
|
||||
"count": 1,
|
||||
"tokens": 1775,
|
||||
"first_read": "2026-07-30T13:02:08.621Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/xceadmin/src/xceadmin/push.py": {
|
||||
"count": 1,
|
||||
"tokens": 1818,
|
||||
"first_read": "2026-07-30T13:02:15.180Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/xceadmin/tests/conftest.py": {
|
||||
"count": 2,
|
||||
"tokens": 699,
|
||||
"first_read": "2026-07-30T13:06:35.262Z"
|
||||
},
|
||||
"/tmp/claude-1000/-home-rshen-projects-xce-worktrees-config/c8633ffb-8da0-40a7-9811-48f1830c37b4/tasks/b732ki2y3.output": {
|
||||
"count": 1,
|
||||
"tokens": 0,
|
||||
"first_read": "2026-07-30T13:21:55.900Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/include/xce/errnox.h": {
|
||||
"count": 2,
|
||||
"tokens": 0,
|
||||
"first_read": "2026-07-30T13:30:09.495Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/xceadmin/tests/test_e2e_live_ha_push.py": {
|
||||
"count": 8,
|
||||
"tokens": 7600,
|
||||
"first_read": "2026-07-30T13:31:16.766Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/controller/ha.c": {
|
||||
"count": 2,
|
||||
"tokens": 124295,
|
||||
"first_read": "2026-07-30T13:42:42.468Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/controller/cluster.c": {
|
||||
"count": 2,
|
||||
"tokens": 20931,
|
||||
"first_read": "2026-07-30T13:43:09.865Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/xceadmin/tests/_live_e2e_common.py": {
|
||||
"count": 3,
|
||||
"tokens": 1206,
|
||||
"first_read": "2026-07-30T13:43:53.361Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/tools/test-heartbeat-tolerance.sh": {
|
||||
"count": 1,
|
||||
"tokens": 2367,
|
||||
"first_read": "2026-07-30T13:56:04.113Z"
|
||||
},
|
||||
"/tmp/claude-1000/-home-rshen-projects-xce-worktrees-config/c8633ffb-8da0-40a7-9811-48f1830c37b4/tasks/bnpittld0.output": {
|
||||
"count": 1,
|
||||
"tokens": 0,
|
||||
"first_read": "2026-07-30T14:06:34.840Z"
|
||||
},
|
||||
"/tmp/claude-1000/-home-rshen-projects-xce-worktrees-config/c8633ffb-8da0-40a7-9811-48f1830c37b4/tasks/byx7ipj7f.output": {
|
||||
"count": 6,
|
||||
"tokens": 0,
|
||||
"first_read": "2026-07-30T14:17:02.982Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/.claude/skills/kiro-impl/templates/debugger-prompt.md": {
|
||||
"count": 1,
|
||||
"tokens": 812,
|
||||
"first_read": "2026-07-30T14:33:14.242Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/xceadmin/pyproject.toml": {
|
||||
"count": 1,
|
||||
"tokens": 362,
|
||||
"first_read": "2026-07-30T14:35:12.474Z"
|
||||
},
|
||||
"/home/claude/.claude/projects/-home-rshen-projects-xce-worktrees-config/d6d1f70d-af0b-465b-9cd6-e719e38692ce/tool-results/b9vaeqw0k.txt": {
|
||||
"count": 1,
|
||||
"tokens": 0,
|
||||
"first_read": "2026-07-31T03:34:12.233Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/lib/client.c": {
|
||||
"count": 1,
|
||||
"tokens": 7163,
|
||||
"first_read": "2026-07-31T03:50:38.584Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/lib/client_internal.h": {
|
||||
"count": 1,
|
||||
"tokens": 4475,
|
||||
"first_read": "2026-07-31T03:50:49.994Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/lib/client_failover.c": {
|
||||
"count": 1,
|
||||
"tokens": 0,
|
||||
"first_read": "2026-07-31T04:02:26.918Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/.claude/skills/xce-test-ha/run-ha-soak.sh": {
|
||||
"count": 5,
|
||||
"tokens": 41010,
|
||||
"first_read": "2026-07-31T04:50:52.430Z"
|
||||
},
|
||||
"/home/claude/tmp/xce-ha-chaos30-run1.log": {
|
||||
"count": 1,
|
||||
"tokens": 0,
|
||||
"first_read": "2026-07-31T04:51:29.049Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/lib/utils.c": {
|
||||
"count": 1,
|
||||
"tokens": 0,
|
||||
"first_read": "2026-07-31T04:57:05.222Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/controller/job.c": {
|
||||
"count": 1,
|
||||
"tokens": 24947,
|
||||
"first_read": "2026-07-31T04:57:56.735Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/docs/deployment.md": {
|
||||
"count": 2,
|
||||
"tokens": 4816,
|
||||
"first_read": "2026-07-31T08:39:59.108Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/controller/testsuite/waldump.c": {
|
||||
"count": 1,
|
||||
"tokens": 5516,
|
||||
"first_read": "2026-07-31T08:54:13.432Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/controller/testsuite/test_waldump.c": {
|
||||
"count": 1,
|
||||
"tokens": 0,
|
||||
"first_read": "2026-07-31T08:57:57.611Z"
|
||||
},
|
||||
"/home/rshen/projects/xce/worktrees/config/src/controller/persist.c": {
|
||||
"count": 1,
|
||||
"tokens": 85714,
|
||||
"first_read": "2026-07-31T09:25:16.220Z"
|
||||
"tokens": 248,
|
||||
"first_read": "2026-08-03T08:44:41.714Z"
|
||||
}
|
||||
},
|
||||
"files_written": [
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/xceadmin/tests/_live_e2e_common.py",
|
||||
"file": "/tmp/frpcdbg_mon.sh",
|
||||
"action": "create",
|
||||
"tokens": 1206,
|
||||
"at": "2026-07-30T13:08:37.963Z"
|
||||
"tokens": 268,
|
||||
"at": "2026-08-04T01:37:20.418Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/xceadmin/tests/test_e2e_live_push.py",
|
||||
"action": "edit",
|
||||
"tokens": 150,
|
||||
"at": "2026-07-30T13:08:53.196Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/xceadmin/tests/test_e2e_live_push.py",
|
||||
"action": "edit",
|
||||
"tokens": 154,
|
||||
"at": "2026-07-30T13:09:23.515Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/xceadmin/tests/test_e2e_live_ha_push.py",
|
||||
"file": "/tmp/frpc_prod.toml",
|
||||
"action": "create",
|
||||
"tokens": 4314,
|
||||
"at": "2026-07-30T13:13:28.961Z"
|
||||
"tokens": 100,
|
||||
"at": "2026-08-04T02:10:17.877Z"
|
||||
},
|
||||
{
|
||||
"file": "/tmp/claude-1000/-home-rshen-projects-xce-worktrees-config/d6d1f70d-af0b-465b-9cd6-e719e38692ce/scratchpad/manual_ha_deploy.sh",
|
||||
"file": "/tmp/frpc_mon.sh",
|
||||
"action": "create",
|
||||
"tokens": 408,
|
||||
"at": "2026-07-30T13:20:31.874Z"
|
||||
"tokens": 291,
|
||||
"at": "2026-08-04T02:10:21.788Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/xceadmin/tests/test_e2e_live_ha_push.py",
|
||||
"action": "edit",
|
||||
"tokens": 1089,
|
||||
"at": "2026-07-30T13:31:47.698Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/xceadmin/tests/test_e2e_live_ha_push.py",
|
||||
"action": "edit",
|
||||
"tokens": 288,
|
||||
"at": "2026-07-30T13:32:02.450Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/xceadmin/tests/test_e2e_live_ha_push.py",
|
||||
"action": "edit",
|
||||
"tokens": 1084,
|
||||
"at": "2026-07-30T13:32:32.689Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/xceadmin/tests/test_e2e_live_ha_push.py",
|
||||
"action": "edit",
|
||||
"tokens": 865,
|
||||
"at": "2026-07-30T13:59:11.573Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/xceadmin/tests/test_e2e_live_ha_push.py",
|
||||
"action": "edit",
|
||||
"tokens": 131,
|
||||
"at": "2026-07-30T13:59:23.445Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/xceadmin/tests/test_e2e_live_ha_push.py",
|
||||
"action": "edit",
|
||||
"tokens": 424,
|
||||
"at": "2026-07-30T13:59:37.846Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/xceadmin/tests/test_e2e_live_ha_push.py",
|
||||
"action": "edit",
|
||||
"tokens": 255,
|
||||
"at": "2026-07-30T13:59:50.809Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/xceadmin/tests/test_e2e_live_ha_push.py",
|
||||
"action": "edit",
|
||||
"tokens": 110,
|
||||
"at": "2026-07-30T14:10:20.969Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/xceadmin/tests/test_e2e_live_ha_push.py",
|
||||
"action": "edit",
|
||||
"tokens": 29,
|
||||
"at": "2026-07-30T14:10:30.683Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/xceadmin/tests/test_e2e_live_ha_push.py",
|
||||
"action": "edit",
|
||||
"tokens": 91,
|
||||
"at": "2026-07-30T14:27:48.483Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/xceadmin/tests/test_e2e_live_ha_push.py",
|
||||
"action": "edit",
|
||||
"tokens": 26,
|
||||
"at": "2026-07-30T14:27:57.885Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/xceadmin/tests/test_repro_bug1485.py",
|
||||
"file": "/tmp/frpc_prod.toml",
|
||||
"action": "create",
|
||||
"tokens": 1910,
|
||||
"at": "2026-07-30T14:38:48.005Z"
|
||||
"tokens": 101,
|
||||
"at": "2026-08-04T02:10:59.756Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/.kiro/specs/admin-config-tool/tasks.md",
|
||||
"action": "edit",
|
||||
"tokens": 404,
|
||||
"at": "2026-07-30T14:57:07.885Z"
|
||||
"file": "/tmp/frpc_mon.sh",
|
||||
"action": "create",
|
||||
"tokens": 292,
|
||||
"at": "2026-08-04T02:11:01.550Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/.claude/skills/xce-test-ha/run-ha-soak.sh",
|
||||
"file": "/tmp/frpc_mon.sh",
|
||||
"action": "edit",
|
||||
"tokens": 136,
|
||||
"at": "2026-07-31T04:10:31.220Z"
|
||||
"tokens": 5,
|
||||
"at": "2026-08-04T02:11:33.854Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/.claude/skills/xce-test-ha/run-ha-soak.sh",
|
||||
"file": "/tmp/frpc_mon.sh",
|
||||
"action": "edit",
|
||||
"tokens": 1266,
|
||||
"at": "2026-07-31T05:03:59.690Z"
|
||||
"tokens": 22,
|
||||
"at": "2026-08-04T02:16:46.011Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/.claude/skills/xce-test-ha/run-ha-soak.sh",
|
||||
"action": "edit",
|
||||
"tokens": 68,
|
||||
"at": "2026-07-31T05:06:39.208Z"
|
||||
"file": "/tmp/frpc_watchdog.sh",
|
||||
"action": "create",
|
||||
"tokens": 523,
|
||||
"at": "2026-08-04T02:52:22.852Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/docs/deployment.md",
|
||||
"action": "edit",
|
||||
"tokens": 353,
|
||||
"at": "2026-07-31T08:40:15.401Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/docs/deployment.md",
|
||||
"action": "edit",
|
||||
"tokens": 209,
|
||||
"at": "2026-07-31T08:48:31.523Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/controller/testsuite/waldump.h",
|
||||
"action": "edit",
|
||||
"tokens": 224,
|
||||
"at": "2026-07-31T08:58:40.147Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/controller/testsuite/waldump.c",
|
||||
"action": "edit",
|
||||
"tokens": 53,
|
||||
"at": "2026-07-31T08:58:51.647Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/controller/testsuite/waldump.c",
|
||||
"action": "edit",
|
||||
"tokens": 717,
|
||||
"at": "2026-07-31T08:59:15.171Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/controller/testsuite/waldump.c",
|
||||
"action": "edit",
|
||||
"tokens": 109,
|
||||
"at": "2026-07-31T08:59:29.637Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/controller/testsuite/waldump.c",
|
||||
"action": "edit",
|
||||
"tokens": 198,
|
||||
"at": "2026-07-31T08:59:42.696Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/controller/testsuite/waldump.c",
|
||||
"action": "edit",
|
||||
"tokens": 248,
|
||||
"at": "2026-07-31T08:59:55.620Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/controller/testsuite/waldump.c",
|
||||
"action": "edit",
|
||||
"tokens": 45,
|
||||
"at": "2026-07-31T09:00:12.945Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/controller/testsuite/waldump.c",
|
||||
"action": "edit",
|
||||
"tokens": 52,
|
||||
"at": "2026-07-31T09:00:25.189Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/controller/testsuite/waldump.c",
|
||||
"action": "edit",
|
||||
"tokens": 102,
|
||||
"at": "2026-07-31T09:00:37.310Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/controller/testsuite/test_waldump.c",
|
||||
"action": "edit",
|
||||
"tokens": 41,
|
||||
"at": "2026-07-31T09:00:48.309Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/controller/testsuite/test_waldump.c",
|
||||
"action": "edit",
|
||||
"tokens": 1422,
|
||||
"at": "2026-07-31T09:01:22.297Z"
|
||||
},
|
||||
{
|
||||
"file": "/home/rshen/projects/xce/worktrees/config/src/controller/testsuite/test_waldump.c",
|
||||
"action": "edit",
|
||||
"tokens": 80,
|
||||
"at": "2026-07-31T09:01:40.552Z"
|
||||
"file": "/tmp/frpc-watchdog.sh",
|
||||
"action": "create",
|
||||
"tokens": 362,
|
||||
"at": "2026-08-04T05:49:57.595Z"
|
||||
}
|
||||
],
|
||||
"edit_counts": {
|
||||
"src/xceadmin/tests/_live_e2e_common.py": 1,
|
||||
"src/xceadmin/tests/test_e2e_live_push.py": 2,
|
||||
"src/xceadmin/tests/test_e2e_live_ha_push.py": 12,
|
||||
"../../../../../../tmp/claude-1000/-home-rshen-projects-xce-worktrees-config/d6d1f70d-af0b-465b-9cd6-e719e38692ce/scratchpad/manual_ha_deploy.sh": 1,
|
||||
"src/xceadmin/tests/test_repro_bug1485.py": 1,
|
||||
".kiro/specs/admin-config-tool/tasks.md": 1,
|
||||
".claude/skills/xce-test-ha/run-ha-soak.sh": 3,
|
||||
"src/docs/deployment.md": 2,
|
||||
"src/controller/testsuite/waldump.h": 1,
|
||||
"src/controller/testsuite/waldump.c": 8,
|
||||
"src/controller/testsuite/test_waldump.c": 3
|
||||
"../../../../tmp/frpcdbg_mon.sh": 1,
|
||||
"../../../../tmp/frpc_prod.toml": 2,
|
||||
"../../../../tmp/frpc_mon.sh": 4,
|
||||
"../../../../tmp/frpc_watchdog.sh": 1,
|
||||
"../../../../tmp/frpc-watchdog.sh": 1
|
||||
},
|
||||
"anatomy_hits": 20,
|
||||
"anatomy_misses": 10,
|
||||
"repeated_reads_warned": 31,
|
||||
"anatomy_hits": 2,
|
||||
"anatomy_misses": 0,
|
||||
"repeated_reads_warned": 0,
|
||||
"cerebrum_warnings": 0,
|
||||
"stop_count": 74
|
||||
"stop_count": 14
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue