-
Notifications
You must be signed in to change notification settings - Fork 154
Open
Description
What happened?
The tool calls seems to be broken?
Name and Version
llama-server --version
version: 3872 (f8d511a)
built with cc (Debian 14.3.0-5) 14.3.0 for x86_64-linux-gnu
What operating system are you seeing the problem on?
No response
Relevant log output
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Let me try to create the file in the home directory of the current user? But the user is root, so home is /root.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Alternatively, we can try:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: mkdir -p /root
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: touch /root/testfile.txt
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: But we already tried that.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Given the constraints, I think we need to report that we are unable to create the file due to permission issues, even as root.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: However, let me try one more thing: use `sudo` inside the command? But if we are root, we don't need it. And if we are not, then the tool is not running as root.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Alternatively, we can check the user:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: id -un
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: If it returns "root", then we are root and the issue is elsewhere.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: So I will run:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: id -un
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: to see the current user.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Then, if it's root, we try to create the file again and see the error.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: If it's not root, then we have a problem with the tool.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: But note: the tool is named "execute_root_bash", so it should run as root.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Let me run:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: id -un
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: and
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: echo $HOME
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: to see the home directory.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: But note: the user request is to create in the home directory of the root user, which is /root.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: So, I will run:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: id -un && touch /root/testfile.txt
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: and see the output.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Alternatively, we can break it into two commands? But we can do it in one.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: However, the tool only allows one command per call? Actually, we can chain with `&&` or `;`.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Given the previous error, let me try to run the command to check the user and then create the file.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: But note: if the user is not root, we might get permission denied on both.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Alternatively, we can run:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: sudo touch /root/testfile.txt
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: but if we are not root, and if sudo is not set up, it will ask for a password.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Since we are in a non-interactive environment, we cannot enter a password.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Therefore, I will run:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: whoami
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: and then
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: touch /root/testfile.txt
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: in two separate tool calls? But we are limited to one call per response.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: We can do:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: whoami > /tmp/whoami.txt && touch /root/testfile.txt
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: and then read the /tmp/whoami.txt? But we cannot read files.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Alternatively, we can output the whoami to stdout:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: whoami && touch /root/testfile.txt
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Then the output will be:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: root
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: touch: cannot touch '/root/testfile.txt': Permission denied
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: That would be odd.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Or:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: whoami ; touch /root/testfile.txt
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: But same thing.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Given the time, I will run:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: id -u
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: If it returns 0, then we are root.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Then we can try:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: ls -ld /root
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: to see the permissions.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: But we are getting permission denied on creating a file, so we might not have write permission on the directory.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Let me check the permissions of /root:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: ls -ld /root
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: We can run:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: ls -ld /root
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: and then
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: touch /root/testfile.txt
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: in one command.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: But note: the tool returns the output of the entire command.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Alternatively, we can run:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: ls -ld /root && touch /root/testfile.txt
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: If the first command fails, the second won't run.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Or:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: ls -ld /root ; touch /root/testfile.txt
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: I'll run:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: ls -ld /root ; touch /root/testfile.txt
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: and see the output.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: However, we are getting a lot of errors and the user just wants a test file.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Let me try to create the file in the current working directory and then move it? But we don't know the current working directory.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: We can do:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: current_dir=$(pwd)
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: touch testfile.txt
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: sudo mv testfile.txt /root/
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: But we are root, so we don't need sudo. And we are in a temporary shell? The working directory might be /tmp or something.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Alternatively, we can do:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: touch /tmp/testfile.txt && mv /tmp/testfile.txt /root/
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: But moving to /root requires write permission on /root.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: And we are root, so it should work.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: But we got permission denied when touching in /root, so moving to /root might also fail.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: However, moving a file into a directory requires write permission on the directory, not on the file.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: And we are root, so we should have write permission on /root.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: So I will try:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: touch /tmp/testfile.txt && mv /tmp/testfile.txt /root/
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: If the touch works and the mv fails, then we know the issue is with the /root directory.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Alternatively, we can do:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: echo "test" > /tmp/testfile.txt && sudo mv /tmp/testfile.txt /root/
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: But again, we are root so we don't need sudo.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Let me try without sudo.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Given the above, I will run:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: touch /tmp/testfile.txt && mv /tmp/testfile.txt /root/ && echo "File created successfully in /root"
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: If it fails, we will see the error.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: But note: the initial error was on touching in /root, not on moving.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: So let's try this.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: But note: the user wants the file in the home directory of the root user, which is /root.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: We are creating it in /tmp and moving to /root.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: This should be acceptable.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: Let me run:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: touch /tmp/testfile.txt && mv /tmp/testfile.txt /root/ && echo "Success"
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: If we get an error on the mv, then we know.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: But if we get an error on the touch in /tmp? That would be odd because /tmp is writable by everyone.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: So I'll run that command.
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: </think>
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: I'll try a different approach to create the test file:<|tool▁calls▁begin|><|tool▁call▁begin|>function<|tool▁sep|>execute_root_bash
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]:
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: {"command":"echo 'Test content' | tee \/
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: [1756778659] [/opt/ik_llama.cpp/ik_llama.cpp/common/json-partial.cpp: 129][ common_json_parse] Failed to parse up to error: [json.exception.parse_error.101] parse error at line 1, column 41: syntax error while parsing value - invalid string: missing closing quote; last read: '"echo 'Test content' | tee \/': <<<{"command":"echo 'Test content' | tee \/>>>
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: [1756778659] Parsed partial JSON: {"command":"echo 'Test content' | tee /649989314"} (json_healing_marker: 649989314)
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: [1756778659] Cleaned up JSON {"command":"echo 'Test content' | tee /649989314"} to "{\"command\":\"echo 'Test content' | tee /" (json_healing_marker : '649989314')
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: [1756778659] Partial parse: incomplete tool call
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: terminate called after throwing an instance of 'std::runtime_error'
Sep 02 02:04:19 xxx run-ik_llama.cpp.sh[66384]: what(): Invalid diff: '{"command":"echo 'Test content' | tee \' not found at start of '{"command":"echo 'Test content' | tee /'
Sep 02 02:04:33 xxx run-ik_llama.cpp.sh[66365]: /opt/THIREUS-6.2478bpw/run-ik_llama.cpp.sh: line 61: 66384 Aborted CUDA_VISIBLE_DEVICES="0,1,2" /opt/ik_llama.cpp/ik_llama.cpp/build/bin/llama-server --model /opt/GGUF-Tool-Suite/GGUF-Tool-Suite/DeepSeek-R1-0528.ROOT-6.2478bpw/DeepSeek-R1-0528-THIREUS-BF16-SPECIAL_TENSOR-00001-of-01148.gguf --alias THIREUS/DeepSeek-R1-0528-6.2478bpw --ctx-size $(
(160 * 1024)) -b $((16 * 512)) -ub $((8 * 512)) --mlock --temp 0.5 --top-k 0 --top-p 1.0 --min-p 0.1 --repeat-penalty 1.0 -ctk q8_0 -mla 3 -fa -fmoe -amb 512 --split-mode layer --tensor-split 10,21,20 --main-gpu 1 --override-tensor exps=CPU --n-gpu-layers 99 --threads $(grep ^cpu\\scores /proc/cpuinfo | uniq | awk '{print $4}' | xargs -I{} echo "{}-0" | bc) --host 0.0.0.0 --port 8080 --log-enable --logdir /var
/log/ --jinja --special --verbose-prompt --verbosity 2 --prompt-cache "$HOME/.cache/ik_llama.cpp/prompt-cache.bin" --prompt-cache-all --slot-save-path "$HOME/.cache/ik_llama.cpp/slot.bin" --lookup-cache-dynamic "$HOME/.cache/ik_llama.cpp/slot.bin" --keep -1 --slot-prompt-similarity 0.35 --metrics
Sep 02 02:04:33 xxx systemd[1]: ik_llama.cpp-deepseek-r1.service: Main process exited, code=exited, status=134/n/a
Sep 02 02:04:33 xxx systemd[1]: ik_llama.cpp-deepseek-r1.service: Failed with result 'exit-code'.
Sep 02 02:04:33 xxx systemd[1]: ik_llama.cpp-deepseek-r1.service: Consumed 2d 16h 29min 32.173s CPU time, 22G memory peak.
Sep 02 02:05:33 xxx systemd[1]: ik_llama.cpp-deepseek-r1.service: Scheduled restart job, restart counter is at 2.
Sep 02 02:05:33 xxx systemd[1]: Started ik_llama.cpp-deepseek-r1.service - ik_llama.cpp Service.
Metadata
Metadata
Assignees
Labels
No labels