-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Labels
needs: more infoReporter must clarify the issueReporter must clarify the issue
Description
Hi,
There's a memory leak with ng, it keeps consuming memory despite memory increase, I've monitored and it has already consumed more than 17 GB of RAM! I think the problem is related to SASS because the program is stucked with .scss files but I'm not sure.
I've tested with NODE_OPTIONS=--max-old-space-size=17000 but also node --max_old_space_size=20000 node_modules/@angular/cli/bin/ng build --prod later, always the same issue even if I try with 8192 instead of 17000 or 20000.
I know, this memory problem has already been opened multiple times, like here #13734, but it seems to be a persistent issue
Terminal
ng serve
Your global Angular CLI version (9.0.2) is greater than your local
version (8.3.24). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
10% building 3/3 modules 0 activeℹ 「wds」: Project is running at http://localhost:4200/webpack-dev-server/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: 404s will fallback to //index.html
69% building 1089/1091 modules 2 active ...cts/kiss/wdm-frontend/src/app/shared/components/requests/request-details/request-details.component.scss
<--- Last few GCs --->
[5836:0x4d7c110] 2199612 ms: Mark-sweep 16887.9 (17035.7) -> 16873.6 (17036.4) MB, 18857.0 / 0.0 ms (average mu = 0.170, current mu = 0.115) allocation failure scavenge might not succeed
[5836:0x4d7c110] 2213160 ms: Mark-sweep 16889.0 (17036.7) -> 16874.8 (17037.7) MB, 11231.8 / 0.1 ms (average mu = 0.170, current mu = 0.171) allocation failure scavenge might not succeed
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x145ce19]
Security context: 0x2ff30cd40921 <JSObject>
1: accept$1 [0x78e6555b9d9] [/home/gokan/projects/kiss/wdm-frontend/node_modules/sass/sass.dart.js:~25927] [pc=0x26048f14d2ba](this=0x2853e5c2f751 <NumberExpression map = 0x11237f44f671>,0x3b9478e5d9a9 <_EvaluateVisitor0 map = 0x1a480715e851>)
2: /* anonymous */ [0x2338e8302071] [/home/gokan/projects/kiss/wdm-frontend/node_modules/sass/sass.dart.js:~42948...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Writing Node.js report to file: report.20200219.094246.5836.0.001.json
Node.js report completed
1: 0xa9d570 node::Abort() [ng serve]
2: 0xa9f832 node::OnFatalError(char const*, char const*) [ng serve]
3: 0xc0772e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [ng serve]
4: 0xc07aa9 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [ng serve]
5: 0xdb5fb5 [ng serve]
6: 0xdb6646 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [ng serve]
7: 0xdc4eb9 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [ng serve]
8: 0xdc5cf5 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [ng serve]
9: 0xdc87cc v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [ng serve]
10: 0xd8f3a4 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [ng serve]
11: 0x10dc6ce v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [ng serve]
12: 0x145ce19 [ng serve]
Aborted (core dumped)
Generated JSON report
{
"header": {
"reportVersion": 1,
"event": "Allocation failed - JavaScript heap out of memory",
"trigger": "FatalError",
"filename": "report.20200219.094246.5836.0.001.json",
"dumpEventTime": "2020-02-19T09:42:46Z",
"dumpEventTimeStamp": "1582101766414",
"processId": 5836,
"cwd": "/home/gokan/projects/kiss/wdm-frontend",
"commandLine": [
"node",
"/usr/local/bin/ng",
"serve"
],
"nodejsVersion": "v13.8.0",
"glibcVersionRuntime": "2.27",
"glibcVersionCompiler": "2.17",
"wordSize": 64,
"arch": "x64",
"platform": "linux",
"componentVersions": {
"node": "13.8.0",
"v8": "7.9.317.25-node.28",
"uv": "1.34.1",
"zlib": "1.2.11",
"brotli": "1.0.7",
"ares": "1.15.0",
"modules": "79",
"nghttp2": "1.40.0",
"napi": "5",
"llhttp": "2.0.4",
"openssl": "1.1.1d",
"cldr": "36.0",
"icu": "65.1",
"tz": "2019c",
"unicode": "12.1"
},
"release": {
"name": "node",
"headersUrl": "https://nodejs.org/download/release/v13.8.0/node-v13.8.0-headers.tar.gz",
"sourceUrl": "https://nodejs.org/download/release/v13.8.0/node-v13.8.0.tar.gz"
},
"osName": "Linux",
"osRelease": "5.3.0-40-generic",
"osVersion": "#32~18.04.1-Ubuntu SMP Mon Feb 3 14:05:59 UTC 2020",
"osMachine": "x86_64",
"cpus": [
{
"model": "Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz",
"speed": 3574,
"user": 2549600,
"nice": 7400,
"sys": 215000,
"idle": 27786400,
"irq": 0
},
{
"model": "Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz",
"speed": 3402,
"user": 1542400,
"nice": 13200,
"sys": 238700,
"idle": 28700200,
"irq": 0
},
{
"model": "Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz",
"speed": 3319,
"user": 6523000,
"nice": 2900,
"sys": 175000,
"idle": 23912800,
"irq": 0
},
{
"model": "Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz",
"speed": 3337,
"user": 2483500,
"nice": 3700,
"sys": 178700,
"idle": 27930000,
"irq": 0
},
{
"model": "Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz",
"speed": 3410,
"user": 5565500,
"nice": 6600,
"sys": 200500,
"idle": 24842600,
"irq": 0
},
{
"model": "Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz",
"speed": 3923,
"user": 3523000,
"nice": 4000,
"sys": 190400,
"idle": 26895300,
"irq": 0
},
{
"model": "Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz",
"speed": 3439,
"user": 3984400,
"nice": 2100,
"sys": 196200,
"idle": 26412800,
"irq": 0
},
{
"model": "Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz",
"speed": 3922,
"user": 3893800,
"nice": 4900,
"sys": 177900,
"idle": 26527000,
"irq": 0
},
{
"model": "Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz",
"speed": 3922,
"user": 3990100,
"nice": 4800,
"sys": 179900,
"idle": 26416500,
"irq": 0
},
{
"model": "Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz",
"speed": 3538,
"user": 2786600,
"nice": 4000,
"sys": 187400,
"idle": 27570700,
"irq": 0
},
{
"model": "Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz",
"speed": 3759,
"user": 2335400,
"nice": 2400,
"sys": 190500,
"idle": 28045000,
"irq": 0
},
{
"model": "Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz",
"speed": 3436,
"user": 3925900,
"nice": 2400,
"sys": 201400,
"idle": 26371700,
"irq": 0
}
],
"networkInterfaces": [
{
"name": "lo",
"internal": true,
"mac": "00:00:00:00:00:00",
"address": "127.0.0.1",
"netmask": "255.0.0.0",
"family": "IPv4"
},
{
"name": "wlp59s0",
"internal": false,
"mac": "9c:b6:d0:bd:db:cd",
"address": "10.22.46.71",
"netmask": "255.255.240.0",
"family": "IPv4"
},
{
"name": "br-76dd0b077b0e",
"internal": false,
"mac": "02:42:f3:f5:c0:12",
"address": "172.18.0.1",
"netmask": "255.255.0.0",
"family": "IPv4"
},
{
"name": "lo",
"internal": true,
"mac": "00:00:00:00:00:00",
"address": "::1",
"netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
"family": "IPv6",
"scopeid": 0
},
{
"name": "wlp59s0",
"internal": false,
"mac": "9c:b6:d0:bd:db:cd",
"address": "fe80::d9b6:b17c:2f03:5f09",
"netmask": "ffff:ffff:ffff:ffff::",
"family": "IPv6",
"scopeid": 3
},
{
"name": "br-76dd0b077b0e",
"internal": false,
"mac": "02:42:f3:f5:c0:12",
"address": "fe80::42:f3ff:fef5:c012",
"netmask": "ffff:ffff:ffff:ffff::",
"family": "IPv6",
"scopeid": 5
},
{
"name": "veth898b55c",
"internal": false,
"mac": "76:e8:2c:11:f4:9e",
"address": "fe80::74e8:2cff:fe11:f49e",
"netmask": "ffff:ffff:ffff:ffff::",
"family": "IPv6",
"scopeid": 7
}
],
"host": "cyril-XPS-15-9570"
},
"javascriptStack": {
"message": "No stack.",
"stack": [
"Unavailable."
]
},
"nativeStack": [
{
"pc": "0x0000000000bd0505",
"symbol": "report::TriggerNodeReport(v8::Isolate*, node::Environment*, char const*, char const*, std::string const&, v8::Local<v8::String>) [ng serve]"
},
{
"pc": "0x0000000000a9f86c",
"symbol": "node::OnFatalError(char const*, char const*) [ng serve]"
},
{
"pc": "0x0000000000c0772e",
"symbol": "v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [ng serve]"
},
{
"pc": "0x0000000000c07aa9",
"symbol": "v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [ng serve]"
},
{
"pc": "0x0000000000db5fb5",
"symbol": " [ng serve]"
},
{
"pc": "0x0000000000db6646",
"symbol": "v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [ng serve]"
},
{
"pc": "0x0000000000dc4eb9",
"symbol": "v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [ng serve]"
},
{
"pc": "0x0000000000dc5cf5",
"symbol": "v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [ng serve]"
},
{
"pc": "0x0000000000dc87cc",
"symbol": "v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [ng serve]"
},
{
"pc": "0x0000000000d8f3a4",
"symbol": "v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [ng serve]"
},
{
"pc": "0x00000000010dc6ce",
"symbol": "v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [ng serve]"
},
{
"pc": "0x000000000145ce19",
"symbol": " [ng serve]"
}
],
"javascriptHeap": {
"totalMemory": 17866625024,
"totalCommittedMemory": 17863663600,
"usedMemory": 17695760304,
"availableMemory": 41901480,
"memoryLimit": 17876123648,
"heapSpaces": {
"read_only_space": {
"memorySize": 262144,
"committedMemory": 33328,
"capacity": 33040,
"used": 33040,
"available": 0
},
"new_space": {
"memorySize": 33554432,
"committedMemory": 31458024,
"capacity": 16758784,
"used": 1188832,
"available": 15569952
},
"old_space": {
"memorySize": 16452034560,
"committedMemory": 16451607848,
"capacity": 16336927808,
"used": 16336853688,
"available": 74120
},
"code_space": {
"memorySize": 3837952,
"committedMemory": 3736544,
"capacity": 3224704,
"used": 3224704,
"available": 0
},
"map_space": {
"memorySize": 26742784,
"committedMemory": 26634704,
"capacity": 4732880,
"used": 4732880,
"available": 0
},
"large_object_space": {
"memorySize": 1349570560,
"committedMemory": 1349570560,
"capacity": 1349182616,
"used": 1349182616,
"available": 0
},
"code_large_object_space": {
"memorySize": 622592,
"committedMemory": 622592,
"capacity": 544544,
"used": 544544,
"available": 0
},
"new_large_object_space": {
"memorySize": 0,
"committedMemory": 0,
"capacity": 16758784,
"used": 0,
"available": 16758784
}
}
},
"resourceUsage": {
"userCpuSeconds": 3570.78,
"kernelCpuSeconds": 23.3403,
"cpuConsumptionPercent": 160.524,
"maxRss": 18407518208,
"pageFaults": {
"IORequired": 258,
"IONotRequired": 11956074
},
"fsActivity": {
"reads": 394776,
"writes": 16
}
},
"uvthreadResourceUsage": {
"userCpuSeconds": 2169.15,
"kernelCpuSeconds": 11.8079,
"cpuConsumptionPercent": 97.4075,
"fsActivity": {
"reads": 388288,
"writes": 16
}
},
"libuv": [
],
"environmentVariables": {
"CLUTTER_IM_MODULE": "xim",
"LS_COLORS": "rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:",
"LC_MEASUREMENT": "fr_FR.UTF-8",
"LESSCLOSE": "/usr/bin/lesspipe %s %s",
"LC_PAPER": "fr_FR.UTF-8",
"LC_MONETARY": "fr_FR.UTF-8",
"XDG_MENU_PREFIX": "gnome-",
"LANG": "en_US.UTF-8",
"DISPLAY": ":0",
"NODE_OPTIONS": "--max-old-space-size=17000",
"OLDPWD": "/home/gokan/projects",
"GNOME_SHELL_SESSION_MODE": "ubuntu",
"MAVEN_HOME": "/opt/maven/apache-maven-3.6.3",
"COLORTERM": "truecolor",
"USERNAME": "gokan",
"JAVA_HOME": "/opt/java/jdk1.8.0_241",
"XDG_VTNR": "2",
"SSH_AUTH_SOCK": "/run/user/1001/keyring/ssh",
"LC_NAME": "fr_FR.UTF-8",
"XDG_SESSION_ID": "2",
"USER": "gokan",
"DESKTOP_SESSION": "ubuntu",
"QT4_IM_MODULE": "xim",
"TEXTDOMAINDIR": "/usr/share/locale/",
"GNOME_TERMINAL_SCREEN": "/org/gnome/Terminal/screen/39c51915_ab7c_46f4_9a94_587514984954",
"PWD": "/home/gokan/projects/kiss/wdm-frontend",
"HOME": "/home/gokan",
"TEXTDOMAIN": "im-config",
"SSH_AGENT_PID": "2488",
"__GIT_PROMPT_SHOW_UNTRACKED_FILES": "",
"QT_ACCESSIBILITY": "1",
"XDG_SESSION_TYPE": "x11",
"XDG_DATA_DIRS": "/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop",
"XDG_SESSION_DESKTOP": "ubuntu",
"LC_ADDRESS": "fr_FR.UTF-8",
"GJS_DEBUG_OUTPUT": "stderr",
"LC_NUMERIC": "fr_FR.UTF-8",
"GTK_MODULES": "gail:atk-bridge",
"WINDOWPATH": "2",
"VTE_VERSION": "5202",
"TERM": "xterm-256color",
"SHELL": "/bin/bash",
"QT_IM_MODULE": "xim",
"XMODIFIERS": "@im=ibus",
"IM_CONFIG_PHASE": "2",
"XDG_CURRENT_DESKTOP": "ubuntu:GNOME",
"GPG_AGENT_INFO": "/run/user/1001/gnupg/S.gpg-agent:0:1",
"GNOME_TERMINAL_SERVICE": ":1.68",
"XDG_SEAT": "seat0",
"SHLVL": "1",
"GIT_BRANCH": "develop",
"LC_TELEPHONE": "fr_FR.UTF-8",
"GDMSESSION": "ubuntu",
"GNOME_DESKTOP_SESSION_ID": "this-is-deprecated",
"LOGNAME": "gokan",
"DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/1001/bus",
"XDG_RUNTIME_DIR": "/run/user/1001",
"XAUTHORITY": "/run/user/1001/gdm/Xauthority",
"XDG_CONFIG_DIRS": "/etc/xdg/xdg-ubuntu:/etc/xdg",
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/maven/apache-maven-3.6.3/bin:/opt/java/jdk1.8.0_241/bin",
"LC_IDENTIFICATION": "fr_FR.UTF-8",
"GJS_DEBUG_TOPICS": "JS ERROR;JS LOG",
"SESSION_MANAGER": "local/cyril-XPS-15-9570:@/tmp/.ICE-unix/2393,unix/cyril-XPS-15-9570:/tmp/.ICE-unix/2393",
"LESSOPEN": "| /usr/bin/lesspipe %s",
"GTK_IM_MODULE": "ibus",
"LC_TIME": "fr_FR.UTF-8",
"_": "/usr/local/bin/ng",
"BROWSERSLIST_IGNORE_OLD_DATA": "1",
"WEBPACK_DEV_SERVER": "true"
},
"userLimits": {
"core_file_size_blocks": {
"soft": 0,
"hard": "unlimited"
},
"data_seg_size_kbytes": {
"soft": "unlimited",
"hard": "unlimited"
},
"file_size_blocks": {
"soft": "unlimited",
"hard": "unlimited"
},
"max_locked_memory_bytes": {
"soft": 16777216,
"hard": 16777216
},
"max_memory_size_kbytes": {
"soft": "unlimited",
"hard": "unlimited"
},
"open_files": {
"soft": 4096,
"hard": 4096
},
"stack_size_bytes": {
"soft": 8388608,
"hard": "unlimited"
},
"cpu_time_seconds": {
"soft": "unlimited",
"hard": "unlimited"
},
"max_user_processes": {
"soft": 126765,
"hard": 126765
},
"virtual_memory_kbytes": {
"soft": "unlimited",
"hard": "unlimited"
}
},
"sharedObjects": [
"linux-vdso.so.1",
"/lib/x86_64-linux-gnu/libdl.so.2",
"/usr/lib/x86_64-linux-gnu/libstdc++.so.6",
"/lib/x86_64-linux-gnu/libm.so.6",
"/lib/x86_64-linux-gnu/libgcc_s.so.1",
"/lib/x86_64-linux-gnu/libpthread.so.0",
"/lib/x86_64-linux-gnu/libc.so.6",
"/lib64/ld-linux-x86-64.so.2",
"/lib/x86_64-linux-gnu/libnss_files.so.2"
]
}
Softwares
- Node: 13.8.0
- NPM: 6.13.7
- ng version:
Angular CLI: 8.3.24
Node: 13.8.0
OS: linux x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.803.24
@angular-devkit/build-angular 0.803.24
@angular-devkit/build-optimizer 0.803.24
@angular-devkit/build-webpack 0.803.24
@angular-devkit/core 8.3.24
@angular-devkit/schematics 8.3.24
@angular/cdk 8.0.0
@angular/cli 8.3.24
@angular/flex-layout 8.0.0-beta.27
@angular/material 8.0.0
@ngtools/webpack 8.3.24
@schematics/angular 8.3.24
@schematics/update 0.803.24
rxjs 6.5.4
typescript 3.5.3
webpack 4.39.2
My computer
- OS: Ubuntu 18.04.4 LTS (64 bit)
- Memory: 31,0 GiB
- Processor: Intel® Core™ i9-8950HK CPU @ 2.90GHz × 12
jkubiszewski
Metadata
Metadata
Assignees
Labels
needs: more infoReporter must clarify the issueReporter must clarify the issue