Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save danielrosehill/b011beca618ff0f0536c3040ba9f1686 to your computer and use it in GitHub Desktop.

Select an option

Save danielrosehill/b011beca618ff0f0536c3040ba9f1686 to your computer and use it in GitHub Desktop.
Documenting the unexpected resolution to debugging cascade launch issues on Ubuntu (Chrome extension!)

Windsurf Cascade Launch Debug Debrief: A Chrome Extension Proves The Unlikely Culprit!

For more than a week I've been unable to use Cascade and pretty much exhausted all potential debugging routes.

Looking at the logs, it seemed obvious that the cause was overrunning an inode limit, but nothing seemed to work (manually raising in every config file possible, etc).

As it seemed the config raises were holding I looked into what the background level of usage was at idle and that threw up a clue that something was using a lot of inodes – and it wasn't Windsurf.

ChatGPT led me through a debugging process that was pretty manual: monitoring inodes live while disabling Chrome extensions one by one until isolating which extension was responsible for the background deleted files being held (a text substitution utility; I will save them the blushes).

My theory is that depending on the size of your codebase, the sheer number of files being indexed for context pushes the baseline pretty high and thus... it may be easier for this to happen than might ordinarily be the case working in IDEs. But that's just my theory.

Either way, I thought I would share the debrief below written by ChatGPT.


💥 Debrief: Debugging Deleted File Handle Leak in Chrome

🧠 Background

A misbehaving Chrome extension caused hundreds (sometimes thousands) of open deleted file handles, which led to IDE crashes (Windsurf, Cascade) due to hitting inode/file descriptor limits.

✅ What’s considered “normal”?

Action Deleted Files Expected
Idle Chrome window ~100–300
Opening new tab +10 to +50
Misbehaving extension +200 to +1000+

If you're seeing 300+ new deleted files when opening a new tab, that’s likely a misbehaving content script or background process.


🔍 Live Debugging Process

  1. Monitor open deleted files:
    sudo lsof -nP | grep '(deleted)' | wc -l

2. **Watch which processes are holding them**:

   ```bash
   sudo lsof -nP | grep '(deleted)' | awk '{print $1}' | sort | uniq -c | sort -rn
   ```

3. **Isolate Chrome extensions** by disabling them one-by-one and watching `lsof` count drop.

4. **Launch new tab → check delta**: If opening a tab adds 300+ new entries, the issue is likely extension-based.

---

### 🧪 To Fully Confirm the Culprit

Use a **clean Chrome profile** to isolate behavior:

```bash
google-chrome --user-data-dir=/tmp/chrome-test
```

Then:

* Install suspected extension
* Open tab
* Monitor deleted files with `lsof` as above

Repeat for each extension until you identify the offender.

---

### 📝 Lessons Learned

* Operating system limits can be silently hit in non-obvious ways (e.g., inodes via deleted file handles)
* Chrome extensions have the power to affect the whole system
* IDEs like Cascade are more sensitive to file handle usage due to how deeply they index files

---

## 🌊 Aftermath

After removing the culprit extension, my open deleted file count dropped from **\~2500 to \~500**, and Cascade now launches normally.

Hope this helps someone else down the line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment