Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[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)" #250

Closed
3 tasks done
hero-intelligent opened this issue Sep 1, 2023 · 8 comments · Fixed by #265

Comments

@hero-intelligent
Copy link
Contributor

hero-intelligent commented Sep 1, 2023

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

@dae-prow
Copy link
Contributor

dae-prow bot commented Sep 1, 2023

Thanks for opening this issue!

@mzz2017
Copy link
Contributor

mzz2017 commented Sep 2, 2023

https://github.com/daeuniverse/dae/blob/main/docs/en/troubleshooting.md#fail-to-load-ebpf-objects
@kunish 可能是和这个有关系,需要检查一下编译 docker 里的 clang 版本

@hero-intelligent
Copy link
Contributor Author

hero-intelligent commented Sep 2, 2023

@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.

@hero-intelligent
Copy link
Contributor Author

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.

@mzz2017
Copy link
Contributor

mzz2017 commented Sep 2, 2023

Can you help improve the Dockerfile and dockrt-compose? Thanks so much!

@hero-intelligent
Copy link
Contributor Author

I'll make a pull request later.

@hero-intelligent
Copy link
Contributor Author

hero-intelligent commented Sep 3, 2023

@mzz2017 @kunish Pull request made. Please review the code.

@piyoki piyoki linked a pull request Sep 3, 2023 that will close this issue
3 tasks
@piyoki
Copy link
Contributor

piyoki commented Sep 3, 2023

@hero-intelligent Thanks for your contribution! Let's discuss the implementation details further in the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants