Skip to content

Loading of ebpf program fails with "duplicate found at address" #1808

@scudette

Description

@scudette

Describe the bug

Issue #894 highlighted an issue with attaching to symbols in ambiguous locations and PR #1588 now hard rejects such symbols.

This means that we can not load at all on such kernels that have duplicate symbols, even if we are not even interested in that specific symbol at all. Error is

populating kallsyms caches: getting modules from kallsyms: assigning symbol modules: symbol load_elf_phdrs: duplicate found at address 0xffffffff8e0245
f0 (module ""): multiple kernel symbols with the same name 

This hard reject should be made configurable or keep a list of symbols that can not be attached but still allow the loading of the program.

This change breaks upgrades from older versions for us.

How to reproduce

Load any ebpf program on older kernels ( am using Ubuntu 22.04)

Linux version 5.15.0-139-generic (buildd@lcy02-amd64-029) (gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #149-Ubuntu SMP Fri Apr 11 22:06:13 UTC 2025

Version information

master

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions