Closed codelife closed 10 months ago
Are you using the CLI version of pyright? The VS Code extension? The language server?
If you're using the CLI or the language server, which version of node do you have installed? Please make sure it's relatively recent.
If it's the language server, is there a particular source file that seems to result in this error?
In your config file (your "pyrightconfig.json" or "pyproject.toml") set "verboseOutput" to true. That may provide additional clues about what's happening.
ps aux |grep pyright
test 89737 154.0 11.0 411580896 1844240 ?? Rs 3:23PM 0:17.13 node /Users/test/.local/share/lvim/mason/bin/pyright-langserver --stdio
test 89888 0.0 0.0 408499936 1024 s002 R+ 3:23PM 0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox pyright
node --version
v18.8.0
I use manson the lsp manager to install pyright;
I have added verboseOutput : true to pyrightconfig.json. but the lsp log no show more detail;
[ERROR][2023-12-14 15:24:09] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "\n<--- Last few GCs --->\n\n[89737:0x138078000] 65760 ms: Mark-sweep (reduce) 4037.8 (4143.5) -> 4036.5 (4143.2) MB, 2546.5 / 0.0 ms (average mu = 0.102, current mu = 0.002) allocation failure; scavenge might not succeed\n[89737:0x138078000] 67748 ms: Mark-sweep (reduce) 4038.0 (4143.2) -> 4036.7 (4143.5) MB, 1985.6 / 0.0 ms (average mu = 0.057, current mu = 0.001) allocation failure; scavenge might not succeed\n\n\n<--- JS stacktrace --->\n\nFATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory\n"
[ERROR][2023-12-14 15:24:09] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" " 1: 0x1010ab080 node::Abort() [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-14 15:24:09] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" " 2: 0x1010ac474 node::OOMErrorHandler(char const, bool) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-14 15:24:09] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" " 3: 0x1011fb6d8 v8::Utils::ReportOOMFailure(v8::internal::Isolate, char const, bool) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-14 15:24:09] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" " 4: 0x1011fb684 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, bool) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-14 15:24:09] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" " 5: 0x10136b36c v8::internal::TimedHistogramScope& v8::base::Optional
-- LunarVim use pyright as default lsp for python, disable default settings;
vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "pyright" })
local pyright_opts = {
single_file_support = true,
settings = {
pyright = {
disableLanguageServices = false,
disableOrganizeImports = false
},
python = {
analysis = {
autoImportCompletions = true,
autoSearchPaths = true,
diagnosticMode = "openFilesOnly", -- openFilesOnly, workspace
typeCheckingMode = "standard", -- off, basic, strict
useLibraryCodeForTypes = true
}
}
},
}
require("lvim.lsp.manager").setup("pyright", pyright_opts)
after i use these lsp pyright setting, everything work fine;
I have added verboseOutput : true to pyrightconfig.json. but the lsp log no show more detail;
I'm not looking for the lsp log. I'm looking for the log output from pyright. In VS Code, this appears in the "Output" tab. I don't know where it appears in the environment you're using.
I use manson the lsp manager to install pyright;
I'm not familiar with that.
If you'd like me to investigate further, I'll need additional details — ideally a repro within VS Code.
If you're only able to repro only with a specific editor or LSP manager, you may need to debug the issue yourself or get help from the maintainers of those LSP managers.
Sounds like you've figured out how to fix the issue, so I'm going to close the issue.
python==3.9.14 pyright == 1.1.340 neovim == 0.9.0 django==3.2.18
pyright get exit because oom, recently the the code repository add some azure module and using this module, then encounter this problem, but when I open another repos not use these modules without change virtualenv. everthing is work well. any ideas -------------------recently add module------------------------- azure-common==1.1.28 azure-core==1.29.5 azure-identity==1.12.0 azure-mgmt-authorization==3.0.0 azure-mgmt-billing==6.0.0 azure-mgmt-compute==29.1.0 azure-mgmt-containerservice==27.0.0 azure-mgmt-core==1.3.2 azure-mgmt-cosmosdb==10.0.0b1 azure-mgmt-network==23.0.0 azure-mgmt-rdbms==10.2.0b12 azure-mgmt-redis==14.3.0 azure-mgmt-resource==23.0.0 azure-mgmt-sql==4.0.0b13 azure-mgmt-storage==21.1.0 azure-nspkg==3.0.2 azure-storage-blob==12.19.0 ---------------other module in using before oom problem---------------------- boto3==1.28.18 boto3-stubs==1.28.2 botocore==1.31.18 botocore-stubs==1.31.18 mypy-boto3-apigateway==1.28.16 mypy-boto3-cloudformation==1.28.16 mypy-boto3-ecr==1.28.16 mypy-boto3-iam==1.28.16 mypy-boto3-lambda==1.28.16 mypy-boto3-s3==1.28.16 mypy-boto3-schemas==1.28.16 mypy-boto3-secretsmanager==1.28.16 mypy-boto3-signer==1.28.16 mypy-boto3-stepfunctions==1.28.16 mypy-boto3-sts==1.28.16 mypy-boto3-xray==1.28.16
this is lsp.log: [ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "\n<--- Last few GCs --->\n\n[90054:0x120040000] 87044 ms: Mark-sweep 4027.1 (4139.1) -> 4019.7 (4139.9) MB, 1361.0 / 0.0 ms (average mu = 0.126, current mu = 0.005) allocation failure; scavenge might not succeed\n[90054:0x120040000] 88413 ms: Mark-sweep 4028.7 (4140.6) -> 4020.6 (4141.4) MB, 1348.6 / 0.0 ms (average mu = 0.074, current mu = 0.015) allocation failure; scavenge might not succeed\n\n\n<--- JS stacktrace --->\n\nFATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory\n" [ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" " 1: 0x102a4b080 node::Abort() [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n" [ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" " 2: 0x102a4c474 node::OOMErrorHandler(char const, bool) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n" [ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" " 3: 0x102b9b6d8 v8::Utils::ReportOOMFailure(v8::internal::Isolate, char const, bool) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n" [ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" " 4: 0x102b9b684 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, bool) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n" [ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" " 5: 0x102d0b36c v8::internal::TimedHistogramScope& v8::base::Optional::emplace<v8::internal::TimedHistogram &, v8::internal::Isolate&>(v8::internal::TimedHistogram&, v8::internal::Isolate&) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" " 6: 0x102d0daac v8::internal::Heap::ComputeMutatorUtilization(char const, double, double) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" " 7: 0x102d0bb48 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const, v8::GCCallbackFlags) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" " 8: 0x102d09924 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" " 9: 0x102cff970 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "10: 0x102d0013c v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "11: 0x102cea0e4 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "12: 0x102fd70f0 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long, v8::internal::Isolate) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "13: 0x1028b504c Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "14: 0x1028422d0 Builtins_GrowFastSmiOrObjectElements [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "15: 0x10a699788 \n16: 0x10b04a898 \n17: 0x10a6a8954 \n18: 0x10af72c98 \n19: 0x109d17890 \n20: 0x10a70c754 \n21: 0x10a70c92c \n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "22: 0x109be7b28 \n23: 0x10a70ce88 \n24: 0x10a70d74c \n25: 0x10b0b6898 \n26: 0x10a70850c \n27: 0x10a8638dc \n28: 0x10aa1260c \n29: 0x109d28d8c \n30: 0x109be7aa4 \n31: 0x10a84ef60 \n32: 0x109bf1bdc \n33: 0x109ce8818 \n34: 0x10a095344 \n35: 0x10af8a95c \n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "36: 0x109c0d5dc \n37: 0x109da6288 \n38: 0x109d15da0 \n39: 0x109de6468 \n40: 0x10aa3124c \n41: 0x10a6b4338 \n42: 0x10a0944f8 \n43: 0x109e56960 \n44: 0x109e49b70 \n45: 0x109cb1978 \n46: 0x10af8a2f4 \n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "47: 0x10abf6690 \n48: 0x10abed980 \n49: 0x10a68de84 \n50: 0x109c0d5dc \n51: 0x109da6288 \n52: 0x10a0081a0 \n53: 0x109da5e28 \n54: 0x10aa3635c \n55: 0x10ae0ba98 \n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "56: 0x109be7aa4 \n57: 0x10aeaf7b4 \n58: 0x10a87b120 \n59: 0x109d2a330 \n60: 0x10b01dc40 \n61: 0x10a060848 \n62: 0x10a87b26c \n63: 0x109d2a330 \n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "64: 0x10ae21758 \n65: 0x10a87b1d8 \n66: 0x10b01d978 \n67: 0x10a060848 \n68: 0x10ae1031c \n69: 0x109d2a330 \n70: 0x10abddf5c \n71: 0x10ae101f8 \n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "72: 0x10b01d978 \n73: 0x10aefaca4 \n74: 0x10abe2a44 \n75: 0x109be7b28 \n76: 0x10a713188 \n77: 0x10a7270c4 \n78: 0x10abe1624 \n79: 0x10aef6e28 \n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "80: 0x10a7270c4 \n81: 0x10abdda5c \n82: 0x10a73ad14 \n83: 0x10aef3afc \n84: 0x109be7aa4 \n85: 0x10a019584 \n86: 0x10aa1c7e4 \n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "87: 0x109d0e078 \n88: 0x10aa16334 \n89: 0x109d2c0b4 \n90: 0x109d36ca8 \n91: 0x10aee78ec \n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "92: 0x10283e4d0 Builtins_JSEntryTrampoline [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "93: 0x10283e164 Builtins_JSEntry [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "94: 0x102ca1e18 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate, v8::internal::(anonymous namespace)::InvokeParams const&) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "95: 0x102ca1304 v8::internal::Execution::Call(v8::internal::Isolate, v8::internal::Handle, v8::internal::Handle, int, v8::internal::Handle ) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "96: 0x102bb1adc v8::Function::Call(v8::Local, v8::Local, int, v8::Local) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "97: 0x1029f57c8 node::Environment::RunTimers(uv_timer_s) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "98: 0x105303958 uv__run_timers [/opt/homebrew/Cellar/libuv/1.44.2/lib/libuv.1.dylib]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "99: 0x105306768 uv_run [/opt/homebrew/Cellar/libuv/1.44.2/lib/libuv.1.dylib]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "100: 0x102981878 node::SpinEventLoop(node::Environment) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "101: 0x102a88460 node::NodeMainInstance::Run(int, node::Environment*) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "102: 0x102a880b4 node::NodeMainInstance::Run() [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "103: 0x102a15e94 node::LoadSnapshotDataAndRun(node::SnapshotData const*, node::InitializationResult) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "104: 0x102a15f84 node::Start(int, char**) [/opt/homebrew/Cellar/node/18.8.0_1/bin/node]\n"
[ERROR][2023-12-13 17:04:37] .../vim/lsp/rpc.lua:734 "rpc" "pyright-langserver" "stderr" "105: 0x18bef90e0 start [/usr/lib/dyld]\n"