[Bug Report] something went wrong in docker container. `level=fatal msg="dae.Run: load eBPF objects: field TproxyWanEgress: program tproxy_wan_egress: load program: argument list too long: ;: 1428: (71) r2 (truncated, 879 line(s) omitted)"`
hero-intelligent opened this issue · comments
Checks
- I have searched the existing issues
- I have read the documentation
- Is it your first time sumbitting an issue
Current Behavior
docker-compose.yml
version: "3"
services:
dae:
privileged: true
network_mode: host
pid: host
build:
context: .
volumes:
- /sys:/sys
- ~/goose/daed:/etc/daed
- ~/goose/dae:/etc/dae
terminal output:
[+] Running 1/1
✔ Container daed-dae-1 Created 0.1s
Attaching to daed-dae-1
daed-dae-1 | time="2023-09-01T04:02:59Z" level=info msg="Loading eBPF programs and maps into the kernel..."
daed-dae-1 | time="2023-09-01T04:02:59Z" level=info msg="The loading process takes about 120MB free memory, which will be released after loading. Insufficient memory will cause loading failure."
daed-dae-1 | time="2023-09-01T04:02:59Z" level=warning msg="dangerous converting: may exceeds graphQL int32 range" name=SoMarkFromDae type=uint32
daed-dae-1 | time="2023-09-01T04:02:59Z" level=warning msg="dangerous converting: may exceeds graphQL int32 range" name=SoMarkFromDae type=uint32
daed-dae-1 | time="2023-09-01T04:02:59Z" level=info msg="Listen on http://127.0.0.1:2023"
daed-dae-1 | time="2023-09-01T04:02:59Z" level=info msg="Listen on http://192.168.31.119:2023"
daed-dae-1 | time="2023-09-01T04:02:59Z" level=info msg="Listen on http://192.168.122.1:2023"
daed-dae-1 | time="2023-09-01T04:02:59Z" level=info msg="Listen on http://172.17.0.1:2023"
daed-dae-1 | time="2023-09-01T04:02:59Z" level=info msg="Listen on http://[::1]:2023"
daed-dae-1 | time="2023-09-01T04:02:59Z" level=info msg="Listen on http://[fe80::66d6:9aff:fe99:1ad3]:2023"
daed-dae-1 | time="2023-09-01T04:02:59Z" level=info msg="Listen on http://[fe80::42:25ff:fe63:8ea9]:2023"
daed-dae-1 | time="2023-09-01T04:02:59Z" level=info msg="Listen on http://[fe80::d407:1bff:fead:fa10]:2023"
daed-dae-1 | time="2023-09-01T04:03:02Z" level=fatal msg="dae.Run: load eBPF objects: field TproxyWanEgress: program tproxy_wan_egress: load program: argument list too long: ;: 1428: (71) r2 (truncated, 879 line(s) omitted)"
daed-dae-1 exited with code 1
Expected Behavior
just work correctly!
Steps to Reproduce
cd ~
git clone https://github.com/daeuniverse/daed.git
cd daed
git clone https://github.com/daeuniverse/dae-wing.git wing
git clone https://github.com/daeuniverse/dae.git wing/dae-core
git clone https://github.com/daeuniverse/dae_bpf_headers.git wing/dae-core/control/kern/headers
# after touching and editing file `docker-compose.yml`
docker compose up
build image works just fine, but when running a container, it spits out an error. this is what the last line of the log looks like:
level=fatal msg="dae.Run: load eBPF objects: field TproxyWanEgress: program tproxy_wan_egress: load program: argument list too long: ;: 1428: (71) r2 (truncated, 879 line(s) omitted)"
Environment
- Daed version: self compile in docker 32d1af7
- OS (e.g
cat /etc/os-release
): Debian 12 - Kernel (e.g.
uname -a
): 6.1.0-11-amd64 - Others: see contents below
output of cat /etc/os-release:
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
output of uname -a:
Linux MiWiFi-CR8806-srv 6.1.0-11-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-4 (2023-08-08) x86_64 GNU/Linux
Anything else?
No response
Thanks for opening this issue!
https://github.com/daeuniverse/dae/blob/main/docs/en/troubleshooting.md#fail-to-load-ebpf-objects
@kunish 可能是和这个有关系,需要检查一下编译 docker 里的 clang 版本
@mzz2017 @kunish This is what I got from golang:1.20-bookworm
# in the system terminal:
docker run -it --rm golang:1.20-bookworm
# in the container:
apt-get update
apt-get install clang -y
This is the output of clang --version
after these commands:
root@9ad12dc3dc97:/go# clang --version
Debian clang version 14.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
root@9ad12dc3dc97:/go# exit
exit
NOTE:
this is Bookworm, not to mention Bullseye, which is written in the Dockerfile!
Maybe there is a need of another stage to compile clang-15
from source and then install it in the build-bundle
stage.
Maybe change line 21 into RUN apt-get update && apt-get install -y llvm clang-15 git make
will work.
Another question, Why there isn't a docker-compose.yml
similar to that of dae in the repository? Neither is wing? We need an official one that is complete and tested enough. Mine is just a copy from dae, but i'm not sure whether it is complete enough.
Can you help improve the Dockerfile and dockrt-compose? Thanks so much!
I'll make a pull request later.
@hero-intelligent Thanks for your contribution! Let's discuss the implementation details further in the PR.