libbpf-bootstrap icon indicating copy to clipboard operation
libbpf-bootstrap copied to clipboard

libbpf-bootstrap's rust tracecon fails with llvm 16

Open chantra opened this issue 3 years ago • 0 comments

While trying to build rust tracecon with LLVM 16, the build was failing.

https://github.com/libbpf/libbpf-bootstrap/pull/112 was created to reproduce the issue with CI (like https://github.com/chantra/libbpf-bootstrap/actions/runs/3052027285/jobs/4920947176#step:5:187)

The issue turns out to be https://github.com/llvm/llvm-project/issues/57872 .

This issue is merely here to

  1. explain why llvm 16 build is failing
  2. cross-reference upstream issue.

Below is the actual error (before old logs get purged from CI):

error: failed to run custom build command for `tracecon v0.1.0 (/libbpf-bootstrap/examples/rust/tracecon)`

Caused by:
  process didn't exit successfully: `/libbpf-bootstrap/examples/rust/target/debug/build/tracecon-12fc201c0139a5fe/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'bpf compilation failed: Build("Failed to compile obj=/tmp/.tmp89wAiv/tracecon.o with status=exit status: 1\n stdout=\n \n stderr=\n ./src/bpf/tracecon.bpf.c:152:3: error: Looks like the BPF stack limit of 512 bytes is exceeded. Please move large on stack variables into BPF per-cpu array map.\n\n                memcpy(&event.hostname, &lookup->c, sizeof(lookup->c));\n                ^\n./src/bpf/tracecon.bpf.c:152:3: error: Looks like the BPF stack limit of 512 bytes is exceeded. Please move large on stack variables into BPF per-cpu array map.\n\n./src/bpf/tracecon.bpf.c:152:3: error: Looks like the BPF stack limit of 512 bytes is exceeded. Please move large on stack variables into BPF per-cpu array map.\n\n./src/bpf/tracecon.bpf.c:152:3: error: Looks like the BPF stack limit of 512 bytes is exceeded. Please move large on stack variables into BPF per-cpu array map.\n\n./src/bpf/tracecon.bpf.c:152:3: error: Looks like the BPF stack limit of 512 bytes is exceeded. Please move large on stack variables into BPF per-cpu array map.\n\n./src/bpf/tracecon.bpf.c:152:3: error: Looks like the BPF stack limit of 512 bytes is exceeded. Please move large on stack variables into BPF per-cpu array map.\n\n./src/bpf/tracecon.bpf.c:152:3: error: Looks like the BPF stack limit of 512 bytes is exceeded. Please move large on stack variables into BPF per-cpu array map.\n\n./src/bpf/tracecon.bpf.c:152:3: error: Looks like the BPF stack limit of 512 bytes is exceeded. Please move large on stack variables into BPF per-cpu array map.\n\n8 errors generated.\n\n")', tracecon/build.rs:21:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
Error: Process completed with exit code 101.

chantra avatar Sep 21 '22 16:09 chantra