Repository: vscode
Issue: MaxListenersExceededWarning: Possible EventEmitter memory leak detected.
Labels: bug

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.95.3
- OS Version: Ubuntu 22.04.5 LTS

Steps to Reproduce:

1. Close VSCode with 8 projects opened (most of them DevContainer projects)
2. Open VSCode again from terminal ( running `code --disable-extensions --trace-warnings` to disable extensions and to show warning details) without specifying any folder or file (so last working session is used opening the 8 projects)
3. Following log is printed in the terminal:
```bash
Warning: 'trace-warnings' is not in the list of known options, but still passed to Electron/Chromium.
[main 2024-11-19T10:24:29.689Z] update#setState idle
(node:471892) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 child-process-gone listeners added to [App]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit
    at genericNodeError (node:internal/errors:984:15)
    at wrappedFn (node:internal/errors:538:14)
    at _addListener (node:events:593:17)
    at App.addListener (node:events:611:10)
    at Object.X [as onWillAddFirstListener] (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:28:7366)
    at q (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:31:1282)
    at Na.H (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:46:13550)
    at Na.F (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:46:11857)
    at Na.start (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:46:15161)
    at vh.start (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:46:29191)
    at Object.call (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:36:4563)
    at df.s (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:34:19676)
    at df.q (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:34:19199)
    at qo.value (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:34:18601)
    at P.B (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:33:746)
    at P.C (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:33:816)
    at P.fire (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:33:1033)
    at qo.value (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:28:4908)
    at P.B (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:33:746)
    at P.fire (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:33:964)
    at qo.value (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:28:5092)
    at P.B (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:33:746)
    at P.fire (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:33:964)
    at T (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:28:7343)
    at IpcMainImpl.i (file:///opt/VSCode-linux-x64-1.95.3/resources/app/out/main.js:36:21224)
    at IpcMainImpl.emit (node:events:531:35)
    at WebContents.<anonymous> (node:electron/js2c/browser_init:2:85782)
    at WebContents.emit (node:events:519:28)
[main 2024-11-19T10:24:59.835Z] update#setState checking for updates
[main 2024-11-19T10:25:00.551Z] update#setState idle
```