fix(agent): the Windows probe says why the sandbox can't start the compiler #36
No reviewers
Labels
No labels
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Beanstalk!36
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Beanstalk:fix/win-spawn-probe"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
#33 worked. On nightly-65 the probe says
@@probe mkdtemp ok fix, and Python's temp folder is now the sandbox's ownAC\Temp(rp_7ba5ac36e47269d2, Longshot #910). The main base gets one step further, then stops onmake_game.py's compiler check:In the llvm-mingw zip,
bin\clang.exeis 13,824 bytes, the same size asclang-target-wrapper.exe: it's the small launcher, and the compiler itself isclang-23.exe. The launcher starts it with the C runtime's_wspawnvand printsperrorwhen that fails, so Windows refused to startclang-23.exeinside the sandbox (error 5). Python, in the same sandbox, startspython.exewithout trouble.The two start a program differently. Python's
subprocesshands the child only the handles it lists; the C runtime's spawn hands it every inheritable handle. A file's grants can also differ. I can't run Windows here, so rather than guess at a fix, this makes the next run say exactly which start fails and with which Windows error.What changed
The temp probe (#28, run before each Windows main base) gets a second part, only on Windows and only when
LONGSHOT_MINGWis set. It:clang-N.exeand the launcherclang.exeare there and executable;clang-N.exe --versiondirectly, the launcherclang.exe --version, andclang-N.exewithclose_fds=False(all handles inherited, like the C runtime);CreateProcessWonclang-N.exewith handle inheritance off and on, and printsGetLastErrorand its message when it fails.Each line starts with
@@probe spawn, and the report's log tail keeps them.Testing