Closed rookiefiend closed 2 years ago
(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
I think it's not duplicate. I is exit because out of memory and vsocde can normally running a period of time.
Are you actually out of memory? Do you suspect a memory leak?
Can you follow these steps https://github.com/microsoft/vscode/wiki/Native-Crash-Issues#creating-and-symbolicating-local-crash-reports and attach the crash logs.
Also what is the output of cat /proc/meminfo
Are you actually out of memory? Do you suspect a memory leak?
yes,i suspect is a memory leak, beacuse my host config is:
Can you follow these steps https://github.com/microsoft/vscode/wiki/Native-Crash-Issues#creating-and-symbolicating-local-crash-reports and attach the crash logs.
Also what is the output of
cat /proc/meminfo
this is /proc/memory after crash:
$ cat /proc/meminfo
MemTotal: 15807140 kB
MemFree: 12573792 kB
MemAvailable: 12979956 kB
Buffers: 25476 kB
Cached: 954964 kB
SwapCached: 0 kB
Active: 205672 kB
Inactive: 2343588 kB
Active(anon): 16608 kB
Inactive(anon): 1901236 kB
Active(file): 189064 kB
Inactive(file): 442352 kB
Unevictable: 48 kB
Mlocked: 48 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 136 kB
Writeback: 0 kB
AnonPages: 1568940 kB
Mapped: 558048 kB
Shmem: 353464 kB
KReclaimable: 50540 kB
Slab: 150168 kB
SReclaimable: 50540 kB
SUnreclaim: 99628 kB
KernelStack: 14736 kB
PageTables: 36704 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 7903568 kB
Committed_AS: 9704724 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 49444 kB
VmallocChunk: 0 kB
Percpu: 11072 kB
HardwareCorrupted: 0 kB
AnonHugePages: 2048 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
FileHugePages: 0 kB
FilePmdMapped: 0 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 0 kB
DirectMap4k: 790464 kB
DirectMap2M: 13230080 kB
DirectMap1G: 3145728 kB
this is /proc/memory when code running
$ cat /proc/meminfo
MemTotal: 15807140 kB
MemFree: 2869904 kB
MemAvailable: 4293464 kB
Buffers: 54860 kB
Cached: 1977704 kB
SwapCached: 0 kB
Active: 355192 kB
Inactive: 11734972 kB
Active(anon): 25280 kB
Inactive(anon): 10425256 kB
Active(file): 329912 kB
Inactive(file): 1309716 kB
Unevictable: 64 kB
Mlocked: 64 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 401116 kB
Writeback: 156 kB
AnonPages: 10057800 kB
Mapped: 799752 kB
Shmem: 395632 kB
KReclaimable: 68912 kB
Slab: 173052 kB
SReclaimable: 68912 kB
SUnreclaim: 104140 kB
KernelStack: 18160 kB
PageTables: 63004 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 7903568 kB
Committed_AS: 21531716 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 53240 kB
VmallocChunk: 0 kB
Percpu: 11072 kB
HardwareCorrupted: 0 kB
AnonHugePages: 2048 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
FileHugePages: 0 kB
FilePmdMapped: 0 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 0 kB
DirectMap4k: 821184 kB
DirectMap2M: 13199360 kB
DirectMap1G: 3145728 kB
this is crash dir content: vscode-crash.zip
this is top command when vscode running, I don't if it is normal.
# this is code just start
$ top -c -n 1
top - 09:13:27 up 42 min, 1 user, load average: 1.83, 1.17, 1.10
任务: 289 total, 1 running, 288 sleeping, 0 stopped, 0 zombie
%Cpu(s): 14.7 us, 13.7 sy, 0.0 ni, 71.6 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 15436.7 total, 11208.8 free, 2858.6 used, 1369.3 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 11917.6 avail Mem
进程号 USER PR NI VIRT RES SHR %CPU %MEM TIME+ COMMAND
6870 20 0 4987676 315700 102604 S 100.0 2.0 0:10.22 /opt/visual-studio-code/code --no-sandbox --unity-launch
3468 20 0 36.5g 137940 41012 S 12.5 0.9 2:21.58 /opt/google/chrome-unstable/chrome --type=renderer --field-trial-handle=12554150912777368204,1049160295444478812,131072 --lang=zh-CN --origin-trial-disabled-features+
# this is code run for a while
$ top -c -n 1
top - 09:16:15 up 45 min, 1 user, load average: 1.70, 1.40, 1.20
任务: 284 total, 1 running, 283 sleeping, 0 stopped, 0 zombie
%Cpu(s): 7.1 us, 15.2 sy, 0.0 ni, 75.8 id, 1.0 wa, 1.0 hi, 0.0 si, 0.0 st
MiB Mem : 15436.7 total, 8197.3 free, 5857.0 used, 1382.4 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 8922.1 avail Mem
进程号 USER PR NI VIRT RES SHR %CPU %MEM TIME+ COMMAND
6870 20 0 9454464 3.3g 102776 S 93.8 21.9 2:53.91 /opt/visual-studio-code/code --no-sandbox --unity-launch
3468 20 0 36.5g 140864 41012 S 12.5 0.9 2:35.35 /opt/google/chrome-unstable/chrome --type=renderer --field-trial-handle=12554150912777368204,1049160295444478812,131072 --lang=zh-CN --origin-trial-disabled-features+
as you can see, memory usage is growing all the time
Just in case,I disable all extensions try again, and I found the memory usage also is growing all the time.
$ code --disable-extensions .
$ top -c -n 1
top - 09:30:04 up 58 min, 1 user, load average: 2.32, 2.03, 1.67
任务: 284 total, 1 running, 283 sleeping, 0 stopped, 0 zombie
%Cpu(s): 8.0 us, 15.0 sy, 0.0 ni, 77.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 15436.7 total, 9387.1 free, 4595.7 used, 1453.8 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 10156.9 avail Mem
进程号 USER PR NI VIRT RES SHR %CPU %MEM TIME+ COMMAND
8747 20 0 7171804 2.0g 102272 S 93.8 13.2 1:41.19 /opt/visual-studio-code/code --disable-extensions --no-sandbox .
$ top -c -n 1
top - 09:30:51 up 59 min, 1 user, load average: 1.81, 1.93, 1.65
任务: 284 total, 1 running, 283 sleeping, 0 stopped, 0 zombie
%Cpu(s): 9.5 us, 14.7 sy, 0.0 ni, 73.7 id, 0.0 wa, 1.1 hi, 1.1 si, 0.0 st
MiB Mem : 15436.7 total, 8522.1 free, 5461.0 used, 1453.6 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 9291.5 avail Mem
进程号 USER PR NI VIRT RES SHR %CPU %MEM TIME+ COMMAND
8747 20 0 8520488 2.8g 102272 S 87.5 18.7 2:26.13 /opt/visual-studio-code/code --disable-extensions --no-sandbox .
Is there anyone who can help me? and Is need other information? If this problem is not easy to solve, I will try to restore my system. Thanks. 🥺
when the latest version, I don't meet this question, I will close this issue.
Steps to Reproduce:
Does this issue occur when all extensions are disabled?: yes
I think this is related for my os or electron, becase my other software(such as: typora) also have this question, but I don't know why happen this. Please help.
The lastest log with
code --verbose
is: