microsoft / microsoft/ebpf-for-windows

Cryptic error message when exceeding max program length.

Open
#1,220 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted triaged
Dominant language
C
Stars
3.6k
Forks
311
Avg merge
6d 10h
Merged PRs (30d)
21

Description

### Describe the bug

When my eBPF program grows too long, it crashes after being loaded and outputs errors such as:
`panic: reflect: reflect.Value.Pointer on an invalid nonheap pointer.` or `error in Section 33`

### OS information

_No response_

### Steps taken to reproduce bug

Add eg. a bpf_printk line to a program on the verge of exceeding the limit and observe described behavior.

### Expected behavior

Ideally, I'd be notified that the program is too long at compilation time.
At a minimum, ebpf should make it clear what is happening after it crashes.
I wouldn't have thought of the underlying cause if an experienced colleague hadn't told me.

### Actual outcome

Output not indicative of reason for the crash.

### Additional details

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Reproduce the failure by adding a bpf_printk line to a program near its limit and capture the compiler or load output; done means the length-limit cause is reported clearly, ideally at compilation time.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.