-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the bug
GitHub Copilot CLI v0.0.417 experiences a critical process management failure when SnapshotManager encounters directories with large numbers of untracked files.
The copilot interactive TUI becomes completely unresponsive for minutes.
Investigating with another copilot session gave the next insights:
Problem ✗
GitHub Copilot CLI hung with unresponsive terminal when launched in OrcaSlicer directory, spawning 10,000+ zombie git processes.
Root Cause 🔍
Untracked build directories (broken-build/ and vanila-build/, 12,000+ files total) caused Copilot's SnapshotManager to invoke git hash-object 6,172 times, creating zombie processes faster than they could be reaped.
Solution ✓
Removed the untracked build directories:
rm -rf broken-build/
rm -rf vanila-build/Investigation Method 🔬
- Observed: 11,900 zombie [git] processes with sequential PIDs
- Traced: Found 6,172
git hash-objectcalls via wrapper script - Identified: Root in untracked build directory traversal
- Fixed: Removed problematic directories
Result ✅
- Copilot now launches and responds normally
- No zombie processes
- Terminal I/O fully responsive
- Verified working with test queries
Affected version
0.0.417
Steps to reproduce the behavior
git clone git@github.com:OrcaSlicer/OrcaSlicer.git repro-copilot
cd repro-copilot
mkdir git-wrapper -p
cat > git-wrapper/git << 'EOF'
#!/bin/bash
echo "[GIT CALL] $@" >> /tmp/git-calls.log
exec /usr/bin/git "$@"
EOF
chmod +x git-wrapper/git
# create big number of untracked files
cp /usr/bin . -r
for i in {1..20}; do cp bin bin_$i -r; done
# After that, start the copilot with the git wrapper
PATH="./git-wrapper:$PATH" copilot
The log /tmp/git-calls.log full of lines like [GIT CALL] hash-object -- $DIR/repro-copilot/bin/pyreverse, the interface is completely hanged
Expected behavior
- SnapshotManager should quickly create a snapshot of repository state
- Copilot should be responsive within seconds
- No zombie processes should accumulate
- Terminal I/O should remain responsive
Actual behavior
Immediate:
- Process hangs during initialization
- Terminal becomes unresponsive
- Zombie git processes accumulate rapidly
After ~1 minute:
- 1,000+
[git] <defunct>zombie processes visible inps - CPU usage stays at 40-50% despite no visible work
- Terminal input is completely ignored
After 5-10 minutes:
- 5,000-10,000+ zombies accumulate
- System starts experiencing resource exhaustion
- Only
resetcommand restores terminal functionality
Additional context
- Operating system: arch linux
- Terminal emulator: tested alacritty, wezterm
- Shell: zsh