Repository: vscode
Issue: VSCode remote server cause oom after I open some specific directory in my repository
Labels: info-needed

<!-- ⚠️⚠️ 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.86.2 (the same issue happens on latest 1.91.1 as well)
- OS Version: Win10 22H2 (local)/Ubuntu 20.04 (remote)

```
Version: 1.86.2 (user setup)
Commit: 903b1e9d8990623e3d7da1df3d33db3e42d80eda
Date: 2024-02-13T19:40:56.878Z
Electron: 27.2.3
ElectronBuildId: 26908389
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Windows_NT x64 10.0.19045
```

Steps to Reproduce:

1. Open the specific directory (in my case, its 'freeradius-server-3.0.27', witch is downloaded from official website and extracted to my repository.
2. Use `top` command to watch the memory and CPU usage. And the system becomes out of memory in minutes.

In step 2, I tried to use `strace` to see what happend to the remote server. But I only see repeating epollfd event, brk, read and then the memory usage goes high and my system does not repsponse.

Note.
1. Open other directories in the same repository does not cause the same issue.
2. Open the git repository of 'freeradius-sever' cloned from  github and checkout to the same tag does not cause the same issue.
3. The same issue first happens on 1.91.0. I downgrade VScode version-by-version and found 1.86.2 worked for me last week. But now I see it happened again, which means this issue seems exists even before 1.86.2. But I still need to figure out what is the exact condition to make it happen.
4. The same issue happened on local environment as well. I installed VSCode 1.91.0 on the Ubuntu device last week. The same symptom happened after I opened the same directory.
5. The same issue happened on WSL environment as well.

Do anyone have idea where should I look for? Or what kind of data should I collect?

---

```
[450987.846330] gvfs-afc-volume invoked oom-killer: gfp_mask=0x100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=0
[450987.846333] CPU: 3 PID: 313541 Comm: gvfs-afc-volume Not tainted 5.4.0-187-generic #207-Ubuntu
[450987.846333] Hardware name: Acer Veriton M4630G/Veriton M4630G, BIOS P21-B0                  12/04/2013
[450987.846334] Call Trace:
[450987.846339]  dump_stack+0x6d/0x8b
[450987.846342]  dump_header+0x4f/0x1eb
[450987.846343]  oom_kill_process.cold+0xb/0x10
[450987.846346]  out_of_memory+0x1cf/0x500
[450987.846348]  __alloc_pages_slowpath+0xdde/0xeb0
[450987.846350]  __alloc_pages_nodemask+0x2d0/0x320
[450987.846352]  alloc_pages_current+0x87/0xe0
[450987.846354]  __page_cache_alloc+0x72/0x90
[450987.846356]  pagecache_get_page+0xbf/0x300
[450987.846357]  filemap_fault+0x79e/0xbc0
[450987.846359]  ? unlock_page_memcg+0x12/0x20
[450987.846361]  ? page_add_file_rmap+0xff/0x1a0
[450987.846362]  ? filemap_map_pages+0x24c/0x380
[450987.846365]  ext4_filemap_fault+0x32/0x50
[450987.846367]  __do_fault+0x3c/0x170
[450987.846369]  do_fault+0x24b/0x640
[450987.846370]  __handle_mm_fault+0x4c5/0x7a0
[450987.846371]  handle_mm_fault+0xca/0x200
[450987.846375]  do_user_addr_fault+0x1f9/0x450
[450987.846376]  __do_page_fault+0x58/0x90
[450987.846377]  do_page_fault+0x2c/0xe0
[450987.846381]  page_fault+0x34/0x40
[450987.846382] RIP: 0033:0x7fd7da808eb0
[450987.846386] Code: Bad RIP value.
[450987.846386] RSP: 002b:00007fd7d9c92a50 EFLAGS: 00010246
[450987.846387] RAX: 0000000000000000 RBX: 0000000000000010 RCX: 0000000000000000
[450987.846388] RDX: 0000000000000000 RSI: 00007fd7d9c92a70 RDI: 0000000000000004
[450987.846388] RBP: 00007fd7d9c92a70 R08: 00007fd7d9c92a10 R09: 00007fd7d9c92a20
[450987.846389] R10: 0000000000000000 R11: 0000000000000000 R12: 00007fd7d9c92a60
[450987.846389] R13: 0000000000000004 R14: 0000000000000005 R15: 0000000000000004
[450987.846390] Mem-Info:
[450987.846393] active_anon:5597515 inactive_anon:409740 isolated_anon:0
                 active_file:457 inactive_file:1080 isolated_file:0
                 unevictable:8 dirty:0 writeback:0 unstable:0
                 slab_reclaimable:20267 slab_unreclaimable:33855
                 mapped:1493 shmem:1274 pagetables:16345 bounce:0
                 free:41252 free_pcp:3 free_cma:0
[450987.846395] Node 0 active_anon:22390060kB inactive_anon:1638960kB active_file:1828kB inactive_file:4320kB unevictable:32kB isolated(anon):0kB isolated(file):0kB mapped:5972kB dirty:0kB writeback:0kB shmem:5096kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 0kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no
[450987.846395] Node 0 DMA free:15892kB min:40kB low:52kB high:64kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15988kB managed:15896kB mlocked:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
[450987.846398] lowmem_reserve[]: 0 3410 23889 23889 23889
[450987.846399] Node 0 DMA32 free:91384kB min:9640kB low:13132kB high:16624kB active_anon:3432892kB inactive_anon:292kB active_file:24kB inactive_file:0kB unevictable:0kB writepending:0kB present:3612972kB managed:3547216kB mlocked:0kB kernel_stack:48kB pagetables:17424kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
[450987.846401] lowmem_reserve[]: 0 0 20478 20478 20478
[450987.846402] Node 0 Normal free:57732kB min:57896kB low:78864kB high:99832kB active_anon:18957168kB inactive_anon:1638668kB active_file:1656kB inactive_file:3876kB unevictable:32kB writepending:0kB present:21463040kB managed:20977688kB mlocked:32kB kernel_stack:6160kB pagetables:47956kB bounce:0kB free_pcp:12kB local_pcp:0kB free_cma:0kB
[450987.846404] lowmem_reserve[]: 0 0 0 0 0
[450987.846405] Node 0 DMA: 1*4kB (U) 2*8kB (U) 2*16kB (U) 1*32kB (U) 3*64kB (U) 2*128kB (U) 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15892kB
[450987.846409] Node 0 DMA32: 1954*4kB (UME) 1185*8kB (UME) 638*16kB (UME) 598*32kB (UME) 263*64kB (UME) 56*128kB (UME) 14*256kB (E) 8*512kB (E) 5*1024kB (E) 4*2048kB (ME) 0*4096kB = 91632kB
[450987.846414] Node 0 Normal: 888*4kB (UME) 1333*8kB (UME) 817*16kB (UME) 991*32kB (UME) 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 59000kB
[450987.846418] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
[450987.846419] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
[450987.846419] 34661 total pagecache pages
[450987.846420] 31775 pages in swap cache
[450987.846421] Swap cache stats: add 828961, delete 797196, find 3650362/3675510
[450987.846421] Free swap  = 0kB
[450987.846421] Total swap = 2097148kB
[450987.846422] 6273000 pages RAM
[450987.846422] 0 pages HighMem/MovableOnly
[450987.846422] 137800 pages reserved
[450987.846423] 0 pages cma reserved
[450987.846423] 0 pages hwpoisoned
[450987.846424] Tasks state (memory values in pages):
[450987.846424] [  pid  ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name
[450987.846427] [    281]     0   281    15662      222   131072      179          -250 systemd-journal
[450987.846429] [    342]     0   342     6360      107    69632      931         -1000 systemd-udevd
[450987.846430] [    635]   127   635     1775        7    49152      115             0 rpcbind
[450987.846432] [    636]   101   636     6271       56    86016     1098             0 systemd-resolve
[450987.846433] [    637]   124   637    22728       27    81920      189             0 systemd-timesyn
[450987.846434] [    641]     0   641    60206      150    98304      658             0 accounts-daemon
[450987.846435] [    642]     0   642      635        0    49152       43             0 acpid
[450987.846436] [    644]   116   644     2187       61    57344       53             0 avahi-daemon
[450987.846437] [    647]   103   647     2277      439    57344      101          -900 dbus-daemon
[450987.846438] [    648]     0   648    65649      306   139264      420             0 NetworkManager
[450987.846439] [    654]     0   654    20474       29    57344       52             0 irqbalance
[450987.846441] [    656]     0   656    10127        8   114688     2184             0 networkd-dispat
[450987.846442] [    658]     0   658    58827      600    94208      234             0 polkitd
[450987.846443] [    660]   102   660    56135      126    81920      348             0 rsyslogd
[450987.846444] [    668]     0   668   367068     2687   270336      723          -900 snapd
[450987.846445] [    669]     0   669    58975        0    90112      146             0 switcheroo-cont
[450987.846446] [    670]     0   670     4441      108    69632      199             0 systemd-logind
[450987.846447] [    671]     0   671    31642       64    98304      165             0 thermald
[450987.846449] [    672]     0   672    98488      447   139264      342             0 udisksd
[450987.846450] [    673]     0   673     3422       23    69632      135             0 wpa_supplicant
[450987.846451] [    688]   116   688     2140        1    57344       88             0 avahi-daemon
[450987.846452] [    745]     0   745    60343      114   106496      369             0 ModemManager
[450987.846453] [    753]     0   753   308576      927   110592      239             0 canonical-livep
[450987.846454] [    762]     0   762    29671        0   122880     2063             0 unattended-upgr
[450987.846455] [    784]     0   784     3073       41    65536      190         -1000 sshd
[450987.846456] [    840]     0   840    18007      233   126976      345             0 nmbd
[450987.846457] [    841]   113   841    62984      158   122880      342             0 whoopsie
[450987.846458] [    875]     0   875     2483       27    53248       46             0 cron
[450987.846460] [    889]    33   889     1933       18    61440      209             0 lighttpd
[450987.846461] [    891]     0   891    76552      312    98304      283             0 lightdm
[450987.846462] [    892]   114   892     2816       24    65536       93             0 kerneloops
[450987.846463] [    894]   114   894     2816       26    61440       93             0 kerneloops
[450987.846464] [   1013]   109  1013    38287       28    65536       51             0 rtkit-daemon
[450987.846465] [   1109]  1001  1109     4882       88    77824      418             0 systemd
[450987.846466] [   1110]  1001  1110    42444        7    98304      910             0 (sd-pam)
[450987.846467] [   1130]  1001  1130     2049       22    53248      293             0 dbus-daemon
[450987.846468] [   1384]  1001  1384     3286      614    65536      315             0 screen
[450987.846469] [   1385]  1001  1385     3207      210    57344      584             0 bash
[450987.846471] [  76240]     0 76240    21970      648   159744      385             0 smbd
[450987.846472] [  76253]     0 76253    21369      242   147456      484             0 smbd-notifyd
[450987.846473] [  76254]     0 76254    21373      254   139264      475             0 cleanupd
[450987.846474] [  76255]     0 76255    21930      585   159744      183             0 samba-bgqd
[450987.846475] [  98226]     0 98226    63103        0   114688      298             0 upowerd
[450987.846476] [ 313108]     0 313108     2236        2    45056       32             0 agetty
[450987.846477] [ 313121]  1001 313121    76339        0    86016      204             0 at-spi-bus-laun
[450987.846478] [ 313126]  1001 313126     1898        0    53248      164             0 dbus-daemon
[450987.846479] [ 313130]  1001 313130    57555        0    77824      222             0 xfconfd
[450987.846481] [ 313148]  1001 313148    60003       10    98304      230             0 gvfsd
[450987.846482] [ 313153]  1001 313153    94587        0    94208      187             0 gvfsd-fuse
[450987.846483] [ 313271]  1001 313271    39058        1    69632      159             0 dconf-service
[450987.846484] [ 313284]   117 313284    61694       16   110592     1330             0 colord
[450987.846485] [ 313294]  1001 313294    59299        0    90112      155             0 agent
[450987.846486] [ 313313]  1001 313313    15074        6   155648     4035             0 applet.py
[450987.846487] [ 313345]  1001 313345    78597        0   102400      456             0 gvfs-udisks2-vo
[450987.846488] [ 313351]  1001 313351    59044        0    86016      183             0 gvfs-goa-volume
[450987.846489] [ 313355]  1001 313355   138382      104   253952     1501             0 goa-daemon
[450987.846490] [ 313413]  1001 313413    10997        0    86016      169             0 obexd
[450987.846491] [ 313510]  1001 313510    78764      111   114688      390             0 goa-identity-se
[450987.846492] [ 313539]  1001 313539   267694      159   270336      897             0 evolution-sourc
[450987.846493] [ 313540]  1001 313540    79256        0   102400      268             0 gvfs-afc-volume
[450987.846494] [ 313545]  1001 313545    59000        0    86016      176             0 gvfs-mtp-volume
[450987.846495] [ 313549]  1001 313549    59603        0    86016      208             0 gvfs-gphoto2-vo
[450987.846496] [ 313567]  1001 313567    78532      114   110592      174             0 gvfsd-trash
[450987.846498] [ 313573]  1001 313573    40611        0    81920      153             0 gvfsd-metadata
[450987.846499] [ 313588]  1001 313588   209810      290   270336      784             0 evolution-calen
[450987.846500] [ 313604]  1001 313604   170489      248   249856      694             0 evolution-addre
[450987.846501] [ 313902]     0 313902     2236        3    49152       32             0 agetty
[450987.846502] [ 319112]     0 319112    99014     1283   417792     6123             0 Xorg
[450987.846503] [ 319118]     0 319118    39994      163    77824      323             0 lightdm
[450987.846504] [ 319155]   110 319155     4822      101    77824      344             0 systemd
[450987.846505] [ 319162]   110 319162    42736      166    98304     1045             0 (sd-pam)
[450987.846506] [ 319167]   110 319167    70862       36   139264      802             0 pulseaudio
[450987.846508] [ 319173]   110 319173     2447        1    61440       60             0 lightdm-greeter
[450987.846509] [ 319174]   110 319174   152547      937   536576    11191             0 lightdm-gtk-gre
[450987.846510] [ 319177]   110 319177     1865        0    53248      129             0 dbus-daemon
[450987.846511] [ 319178]   110 319178    76338        1    90112      181             0 at-spi-bus-laun
[450987.846512] [ 319183]   110 319183     1832        0    53248      102             0 dbus-daemon
[450987.846513] [ 319185]   110 319185    60003        1    98304      228             0 gvfsd
[450987.846514] [ 319190]   110 319190    78203        1    98304      215             0 gvfsd-fuse
[450987.846515] [ 319212]     0 319212     3142       21    65536      165             0 lightdm
[450987.846516] [ 319214]   110 319214    40693        0    77824      179             0 at-spi2-registr
[450987.846517] [ 445642]  1001 445642    60115        0    94208      248             0 gnome-keyring-d
[450987.846518] [ 952046]     0 952046    28748     1196   176128      357             0 smbd
[450987.846519] [1745967]  1001 1745967     3239      520    61440      289             0 bash
[450987.846520] [1946537]  1001 1946537   133573      109   151552     3628             0 python3
[450987.846521] [ 297069]     0 297069     5734      151    81920      315             0 cupsd
[450987.846523] [ 297070]     0 297070    44178      267   110592      182             0 cups-browsed
[450987.846524] [ 461066]  1001 461066     2912        2    61440      484             0 bash
[450987.846525] [ 462409]     0 462409     3523       49    65536      323             0 sshd
[450987.846526] [ 462411]     0 462411     3524        9    65536      362             0 sshd
[450987.846527] [ 462491]  1001 462491     3556      125    65536      301             0 sshd
[450987.846528] [ 462506]  1001 462506     2890        1    65536      457             0 bash
[450987.846529] [ 462589]  1001 462589     3557        1    65536      374             0 sshd
[450987.846530] [ 462590]  1001 462590     1527        2    53248      119             0 sftp-server
[450987.846532] [ 462596]  1001 462596     2485       14    61440       57             0 screen
[450987.846533] [ 484826]  1001 484826     2912        2    61440      484             0 bash
[450987.846534] [ 490497]  1001 490497     2395        2    53248      137             0 ftp
[450987.846535] [1360838]  1001 1360838     2447        1    57344       61             0 sh
[450987.846536] [1360903]  1001 1360903  6968281  5950599 58314752   445902             0 node
[450987.846538] [1361002]  1001 1361002   178082      532  1056768     3952             0 node
[450987.846539] [1361347]  1001 1361347   248919     6839  3088384    13215             0 node
[450987.846540] [1362778]     0 1362778     6360      230    61440      812             0 systemd-udevd
[450987.846541] [1362782]     0 1362782     2810       58    53248        0             0 sshd
[450987.846542] [1362784]     0 1362784     6360      229    61440      813             0 systemd-udevd
[450987.846544] [1362788]  1001 1362788      969       38    40960        0             0 sudo
[450987.846545] [1362790]  1001 1362790     2447       60    65536        0             0 bash
[450987.846546] [1362791]     0 1362791    21751      543   151552      223             0 smbd
[450987.846547] [1362792]  1001 1362792     2447       58    57344        0             0 bash
[450987.846548] [1362793]  1001 1362793     2447       58    57344        0             0 bash
[450987.846549] [1362795]     0 1362795    21751      525   151552      241             0 smbd
[450987.846550] [1362797]     0 1362797     2287       44    40960        0             0 sshd
[450987.846551] [1362800]     0 1362800    21970      384   143360      383             0 smbd
[450987.846552] [1362802]     0 1362802    21970      388   143360      378             0 smbd
[450987.846553] [1362805]     0 1362805    21970      387   143360      379             0 smbd
[450987.846554] [1362806]  1001 1362806     2102       20    53248        0             0 tail
[450987.846554] [1362807]     0 1362807    21970      383   139264      383             0 smbd
[450987.846556] [1362808]     0 1362808     6360      113    61440      925             0 systemd-udevd
[450987.846556] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1001.slice/session-385.scope,task=node,pid=1360903,uid=1001
[450987.846580] Out of memory: Killed process 1360903 (node) total-vm:27873124kB, anon-rss:23802396kB, file-rss:0kB, shmem-rss:0kB, UID:1001 pgtables:56948kB oom_score_adj:0
[451006.312243] lkp_Ubuntu_5_4_0_187_207_generic_105: loading out-of-tree module taints kernel.
[451006.312245] lkp_Ubuntu_5_4_0_187_207_generic_105: tainting kernel with TAINT_LIVEPATCH
[451006.312787] livepatch: enabling patch 'lkp_Ubuntu_5_4_0_187_207_generic_105'
[451006.312861] livepatch: 'lkp_Ubuntu_5_4_0_187_207_generic_105': starting patching transition
[451006.313221] livepatch: 'lkp_Ubuntu_5_4_0_187_207_generic_105': patching complete
```