MaskRay / vscode-ccls

ccls plugin for Visual Studio Code
123 stars 37 forks source link

Allocation failed - JavaScript heap out of memory #84

Closed Abbyyan closed 4 years ago

Abbyyan commented 4 years ago

I use vscode-ssh in the remote linux server and it generates a lot of json files which names like report.20191122.194115.9447.0.001.json. Here's the content:


{
  "header": {
    "event": "Allocation failed - JavaScript heap out of memory",
    "trigger": "FatalError",
    "filename": "report.20191122.194115.9447.0.001.json",
    "dumpEventTime": "2019-11-22T19:41:15Z",
    "dumpEventTimeStamp": "1574422875465",
    "processId": 9447,
    "cwd": "/data/home/abby",
    "commandLine": [
      "/data/home/abby/.vscode-server/bin/8795a9889db74563ddd43eb0a897a2384129a619/node",
      "/data/home/abby/.vscode-server/bin/8795a9889db74563ddd43eb0a897a2384129a619/out/bootstrap-fork",
      "--type=watcherService"
    ],
    "nodejsVersion": "v12.4.0",
    "glibcVersionRuntime": "2.17",
    "glibcVersionCompiler": "2.17",
    "wordSize": 64,
    "arch": "x64",
    "platform": "linux",
    "componentVersions": {
      "node": "12.4.0",
      "v8": "7.4.288.27-node.18",
      "uv": "1.29.1",
      "zlib": "1.2.11",
      "brotli": "1.0.7",
      "ares": "1.15.0",
      "modules": "72",
      "nghttp2": "1.38.0",
      "napi": "4",
      "llhttp": "1.1.3",
      "http_parser": "2.8.0",
      "openssl": "1.1.1b",
      "cldr": "35.1",
      "icu": "64.2",
      "tz": "2019a",
      "unicode": "12.1"
    },
    "release": {
      "name": "node",
      "headersUrl": "https://nodejs.org/download/release/v12.4.0/node-v12.4.0-headers.tar.gz",
      "sourceUrl": "https://nodejs.org/download/release/v12.4.0/node-v12.4.0.tar.gz"
    },
    "osName": "Linux",
    "osRelease": "3.10.107-1-linux2_kvm_guest-0049",
    "osVersion": "#1 SMP Tue Jul 30 23:46:29 CST 2019",
    "osMachine": "x86_64",
    "host": "VM_32_60_centos"
  },
  "javascriptStack": {
    "message": "No stack.",
    "stack": [
      "Unavailable."
    ]
  },
  "nativeStack": [
    {
      "pc": "0x0000000000aadaf5",
      "symbol": "report::TriggerNodeReport(v8::Isolate*, node::Environment*, char const*, char const*, std::string const&, v8::Local<v8::String>) [/data/home/abby/.vscode-server/bin/8795a9889db74563ddd43eb0a897a2384129a619/node]"
    },
    {
      "pc": "0x000000000098fec3",
      "symbol": "node::OnFatalError(char const*, char const*) [/data/home/abby/.vscode-server/bin/8795a9889db74563ddd43eb0a897a2384129a619/node]"
    },
    {
      "pc": "0x0000000000b1552e",
      "symbol": "v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/data/home/abby/.vscode-server/bin/8795a9889db74563ddd43eb0a897a2384129a619/node]"
    },
    {
      "pc": "0x0000000000b158a9",
      "symbol": "v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/data/home/abby/.vscode-server/bin/8795a9889db74563ddd43eb0a897a2384129a619/node]"
    },
    {
      "pc": "0x0000000000f20105",
      "symbol": " [/data/home/abby/.vscode-server/bin/8795a9889db74563ddd43eb0a897a2384129a619/node]"
    },
    {
      "pc": "0x0000000000f2aa6b",
      "symbol": "v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/data/home/abby/.vscode-server/bin/8795a9889db74563ddd43eb0a897a2384129a619/node]"
    },
    {
      "pc": "0x0000000000f2b787",
      "symbol": "v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/data/home/abby/.vscode-server/bin/8795a9889db74563ddd43eb0a897a2384129a619/node]"
    },
    {
      "pc": "0x0000000000f2e225",
      "symbol": "v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [/data/home/abby/.vscode-server/bin/8795a9889db74563ddd43eb0a897a2384129a619/node]"
    },
    {
      "pc": "0x0000000000ef9250",
      "symbol": "v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [/data/home/abby/.vscode-server/bin/8795a9889db74563ddd43eb0a897a2384129a619/node]"
    },
    {
      "pc": "0x00000000011cb0ce",
      "symbol": "v8::internal::Runtime_AllocateInNewSpace(int, unsigned long*, v8::internal::Isolate*) [/data/home/abby/.vscode-server/bin/8795a9889db74563ddd43eb0a897a2384129a619/node]"
    },
    {
      "pc": "0x0000000001a93942",
      "symbol": " [/data/home/abby/.vscode-server/bin/8795a9889db74563ddd43eb0a897a2384129a619/node]"
    }
  ],
  "javascriptHeap": {
    "totalMemory": 2129354752,
    "totalCommittedMemory": 2127501712,
    "usedMemory": 2080850144,
    "availableMemory": 72243120,
    "memoryLimit": 2197815296,
    "heapSpaces": {
      "read_only_space": {
        "memorySize": 524288,
        "committedMemory": 32024,
        "capacity": 523976,
        "used": 31712,
        "available": 492264
      },
      "new_space": {
        "memorySize": 2097152,
        "committedMemory": 1341584,
        "capacity": 1047952,
        "used": 292480,
        "available": 755472
      },
      "old_space": {
        "memorySize": 2095177728,
        "committedMemory": 2094618344,
        "capacity": 2050843264,
        "used": 2049356376,
        "available": 1486888
      },
      "code_space": {
        "memorySize": 688128,
        "committedMemory": 676864,
        "capacity": 542688,
        "used": 542688,
        "available": 0
      },
      "map_space": {
        "memorySize": 528384,
        "committedMemory": 493824,
        "capacity": 345680,
        "used": 345680,
        "available": 0
      },
      "large_object_space": {
        "memorySize": 30289920,
        "committedMemory": 30289920,
        "capacity": 30277752,
        "used": 30277752,
        "available": 0
      },
      "code_large_object_space": {
        "memorySize": 49152,
        "committedMemory": 49152,
        "capacity": 3456,
        "used": 3456,
        "available": 0
      },
      "new_large_object_space": {
        "memorySize": 0,
        "committedMemory": 0,
        "capacity": 1047952,
        "used": 0,
        "available": 1047952
      }
    }
  },
  "resourceUsage": {
    "userCpuSeconds": 258.22,
    "kernelCpuSeconds": 35.516,
    "cpuConsumptionPercent": 185.909,
    "maxRss": 2912759808,
    "pageFaults": {
      "IORequired": 0,
      "IONotRequired": 2091774
    },
    "fsActivity": {
      "reads": 0,
      "writes": 8
    }
  },
  "uvthreadResourceUsage": {
    "userCpuSeconds": 107.964,
    "kernelCpuSeconds": 14.812,
    "cpuConsumptionPercent": 77.7063,
    "fsActivity": {
      "reads": 0,
      "writes": 8
    }
  },
  "libuv": [
  ],
  "environmentVariables": {
    "XDG_SESSION_ID": "4080",
    "SHELL": "/bin/bash",
    "SSH_CLIENT": "10.9.170.39 49773 36000",
    "USER": "abby",
    "VSCODE_AGENT_FOLDER": "/data/home/abby/.vscode-server",
    "MAIL": "/var/mail/abby",
    "PATH": "/data/home/abby/.vscode-server/bin/8795a9889db74563ddd43eb0a897a2384129a619/bin:/usr/local/bin:/usr/bin",
    "PWD": "/data/home/abby",
    "TST_HACK_BASH_SESSION_ID": "5108290535700",
    "LANG": "zh_CN.UTF-8",
    "SHLVL": "3",
    "HOME": "/data/home/abby",
    "LOGNAME": "abby",
    "CVS_RSH": "ssh",
    "SSH_CONNECTION": "xx.xx.170.33 49773 xx.xx.xx.60 36000",
    "LESSOPEN": "||/usr/bin/lesspipe.sh %s",
    "XDG_RUNTIME_DIR": "/run/user/1000",
    "_": "/data/home/abby/.vscode-server/bin/8795a9889db74563ddd43eb0a897a2384129a619/node",
    "VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH": "/data/home/abby/.vscode-server/bin/8795a9889db74563ddd43eb0a897a2384129a619/remote/node_modules",
    "VSCODE_LOGS": "/data/home/abby/.vscode-server/data/logs/20191122T190556",
    "VSCODE_PARENT_PID": "1229",
    "AMD_ENTRYPOINT": "vs/platform/files/node/watcher/unix/watcherApp",
    "PIPE_LOGGING": "true",
    "VERBOSE_LOGGING": "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": 65536,
      "hard": 65536
    },
    "max_memory_size_kbytes": {
      "soft": "unlimited",
      "hard": "unlimited"
    },
    "open_files": {
      "soft": 1000000,
      "hard": 1000000
    },
    "stack_size_bytes": {
      "soft": 8388608,
      "hard": "unlimited"
    },
    "cpu_time_seconds": {
      "soft": "unlimited",
      "hard": "unlimited"
    },
    "max_user_processes": {
      "soft": 63068,
      "hard": 63068
    },
    "virtual_memory_kbytes": {
      "soft": "unlimited",
      "hard": "unlimited"
    }
  },
  "sharedObjects": [
    "/lib64/libonion.so",
    "/lib64/libdl.so.2",
    "/lib64/librt.so.1",
    "/lib64/libstdc++.so.6",
    "/lib64/libm.so.6",
    "/lib64/libgcc_s.so.1",
    "/lib64/libpthread.so.0",
    "/lib64/libc.so.6",
    "/lib64/ld-linux-x86-64.so.2"
  ]
}

Can you help me with that ? Thanks a lot.

Abbyyan commented 4 years ago

close this issue. I've found it because the project i opened is too large.

"files.watcherExclude": {
        "**": true
   }, # out of memory , https://github.com/microsoft/vscode/issues/3998,