Skip to content

fix(installer): kill venv processes before removing venv dir (#47557) - #47610

Closed
kyssta-exe wants to merge 1 commit into
NousResearch:mainfrom
kyssta-exe:auto-fix/issue-47557
Closed

fix(installer): kill venv processes before removing venv dir (#47557)#47610
kyssta-exe wants to merge 1 commit into
NousResearch:mainfrom
kyssta-exe:auto-fix/issue-47557

Conversation

@kyssta-exe

Copy link
Copy Markdown
Contributor

Fixes #47557. On Windows, scripts/install.ps1 recreates the venv by removing the old directory, but python.exe and pythonw.exe processes holding .pyd native extensions as loaded DLLs prevent deletion. The fix kills hermes.exe, python.exe, and pythonw.exe processes running from the venv before removal, with a retry if the first Remove-Item fails.

@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists duplicate This issue or pull request already exists labels Jun 17, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #46726 — both PRs fix #47557 with the same mechanism: stop processes running out of the venv (hermes.exe/python.exe/pythonw.exe) before Remove-Item venv on Windows, since they hold .pyd native extensions as loaded DLLs. The earlier-open #46726 matches venv-resident processes by ExecutablePath (image-name-agnostic); this PR restricts to the three image names filtered by proc.Path under venv\Scripts and adds a retry. Same approach, so closing as duplicate of the canonical #46726 (which #47569 also duplicates). The retry-on-failure idea here is a nice touch worth folding into #46726.

@kyssta-exe

Copy link
Copy Markdown
Contributor Author

Stale — oldest open PR, no merge activity for weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Windows: scripts/install.ps1 venv recreation fails when pythonw.exe holds .pyd locks — only kills hermes.exe

2 participants