Skip to content

CLI 用户输入的文本中有特殊@latest 字符会导致,CLI思考处理后直接报错退出 #3130

@linhaosunny

Description

@linhaosunny

What happened?

检查一下我现在的mcp 都是npx + @latest 方式吗

⠼ Just a tick, I'm polishing my wit... (0s · esc to cancel)
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Type your message or @path/to/file
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
? for shortcuts 6.6% context used

<--- Last few GCs --->

[2299:0x72e824000] 3944402 ms: Scavenge (reduce) (interleaved) 4079.7 (4085.6) -> 4079.1 (4085.6) MB, pooled: 0 MB, 3.83 / 0.00 ms (average mu = 0.345, current mu = 0.340) allocation failure;
[2299:0x72e824000] 3944562 ms: Mark-Compact (reduce) 4079.7 (4085.6) -> 4067.1 (4077.3) MB, pooled: 0 MB, 115.96 / 0.00 ms (+ 182.5 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 331 ms) (average mu = 0.336, c

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

1: 0x1004c5f0c node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
2: 0x100671ca4 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
3: 0x10082ece8 v8::internal::Heap::CallGCPrologueCallbacks(v8::GCType, v8::GCCallbackFlags, v8::internal::GCTracer::Scope::ScopeId) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
4: 0x100834780 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_1::operator()() const [/opt/homebrew/Cellar/node/23.11.0/bin/node]
5: 0x10082f02c void heap::base::Stack::SetMarkerAndCallbackImpl<v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_1>(heap::base::Stack*, void*, void const*) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
6: 0x1003d8028 PushAllRegistersAndIterateStack [/opt/homebrew/Cellar/node/23.11.0/bin/node]
7: 0x10082bf14 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
8: 0x1007d05a0 v8::internal::StackGuard::HandleInterrupts(v8::internal::StackGuard::InterruptLevel) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
9: 0x100ad9c1c v8::internal::Runtime_StackGuardWithGap(int, unsigned long*, v8::internal::Isolate*) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
10: 0x1002b79f4 Builtins_CEntry_Return1_ArgvOnStack_NoBuiltinExit [/opt/homebrew/Cellar/node/23.11.0/bin/node]
11: 0x10d27b18c
12: 0x1002e661c Builtins_ArrayMap [/opt/homebrew/Cellar/node/23.11.0/bin/node]
13: 0x100220838 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/23.11.0/bin/node]
14: 0x10021d644 construct_stub_create_deopt_addr [/opt/homebrew/Cellar/node/23.11.0/bin/node]
15: 0x10039ae80 Builtins_ConstructWithSpreadHandler [/opt/homebrew/Cellar/node/23.11.0/bin/node]
16: 0x100220838 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/23.11.0/bin/node]
17: 0x10021d644 construct_stub_create_deopt_addr [/opt/homebrew/Cellar/node/23.11.0/bin/node]
18: 0x10039ae80 Builtins_ConstructWithSpreadHandler [/opt/homebrew/Cellar/node/23.11.0/bin/node]
19: 0x100220838 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/23.11.0/bin/node]
20: 0x1002213cc Builtins_InterpreterPushArgsThenFastConstructFunction [/opt/homebrew/Cellar/node/23.11.0/bin/node]
21: 0x10039acb4 Builtins_ConstructHandler [/opt/homebrew/Cellar/node/23.11.0/bin/node]
22: 0x100220838 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/23.11.0/bin/node]
23: 0x100220838 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/23.11.0/bin/node]
24: 0x10025de20 Builtins_AsyncFunctionAwaitResolveClosure [/opt/homebrew/Cellar/node/23.11.0/bin/node]
25: 0x10032b298 Builtins_PromiseFulfillReactionJob [/opt/homebrew/Cellar/node/23.11.0/bin/node]
26: 0x10024d214 Builtins_RunMicrotasks [/opt/homebrew/Cellar/node/23.11.0/bin/node]
27: 0x10021e3f0 Builtins_JSRunMicrotasksEntry [/opt/homebrew/Cellar/node/23.11.0/bin/node]
28: 0x1007a3be0 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
29: 0x1007a434c v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
30: 0x1007ce900 v8::internal::MicrotaskQueue::PerformCheckpointInternal(v8::Isolate*) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
31: 0x1003d95e4 node::InternalCallbackScope::Close() [/opt/homebrew/Cellar/node/23.11.0/bin/node]
32: 0x1003d9b94 node::InternalMakeCallback(node::Environment*, v8::Localv8::Object, v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value, node::async_context, v8::Localv8::Value) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
33: 0x1003f1e08 node::AsyncWrap::MakeCallback(v8::Localv8::Function, int, v8::Localv8::Value
) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
34: 0x1004cc030 node::fs::FSReqCallback::Resolve(v8::Localv8::Value) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
35: 0x1004cea08 node::fs::AfterScanDir(uv_fs_s*) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
36: 0x1004bc9bc node::MakeLibuvRequestCallback<uv_fs_s, void ()(uv_fs_s)>::Wrapper(uv_fs_s*) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
37: 0x103d12e0c uv__work_done [/opt/homebrew/Cellar/libuv/1.51.0/lib/libuv.1.dylib]
38: 0x103d166bc uv__async_io [/opt/homebrew/Cellar/libuv/1.51.0/lib/libuv.1.dylib]
39: 0x103d26bd0 uv__io_poll [/opt/homebrew/Cellar/libuv/1.51.0/lib/libuv.1.dylib]
40: 0x103d16b58 uv_run [/opt/homebrew/Cellar/libuv/1.51.0/lib/libuv.1.dylib]
41: 0x1003da488 node::SpinEventLoopInternal(node::Environment*) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
42: 0x10050d43c node::NodeMainInstance::Run(node::ExitCode*, node::Environment*) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
43: 0x10050d190 node::NodeMainInstance::Run() [/opt/homebrew/Cellar/node/23.11.0/bin/node]
44: 0x100484a58 node::Start(int, char**) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
45: 0x19bec1d54 start [/usr/lib/dyld]

What did you expect to happen?

CLI 用户输入的文本中有特殊@latest 字符会导致,CLI思考处理后直接报错退出, 能正常处理

Client information

Client Information

Run qwen to enter the interactive CLI, then run the /about command.

$ qwen /about
# paste output here
│ │ │ Status │ │ │ │ Qwen Code 0.14.3 (55bcec7) │ │ Runtime Node.js v23.11.0 / npm 11.12.1 │ │ OS darwin arm64 (25.0.0) │ │ │ │ Auth Qwen OAuth │ │ Model coder-model │ │ Fast Model coder-model │ │ Session ID 37faa079-d71b-4753-a9f7-a3f42707de86 │ │ Sandbox no sandbox │ │ Proxy no proxy │ │ Memory Usage 265.3 MB │ │

Login information

No response

Anything else we need to know?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/needs-triageIssue needs to be triaged and labeledtype/bugSomething isn't working as expected

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions