pylance-release
pylance-release copied to clipboard
High memory consumption and sluggish response in UI
FROM: D D
Runs horribly, consumes all memory and crashes. Besides, it works very slowly, hints for the code load for several dozens of seconds.
D D, sorry you are seeing this issue. We have had reports of memory consumption issues and are actively looking at it. Could you help us by sending us your Pylance logs when you see this problem? The the troubleshooting guide has the instructions for collecting the logs.
Thanks
I am experiencing this issue, here are the logs:
2024-04-25 11:39:44.963 [info] (Client) Pylance async client (2024.4.1) started with python extension (2024.4.1)
2024-04-25 11:39:45.569 [info] [Info - 11:39:45] (71959) Pylance language server 2024.4.1 (pyright version 1.1.356, commit 6652c4a8) starting
2024-04-25 11:39:45.569 [info] [Info - 11:39:45] (71959) Server root directory: file:///home/jgalar/.vscode/extensions/ms-python.vscode-pylance-2024.4.1/dist
2024-04-25 11:39:45.576 [info] [Info - 11:39:45] (71959) Starting service instance "lttng-tools"
2024-04-25 11:39:45.606 [info] (71959) No configuration file found.
2024-04-25 11:39:45.606 [info] (71959) pyproject.toml file found at /home/jgalar/EfficiOS/src/lttng-tools.
2024-04-25 11:39:45.607 [info] [Info - 11:39:45] (71959) Setting pythonPath for service "lttng-tools": "/usr/bin/python"
2024-04-25 11:39:45.607 [info] [Info - 11:39:45] (71959) Setting environmentName for service "lttng-tools": "3.11.8 (global)"
2024-04-25 11:39:45.609 [info] [Info - 11:39:45] (71959) Loading pyproject.toml file at /home/jgalar/EfficiOS/src/lttng-tools/pyproject.toml
2024-04-25 11:39:45.611 [info] [Info - 11:39:45] (71959) Pyproject file "/home/jgalar/EfficiOS/src/lttng-tools/pyproject.toml" has no "[tool.pyright]" section.
2024-04-25 11:39:45.638 [info] [Info - 11:39:45] (71959) Assuming Python version 3.11.8.final.0
2024-04-25 11:39:45.638 [info] (71959) Assuming Python platform Linux
2024-04-25 11:39:45.717 [info] [Info - 11:39:45] (71959) Search paths for file:///home/jgalar/EfficiOS/src/lttng-tools
2024-04-25 11:39:45.717 [info] [Info - 11:39:45] (71959) /home/jgalar/.vscode/extensions/ms-python.vscode-pylance-2024.4.1/dist/typeshed-fallback/stdlib
2024-04-25 11:39:45.717 [info] [Info - 11:39:45] (71959) /home/jgalar/EfficiOS/src/lttng-tools
2024-04-25 11:39:45.717 [info] [Info - 11:39:45] (71959) /home/jgalar/EfficiOS/src/lttng-tools/src
2024-04-25 11:39:45.717 [info] [Info - 11:39:45] (71959) /usr/lib/python3.8/site-packages
2024-04-25 11:39:45.717 [info] [Info - 11:39:45] (71959) /home/jgalar/EfficiOS/src/lttng-tools/typings
2024-04-25 11:39:45.717 [info] [Info - 11:39:45] (71959) /home/jgalar/.vscode/extensions/ms-python.vscode-pylance-2024.4.1/dist/typeshed-fallback/stubs/...
2024-04-25 11:39:45.717 [info] [Info - 11:39:45] (71959) /home/jgalar/.vscode/extensions/ms-python.vscode-pylance-2024.4.1/dist/bundled/stubs
2024-04-25 11:39:45.718 [info] [Info - 11:39:45] (71959) /usr/lib/python3.11
2024-04-25 11:39:45.718 [info] [Info - 11:39:45] (71959) /usr/lib/python3.11/lib-dynload
2024-04-25 11:39:45.718 [info] [Info - 11:39:45] (71959) /usr/lib/python3.11/site-packages
2024-04-25 11:39:45.718 [info] [Info - 11:39:45] (71959) /usr/lib/python3.11/site-packages/bt2-2.1.0rc1-py3.11-linux-x86_64.egg
2024-04-25 11:39:45.718 [info] [Info - 11:39:45] (71959) Adding fs watcher for library directories:
file:///usr/lib/python3.11
file:///usr/lib/python3.11/lib-dynload
file:///usr/lib/python3.11/site-packages
file:///usr/lib/python3.11/site-packages/bt2-2.1.0rc1-py3.11-linux-x86_64.egg
2024-04-25 11:39:45.718 [info] [Info - 11:39:45] (71959) Adding fs watcher for directories:
file:///home/jgalar/EfficiOS/src/lttng-tools
2024-04-25 11:39:45.718 [info] (71959) Searching for source files
2024-04-25 11:39:55.718 [info] [Error - 11:39:55] (71959) Enumeration of workspace source files is taking longer than 10 seconds.
This may be because:
* You have opened your home directory or entire hard drive as a workspace
* Your workspace contains a very large number of directories and files
* Your workspace contains a symlink to a directory with many files
* Your workspace is remote, and file enumeration is slow
To reduce this time, open a workspace directory with fewer files or add a pyrightconfig.json configuration file with an "exclude" section to exclude subdirectories from your workspace. For more details, refer to https://github.com/microsoft/pyright/blob/main/docs/configuration.md.
2024-04-25 11:41:16.908 [info]
<--- Last few GCs --->
[71959:0x1e8400304000] 90445 ms: Scavenge 3931.4 (4068.8) -> 3928.6 (4068.8) MB, 12.79 / 0.00 ms (average mu = 0.998, current mu = 0.997) allocation failure;
[71959:0x1e8400304000] 90478 ms: Scavenge 3931.5 (4068.8) -> 3929.3 (4068.8) MB, 16.22 / 0.00 ms (average mu = 0.998, current mu = 0.997) allocation failure;
[71959:0x1e8400304000] 90509 ms: Scavenge 3931.6 (4068.8) -> 3929.9 (4068.8) MB, 16.69 / 0.00 ms (average mu = 0.998, current mu = 0.997) allocation failure;
<--- JS stacktrace --->
<--- Last few GCs --->
[71959:0x1e8400304000] 90445 ms: Scavenge 3931.4 (4068.8) -> 3928.6 (4068.8) MB, 12.79 / 0.00 ms (average mu = 0.998, current mu = 0.997) allocation failure;
[71959:0x1e8400304000] 90478 ms: Scavenge 3931.5 (4068.8) -> 3929.3 (4068.8) MB, 16.22 / 0.00 ms (average mu = 0.998, current mu = 0.997) allocation failure;
[71959:0x1e8400304000] 90509 ms: Scavenge 3931.6 (4068.8) -> 3929.9 (4068.8) MB, 16.69 / 0.00 ms (average mu = 0.998, current mu = 0.997) allocation failure;
<--- JS stacktrace --->
<--- Last few GCs --->
[71959:0x1e8400304000] 90445 ms: Scavenge 3931.4 (4068.8) -> 3928.6 (4068.8) MB, 12.79 / 0.00 ms (average mu = 0.998, current mu = 0.997) allocation failure;
[71959:0x1e8400304000] 90478 ms: Scavenge 3931.5 (4068.8) -> 3929.3 (4068.8) MB, 16.22 / 0.00 ms (average mu = 0.998, current mu = 0.997) allocation failure;
[71959:0x1e8400304000] 90509 ms: Scavenge 3931.6 (4068.8) -> 3929.9 (4068.8) MB, 16.69 / 0.00 ms (average mu = 0.998, current mu = 0.997) allocation failure;
<--- JS stacktrace --->
<--- Last few GCs --->
[71959:0x1e8400304000] 90445 ms: Scavenge 3931.4 (4068.8) -> 3928.6 (4068.8) MB, 12.79 / 0.00 ms (average mu = 0.998, current mu = 0.997) allocation failure;
[71959:0x1e8400304000] 90478 ms: Scavenge 3931.5 (4068.8) -> 3929.3 (4068.8) MB, 16.22 / 0.00 ms (average mu = 0.998, current mu = 0.997) allocation failure;
[71959:0x1e8400304000] 90509 ms: Scavenge 3931.6 (4068.8) -> 3929.9 (4068.8) MB, 16.69 / 0.00 ms (average mu = 0.998, current mu = 0.997) allocation failure;
<--- JS stacktrace --->
FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory
FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory
FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory
FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory
I have pointed pylance at another node binary, but then it eventually dies using ~13gb with
Stack trace of thread 13862:
#0 0x00007961d66ab32c n/a (libc.so.6 + 0x8d32c)
#1 0x00007961d665a6c8 raise (libc.so.6 + 0x3c6c8)
#2 0x00007961d66424b8 abort (libc.so.6 + 0x244b8)
#3 0x000056e3b1e2abfd n/a (node + 0x82abfd)
#4 0x000056e3b22305e4 _ZN2v85Utils16ReportOOMFailureEPNS_8internal7IsolateEPKcRKNS_10OOMDetailsE (node + 0xc305e4)
#5 0x000056e3b22309db _ZN2v88internal2V823FatalProcessOutOfMemoryEPNS0_7IsolateEPKcRKNS_10OOMDetailsE (node + 0xc309db)
#6 0x000056e3b243c48c _ZN2v88internal4Heap23FatalProcessOutOfMemoryEPKc (node + 0xe3c48c)
#7 0x000056e3b2453b87 _ZN2v88internal4Heap14CollectGarbageENS0_15AllocationSpaceENS0_23GarbageCollectionReasonENS_15GCCallbackFlagsE (node + 0xe53b87)
#8 0x000056e3b2430a80 _ZN2v88internal13HeapAllocator33AllocateRawWithLightRetrySlowPathEiNS0_14AllocationTypeENS0_16AllocationOriginENS0_19AllocationAlignmentE (node + 0xe30a80)
#9 0x000056e3b2431ac9 _ZN2v88internal13HeapAllocator34AllocateRawWithRetryOrFailSlowPathEiNS0_14AllocationTypeENS0_16AllocationOriginENS0_19AllocationAlignmentE (node + 0xe31ac9)
#10 0x000056e3b2413893 _ZN2v88internal7Factory15NewFillerObjectEiNS0_19AllocationAlignmentENS0_14AllocationTypeENS0_16AllocationOriginE (node + 0xe13893)
#11 0x000056e3b27e743a _ZN2v88internal33Runtime_AllocateInYoungGenerationEiPmPNS0_7IsolateE (node + 0x11e743a)
#12 0x000056e352be53f6 n/a (n/a + 0x0)
#13 0x000056e352be5dde n/a (n/a + 0x0)
#14 0x000056e332d6f346 n/a (n/a + 0x0)
#15 0x000056e332d71458 n/a (n/a + 0x0)
#16 0x000056e332e4befc n/a (n/a + 0x0)
I have enabled the logs at the "Trace" level, but I don't get more info in the output window.
Let me know if I can provide more info!
I was intrigued so I took a closer look at the issue.
I captured a system call trace with LTTng and noticed that the node process does this endlessly:
[13:14:26.346057411] (+0.000000524) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS", bufsiz = 1023 }
[13:14:26.346058285] (+0.000000874) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346058924] (+0.000000639) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src", bufsiz = 1023 }
[13:14:26.346059918] (+0.000000994) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346060690] (+0.000000772) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools", bufsiz = 1023 }
[13:14:26.346061878] (+0.000001188) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346062682] (+0.000000804) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc", bufsiz = 1023 }
[13:14:26.346063934] (+0.000001252) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346064797] (+0.000000863) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man", bufsiz = 1023 }
[13:14:26.346066106] (+0.000001309) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346067012] (+0.000000906) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man/man7", bufsiz = 1023 }
[13:14:26.346068579] (+0.000001567) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = 45, buf = 140734091916912 }
[13:14:26.346068923] (+0.000000344) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home", bufsiz = 1023 }
[13:14:26.346069492] (+0.000000569) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346069894] (+0.000000402) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar", bufsiz = 1023 }
[13:14:26.346070593] (+0.000000699) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346071108] (+0.000000515) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS", bufsiz = 1023 }
[13:14:26.346071973] (+0.000000865) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346072612] (+0.000000639) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src", bufsiz = 1023 }
[13:14:26.346073598] (+0.000000986) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346074381] (+0.000000783) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools", bufsiz = 1023 }
[13:14:26.346075564] (+0.000001183) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346076370] (+0.000000806) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc", bufsiz = 1023 }
[13:14:26.346077618] (+0.000001248) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346078468] (+0.000000850) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man", bufsiz = 1023 }
[13:14:26.346079789] (+0.000001321) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346080702] (+0.000000913) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man/man3", bufsiz = 1023 }
[13:14:26.346082266] (+0.000001564) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = 45, buf = 140734091916912 }
[13:14:26.346082604] (+0.000000338) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home", bufsiz = 1023 }
[13:14:26.346083176] (+0.000000572) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346083577] (+0.000000401) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar", bufsiz = 1023 }
[13:14:26.346084269] (+0.000000692) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346084783] (+0.000000514) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS", bufsiz = 1023 }
[13:14:26.346085654] (+0.000000871) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346086292] (+0.000000638) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src", bufsiz = 1023 }
[13:14:26.346087286] (+0.000000994) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346088042] (+0.000000756) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools", bufsiz = 1023 }
[13:14:26.346089301] (+0.000001259) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346090110] (+0.000000809) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc", bufsiz = 1023 }
[13:14:26.346091382] (+0.000001272) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346092240] (+0.000000858) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man", bufsiz = 1023 }
[13:14:26.346093546] (+0.000001306) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346094443] (+0.000000897) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man/man8", bufsiz = 1023 }
[13:14:26.346095994] (+0.000001551) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = 45, buf = 140734091916912 }
[13:14:26.346096332] (+0.000000338) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home", bufsiz = 1023 }
[13:14:26.346096906] (+0.000000574) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346097306] (+0.000000400) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar", bufsiz = 1023 }
[13:14:26.346098006] (+0.000000700) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346098520] (+0.000000514) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS", bufsiz = 1023 }
[13:14:26.346099391] (+0.000000871) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346100029] (+0.000000638) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src", bufsiz = 1023 }
[13:14:26.346101020] (+0.000000991) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346101795] (+0.000000775) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools", bufsiz = 1023 }
[13:14:26.346102969] (+0.000001174) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346103781] (+0.000000812) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc", bufsiz = 1023 }
[13:14:26.346105034] (+0.000001253) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346105900] (+0.000000866) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man", bufsiz = 1023 }
[13:14:26.346107246] (+0.000001346) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346108158] (+0.000000912) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man/man8", bufsiz = 1023 }
[13:14:26.346109709] (+0.000001551) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = 45, buf = 140734091916912 }
[13:14:26.346110057] (+0.000000348) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home", bufsiz = 1023 }
[13:14:26.346110630] (+0.000000573) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346111030] (+0.000000400) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar", bufsiz = 1023 }
[13:14:26.346111725] (+0.000000695) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346112237] (+0.000000512) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS", bufsiz = 1023 }
[13:14:26.346113110] (+0.000000873) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346113754] (+0.000000644) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src", bufsiz = 1023 }
[13:14:26.346114742] (+0.000000988) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346115519] (+0.000000777) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools", bufsiz = 1023 }
[13:14:26.346116705] (+0.000001186) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346117507] (+0.000000802) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc", bufsiz = 1023 }
[13:14:26.346118788] (+0.000001281) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346119650] (+0.000000862) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man", bufsiz = 1023 }
[13:14:26.346120964] (+0.000001314) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346121869] (+0.000000905) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man/man1", bufsiz = 1023 }
[13:14:26.346123430] (+0.000001561) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = 45, buf = 140734091916912 }
[13:14:26.346123757] (+0.000000327) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home", bufsiz = 1023 }
[13:14:26.346124329] (+0.000000572) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346124731] (+0.000000402) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar", bufsiz = 1023 }
[13:14:26.346125433] (+0.000000702) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346125945] (+0.000000512) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS", bufsiz = 1023 }
[13:14:26.346126822] (+0.000000877) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346127460] (+0.000000638) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src", bufsiz = 1023 }
[13:14:26.346128447] (+0.000000987) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346129206] (+0.000000759) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools", bufsiz = 1023 }
[13:14:26.346130383] (+0.000001177) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346131193] (+0.000000810) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc", bufsiz = 1023 }
[13:14:26.346132451] (+0.000001258) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346133305] (+0.000000854) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man", bufsiz = 1023 }
[13:14:26.346134621] (+0.000001316) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346135533] (+0.000000912) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man/man3", bufsiz = 1023 }
[13:14:26.346137074] (+0.000001541) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = 45, buf = 140734091916912 }
[13:14:26.346137417] (+0.000000343) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home", bufsiz = 1023 }
[13:14:26.346137990] (+0.000000573) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346138389] (+0.000000399) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar", bufsiz = 1023 }
[13:14:26.346139087] (+0.000000698) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346139603] (+0.000000516) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS", bufsiz = 1023 }
[13:14:26.346140473] (+0.000000870) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346141123] (+0.000000650) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src", bufsiz = 1023 }
[13:14:26.346142154] (+0.000001031) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346142917] (+0.000000763) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools", bufsiz = 1023 }
[13:14:26.346144104] (+0.000001187) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346144912] (+0.000000808) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc", bufsiz = 1023 }
[13:14:26.346146166] (+0.000001254) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346147054] (+0.000000888) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man", bufsiz = 1023 }
[13:14:26.346148411] (+0.000001357) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.346169145] (+0.000020734) carbonara syscall_entry_access: { cpu_id = 0 }, { filename = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man7/man7/man3/man8/man8/man1/man3/bin/activate", mode = 0 }
[13:14:26.346184998] (+0.000015853) carbonara syscall_exit_access: { cpu_id = 0 }, { ret = -2 }
[13:14:26.346203420] (+0.000018422) carbonara syscall_entry_access: { cpu_id = 0 }, { filename = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man7/man7/man3/man8/man8/man1/man3/Scripts/activate", mode = 0 }
[13:14:26.346218704] (+0.000015284) carbonara syscall_exit_access: { cpu_id = 0 }, { ret = -2 }
[13:14:26.346235854] (+0.000017150) carbonara syscall_entry_access: { cpu_id = 0 }, { filename = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man7/man7/man3/man8/man8/man1/man3/pyvenv.cfg", mode = 0 }
[13:14:26.346251239] (+0.000015385) carbonara syscall_exit_access: { cpu_id = 0 }, { ret = -2 }
[13:14:26.346262975] (+0.000011736) carbonara syscall_entry_openat: { cpu_id = 0 }, { dfd = -100, filename = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man7/man7/man3/man8/man8/man1/man3", flags = 591872, mode = 0 }
[13:14:26.346279964] (+0.000016989) carbonara syscall_exit_openat: { cpu_id = 0 }, { ret = 31 }
[13:14:26.346280421] (+0.000000457) carbonara syscall_entry_newfstat: { cpu_id = 0 }, { fd = 31 }
[13:14:26.346280918] (+0.000000497) carbonara syscall_exit_newfstat: { cpu_id = 0 }, { ret = 0, statbuf = 140734091916656 }
[13:14:26.346283191] (+0.000002273) carbonara syscall_entry_getdents64: { cpu_id = 0 }, { fd = 31, count = 32768 }
[13:14:26.346306530] (+0.000023339) carbonara syscall_exit_getdents64: { cpu_id = 0 }, { ret = 3816, dirent = 99475896807632 }
[13:14:26.346312416] (+0.000005886) carbonara syscall_entry_getdents64: { cpu_id = 0 }, { fd = 31, count = 32768 }
[13:14:26.346312822] (+0.000000406) carbonara syscall_exit_getdents64: { cpu_id = 0 }, { ret = 0, dirent = 99475896807632 }
[13:14:26.346313290] (+0.000000468) carbonara syscall_entry_close: { cpu_id = 0 }, { fd = 31 }
[13:14:26.346317930] (+0.000004640) carbonara syscall_exit_close: { cpu_id = 0 }, { ret = 0 }
[13:14:26.346676928] (+0.000358998) carbonara syscall_entry_access: { cpu_id = 0 }, { filename = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man7/man7/man3/man8/man8/man1/man3/man1", mode = 0 }
[13:14:26.346693240] (+0.000016312) carbonara syscall_exit_access: { cpu_id = 0 }, { ret = -40 }
[13:14:26.346706496] (+0.000013256) carbonara syscall_entry_access: { cpu_id = 0 }, { filename = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man7/man7/man3/man8/man8/man1/man3/man3", mode = 0 }
[13:14:26.346721703] (+0.000015207) carbonara syscall_exit_access: { cpu_id = 0 }, { ret = -40 }
[13:14:26.346733369] (+0.000011666) carbonara syscall_entry_access: { cpu_id = 0 }, { filename = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man7/man7/man3/man8/man8/man1/man3/man7", mode = 0 }
[13:14:26.346748394] (+0.000015025) carbonara syscall_exit_access: { cpu_id = 0 }, { ret = -40 }
[13:14:26.346760086] (+0.000011692) carbonara syscall_entry_access: { cpu_id = 0 }, { filename = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man7/man7/man3/man8/man8/man1/man3/man8", mode = 0 }
[13:14:26.346775084] (+0.000014998) carbonara syscall_exit_access: { cpu_id = 0 }, { ret = -40 }
[13:14:26.347012869] (+0.000237785) carbonara syscall_entry_access: { cpu_id = 0 }, { filename = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man7/man7/man3/man8/man8/man1/man7", mode = 0 }
[13:14:26.347029348] (+0.000016479) carbonara syscall_exit_access: { cpu_id = 0 }, { ret = 0 }
[13:14:26.347031714] (+0.000002366) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home", bufsiz = 1023 }
[13:14:26.347032732] (+0.000001018) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.347033232] (+0.000000500) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar", bufsiz = 1023 }
[13:14:26.347034030] (+0.000000798) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.347034568] (+0.000000538) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS", bufsiz = 1023 }
[13:14:26.347035488] (+0.000000920) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.347036063] (+0.000000575) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src", bufsiz = 1023 }
[13:14:26.347037097] (+0.000001034) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.347037848] (+0.000000751) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools", bufsiz = 1023 }
[13:14:26.347039076] (+0.000001228) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.347039857] (+0.000000781) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc", bufsiz = 1023 }
[13:14:26.347041115] (+0.000001258) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.347041921] (+0.000000806) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man", bufsiz = 1023 }
[13:14:26.347043232] (+0.000001311) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.347044204] (+0.000000972) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man/man1", bufsiz = 1023 }
[13:14:26.347046070] (+0.000001866) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = 45, buf = 140734091916912 }
[13:14:26.347046631] (+0.000000561) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home", bufsiz = 1023 }
[13:14:26.347047265] (+0.000000634) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.347047699] (+0.000000434) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar", bufsiz = 1023 }
[13:14:26.347048414] (+0.000000715) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.347048958] (+0.000000544) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS", bufsiz = 1023 }
[13:14:26.347049856] (+0.000000898) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.347050454] (+0.000000598) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src", bufsiz = 1023 }
[13:14:26.347051422] (+0.000000968) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.347052172] (+0.000000750) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools", bufsiz = 1023 }
[13:14:26.347053361] (+0.000001189) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.347054125] (+0.000000764) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc", bufsiz = 1023 }
[13:14:26.347055374] (+0.000001249) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.347056182] (+0.000000808) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man", bufsiz = 1023 }
[13:14:26.347057505] (+0.000001323) carbonara syscall_exit_readlink: { cpu_id = 0 }, { ret = -22, buf = 140734091916912 }
[13:14:26.347058472] (+0.000000967) carbonara syscall_entry_readlink: { cpu_id = 0 }, { path = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man/man1", bufsiz = 1023 }
Of note, we see that readlink() fails with ELOOP 40 Too many levels of symbolic links
[13:14:26.346760086] (+0.000011692) carbonara syscall_entry_access: { cpu_id = 0 }, { filename = "/home/jgalar/EfficiOS/src/lttng-tools/doc/man/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man1/man7/man7/man3/man8/man8/man1/man3/man8", mode = 0 }
[13:14:26.346775084] (+0.000014998) carbonara syscall_exit_access: { cpu_id = 0 }, { ret = -40 }
It seems that PyLance does not expect recursive symlinks. In the case of the LTTng-tools tree, that situation happens when building the project "in-tree".
To build the project "in-tree" and reproduce that problem, you can clone it and invoke:
$ ./bootstrap
# See the project's README for the dependencies.
$ ./configure --without-lttng-ust
$ make -j$(nproc)
Ultimately, the tree ends-up with the following hierarchy (excerpt from tree's output):
│ ├── man
│ │ ├── asciidoc-attrs.conf
│ │ ├── asciidoc-attrs.conf.in
│ │ ├── asciidoc.conf
[...]
│ │ ├── lttng-untrack.1
│ │ ├── lttng-untrack.1.txt
│ │ ├── lttng-version.1
│ │ ├── lttng-version.1.txt
│ │ ├── lttng-view.1
│ │ ├── lttng-view.1.txt
│ │ ├── Makefile
│ │ ├── Makefile.am
│ │ ├── Makefile.in
│ │ ├── man1 -> /tmp/lttng-tools/doc/man
│ │ ├── man3 -> /tmp/lttng-tools/doc/man
│ │ ├── man7 -> /tmp/lttng-tools/doc/man
│ │ ├── man8 -> /tmp/lttng-tools/doc/man
│ │ ├── manpage.xsl
│ │ └── README.md
On our end, we'll probaly change the tree structure to work around the problem (introduced by this change), but that may be one cause of the recent reports of high memory consumption and crashes.
Hope that's helpful!
FWIW, the similar issue I reported in #5739 was found to be with a repo with hundreds of symlinks.
@bschnurr do you think we could repurpose this issue to fix recursive symlinks?
Can you try including only the folders with python files, in your settings.json?
{
"python.analysis.include": [
"tests/"
]
}
there is also exclude
sounds like we need to add recursion detection in https://github.com/microsoft/pyrx/blob/main/packages/pyright/packages/pyright-internal/src/analyzer/service.ts#L1128
that said, since path has semantic meaning in python, we probably need to detect recursion on each branch like how we do in source mapper.
also, currently we only have long operation detect in matchFiles, we might want to add max depth detection in that as well since I dont think realistically, there will be packages with more than say 50 module depths.
Can you try including only the folders with python files, in your settings.json? there is also exclude
I can confirm adding **/doc to my workspace exclusions works. I had been using this in my pyproject.toml up until now:
[tool.pyright]
exclude = ["doc/"]
ignore = ["doc/"]