Repository navigation
Description
Operating system
Windows
Orca version
v1.4.184
Details
Summary
On Windows, orca-terminal-daemon.exe continuously spawns a new powershell.exe process roughly every 2 seconds to enumerate the full system process list. On machines where Windows PowerShell Transcription is enabled via Group Policy (common in enterprise/corporate environments for security auditing), every one of these spawns writes a transcript log file. Over ~2-3 weeks this accumulated to ~289GB / 1.4 million files in the configured transcription output directory, nearly filling the C: drive.
Environment
- OS: Windows 10 (Build 19045.5965), domain-joined enterprise machine
- Orca version: reproduced on both v1.4.175 and v1.4.184 (auto-updated mid-investigation, same behavior on both)
- PowerShell: 5.1.19041.5965 (Desktop edition)
- Windows PowerShell Transcription policy enabled via GPO:
HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription→EnableTranscripting=1,OutputDirectory=C:\temp\Transcription,EnableInvocationHeader=1
What's happening
Every ~2 seconds, a new transcript file appears with this exact host application command line:
powershell.exe -NoProfile -NonInteractive -Command "[Console]::OutputEncoding = [System.Text.Encoding]::UTF8; Get-CimInstance -ClassName Win32_Process -Property CommandLine,ExecutablePath,Name,ParentProcessId,ProcessId | Select-Object CommandLine,ExecutablePath,Name,ParentProcessId,ProcessId | ConvertTo-Json -Compress"
How I confirmed the source
Each transcript records its own PowerShell process ID and PowerShell version info in the header, and the command's own output (the JSON payload) is a full system process snapshot including ParentProcessId for every process — including the transcript-generating powershell.exe itself. By cross-referencing each transcript's declared PID against the JSON snapshot it produced, I traced the parent chain across multiple independent samples (different timestamps, before/after an app restart+auto-update):
powershell.exe (new PID every ~2s)
└─ orca-terminal-daemon.exe (C:\Users\AppData\Local\Orca\daemon-host\orca-terminal-daemon.exe)
└─ Orca.exe (C:\Users\AppData\Local\Programs\orca\Orca.exe)
└─ explorer.exe
This was consistent across every sample checked, both before and after a full Orca restart (which triggered an auto-update from v1.4.175 to v1.4.184 — new daemon PID 31608 → 37512, same behavior in the new version).
Steps to reproduce
- Enable Windows PowerShell Transcription via Group Policy or local policy (
EnableTranscripting=1, set anOutputDirectory). - Run Orca on Windows with at least one terminal/session open (no active agent workload required).
- Watch the configured transcription output directory — a new
PowerShell_transcript.*.txtfile appears roughly every 2 seconds, indefinitely, even when idle.
What I tried (no effect)
- Disabled "Resource Manager" status bar toggle (Settings → Appearance → Status bar toggles), which appears to be the only Windows CPU/memory-attribution feature in this area (cf. "Fix Windows Resource Manager memory and CPU attribution", Fix Windows Resource Manager memory and CPU attribution #8845, v1.4.150) — polling continued unchanged at the same ~2s cadence.
- Fully restarted Orca (which auto-updated the app) — new daemon process, same polling behavior, same command line, same interval.
Why this is easy to miss
This only becomes a severe disk-space problem on machines with PowerShell Transcription enabled via GPO — common on domain-joined enterprise/corporate Windows machines, but not on most individual developer machines, which is likely why it hasn't surfaced before.
Suggested fix
- Avoid shelling out to a new
powershell.exeprocess for routine process-tree enumeration. Use a native Win32 API (e.g.,CreateToolhelp32Snapshot/NtQuerySystemInformationvia a native Node addon) or an in-process WMI/COM binding instead of repeatedly spawning PowerShell. - If PowerShell must be used, make the polling interval configurable and much less frequent, and/or reuse a single long-lived PowerShell process instead of spawning a new one per poll.
- At minimum, this polling behavior should be gated by the "Resource Manager" toggle it's presumably intended to serve — currently it runs regardless of that setting.
Impact
Silent, continuous disk space consumption (tens of GB/day) with no user-facing indication, on any Windows machine with PowerShell Transcription/audit logging enabled — a fairly common enterprise security configuration.
Activity
fix(windows): make the wmic process reader survive real wmic output
fix(windows): keep forgeable rows out of the taskkill decision, and g…
perf(windows): read the process table natively instead of forking Pow…
perf(windows): read the process table natively instead of forking Pow…
perf(windows): read the process table natively instead of forking Pow…
perf(windows): read the process table natively instead of forking Pow…
perf(windows): read the process table natively instead of forking Pow…
perf(windows): read the process table natively instead of forking Pow…
perf(windows): read the process table natively instead of forking Pow…