Open
Description
Code editor
Emacs
Platform
Linux (NixOS unstable)
Version
5.4.0
What steps will reproduce the bug?
Open any .sh
file inside of e.g. https://github.com/fwupd/fwupd/ which contains a /sys
style directory inside of src/tests/sys
with cyclic symlinks.
How often does it reproduce? Is there a required condition?
Reproduces perfectly.
What is the expected behavior?
Probably needs some kind of cycle detection for symlinks when walking the file system. An example might be the Rust walkdir crate https://github.com/BurntSushi/walkdir/blob/2.5.0/src/lib.rs#L973
What do you see instead?
This is the stderr after the process exits:
<--- Last few GCs --->
[99443:0x42a319f0] 243446 ms: Scavenge 3892.5 (4127.2) -> 3881.1 (4127.9) MB, 11.21 / 0.00 ms (average mu = 0.141, current mu = 0.014) task;
[99443:0x42a319f0] 243489 ms: Scavenge 3893.4 (4127.9) -> 3881.9 (4128.7) MB, 10.31 / 0.00 ms (average mu = 0.141, current mu = 0.014) task;
[99443:0x42a319f0] 246551 ms: Mark-Compact 3893.9 (4128.7) -> 3879.0 (4129.4) MB, 3017.90 / 0.00 ms (average mu = 0.128, current mu = 0.115) task; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
1: 0xab5100 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/run/current-system/sw/bin/bash-language-server]
2: 0xe7cec0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/run/current-system/sw/bin/bash-language-server]
3: 0xe7d2a4 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/run/current-system/sw/bin/bash-language-server]
4: 0x10ac967 [/run/current-system/sw/bin/bash-language-server]
5: 0x10ac9f9 [/run/current-system/sw/bin/bash-language-server]
6: 0x10c4590 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) [/run/current-system/sw/bin/bash-language-server]
7: 0x10c50c7 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/run/current-system/sw/bin/bash-language-server]
8: 0x1120844 v8::internal::MinorGCJob::Task::RunInternal() [/run/current-system/sw/bin/bash-language-server]
9: 0xcb1755 node::PerIsolatePlatformData::RunForegroundTask(std::unique_ptr<v8::Task, std::default_delete<v8::Task> >) [/run/current-system/sw/bin/bash-language-server]
10: 0xcb3f42 node::PerIsolatePlatformData::FlushForegroundTasksInternal() [/run/current-system/sw/bin/bash-language-server]
11: 0x7f2880e2b193 [/nix/store/p9rzfyn249qip445ja9xb8grg88jp5br-libuv-1.48.0/lib/libuv.so.1]
12: 0x7f2880e3f892 [/nix/store/p9rzfyn249qip445ja9xb8grg88jp5br-libuv-1.48.0/lib/libuv.so.1]
13: 0x7f2880e2beb0 uv_run [/nix/store/p9rzfyn249qip445ja9xb8grg88jp5br-libuv-1.48.0/lib/libuv.so.1]
14: 0xb2bbb3 node::SpinEventLoopInternal(node::Environment*) [/run/current-system/sw/bin/bash-language-server]
15: 0xc83233 node::NodeMainInstance::Run(node::ExitCode*, node::Environment*) [/run/current-system/sw/bin/bash-language-server]
16: 0xc8361e node::NodeMainInstance::Run() [/run/current-system/sw/bin/bash-language-server]
17: 0xbe0212 node::Start(int, char**) [/run/current-system/sw/bin/bash-language-server]
18: 0x7f287da3127e [/nix/store/pacbfvpzqz2mksby36awvbcn051zcji3-glibc-2.40-36/lib/libc.so.6]
19: 0x7f287da31339 __libc_start_main [/nix/store/pacbfvpzqz2mksby36awvbcn051zcji3-glibc-2.40-36/lib/libc.so.6]
20: 0xaf5d95 _start [/run/current-system/sw/bin/bash-language-server]
Process bash-ls stderr finished
Additional information
No response