vscode icon indicating copy to clipboard operation
vscode copied to clipboard

vscode.OutputChannel.clear() invalid & leads to memory leakage

Open soma-liang opened this issue 1 year ago • 0 comments

Type: Bug

prart of #200015 1.download extension https://github.com/soma-liang/demo-cache.git 2.Run command StartTest 3.When you see the output, the current time is refreshed every 10 ms. After 10 seconds, call vscode.OutputChannel. clear(), continue refreshing and keep looping 4.Calling script " #!/bin/bash

echo "30256,30294,30326,30344" >> mem_log.txt

while true

do

ps -p 30256,30294,30326,30344 -o pid,rss,%cpu | tail -n +2 | tr '\n' ' ' >> mem_log.txt

echo "" >> mem_log.txt

sleep 1

done " to record the memory changes corresponding to vscode 5.Run command EndTest after 5 hours 6.Observing the time displayed in the output, it was found that the displayed content contains more than 10 seconds of data, as well as data that needs to be cleared previously. And observing the log files, it was found that the memory was also growing rapidly

add result img image image

VS Code version: Code 1.86.2 (903b1e9d8990623e3d7da1df3d33db3e42d80eda, 2024-02-13T19:41:37.860Z) OS version: Linux x64 5.15.0-92-generic Modes:

System Info
Item Value
CPUs Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz (8 x 2599)
GPU Status 2d_canvas: unavailable_software
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: disabled_off
Load (avg) 3, 2, 2
Memory (System) 15.61GB (11.82GB free)
Process Argv --crash-reporter-id 46ebf934-2368-4df7-b9e4-a6fde6010a9f
Screen Reader no
VM 40%
DESKTOP_SESSION undefined
XDG_CURRENT_DESKTOP GNOME
XDG_SESSION_DESKTOP undefined
XDG_SESSION_TYPE x11
Extensions (7)
Extension Author (truncated) Version
gitlens eam 14.8.2
demo-cache mic 0.0.5
cpptools ms- 1.18.5
postman-for-vscode Pos 0.18.0
vscode-counter uct 3.4.0
wavetrace wav 1.1.2
markdown-all-in-one yzh 3.6.2
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
vstes627:30244334
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
accentitlementst:30887150
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
d6fi2104:30959263
pydisww1:30959800
3ef8e399:30964150
e3gdj431:30958358
ccp2r6:30958158

### Tasks

soma-liang avatar Feb 18 '24 09:02 soma-liang