capable-bpfcc fails to launch due to bpf compilation error

Bug #2110161 reported by Ryan Lee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bpfcc (Ubuntu)
New
Undecided
Unassigned
Noble
New
Undecided
Unassigned
linux-hwe-6.11 (Ubuntu)
Invalid
Undecided
Unassigned
Noble
Invalid
Undecided
Unassigned

Bug Description

$ sudo capable-bpfcc
[sudo] password for ryan-lee:
In file included from /virtual/main.c:14:
In file included from include/uapi/linux/ptrace.h:183:
In file included from arch/x86/include/asm/ptrace.h:175:
In file included from arch/x86/include/asm/paravirt_types.h:12:
In file included from arch/x86/include/asm/nospec-branch.h:15:
arch/x86/include/asm/current.h:47:10: warning: multiple identical address spaces specified for type [-Wduplicate-decl-specifier]
   47 | return this_cpu_read_const(const_pcpu_hot.current_task);
      | ^
arch/x86/include/asm/percpu.h:577:36: note: expanded from macro 'this_cpu_read_const'
  577 | #define this_cpu_read_const(pcp) __raw_cpu_read_const(pcp)
      | ^
arch/x86/include/asm/percpu.h:163:35: note: expanded from macro '__raw_cpu_read_const'
  163 | #define __raw_cpu_read_const(pcp) __raw_cpu_read(, , pcp)
      | ^
arch/x86/include/asm/percpu.h:155:30: note: expanded from macro '__raw_cpu_read'
  155 | *(qual __my_cpu_type(pcp) *)__my_cpu_ptr(&(pcp)); \
      | ^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
arch/x86/include/asm/percpu.h:94:40: note: expanded from macro '__my_cpu_type'
   94 | #define __my_cpu_type(var) typeof(var) __percpu_seg_override
      | ^
arch/x86/include/asm/percpu.h:45:32: note: expanded from macro '__percpu_seg_override'
   45 | # define __percpu_seg_override __seg_gs
      | ^
<built-in>:358:33: note: expanded from macro '__seg_gs'
  358 | #define __seg_gs __attribute__((address_space(256)))
      | ^
In file included from /virtual/main.c:14:
In file included from include/uapi/linux/ptrace.h:183:
In file included from arch/x86/include/asm/ptrace.h:175:
In file included from arch/x86/include/asm/paravirt_types.h:12:
In file included from arch/x86/include/asm/nospec-branch.h:15:
arch/x86/include/asm/current.h:47:10: warning: multiple identical address spaces specified for type [-Wduplicate-decl-specifier]
arch/x86/include/asm/percpu.h:577:36: note: expanded from macro 'this_cpu_read_const'
  577 | #define this_cpu_read_const(pcp) __raw_cpu_read_const(pcp)
      | ^
arch/x86/include/asm/percpu.h:163:35: note: expanded from macro '__raw_cpu_read_const'
  163 | #define __raw_cpu_read_const(pcp) __raw_cpu_read(, , pcp)
      | ^
arch/x86/include/asm/percpu.h:155:9: note: expanded from macro '__raw_cpu_read'
  155 | *(qual __my_cpu_type(pcp) *)__my_cpu_ptr(&(pcp)); \
      | ^
arch/x86/include/asm/percpu.h:94:40: note: expanded from macro '__my_cpu_type'
   94 | #define __my_cpu_type(var) typeof(var) __percpu_seg_override
      | ^
arch/x86/include/asm/percpu.h:45:32: note: expanded from macro '__percpu_seg_override'
   45 | # define __percpu_seg_override __seg_gs
      | ^
<built-in>:358:33: note: expanded from macro '__seg_gs'
  358 | #define __seg_gs __attribute__((address_space(256)))
      | ^
In file included from /virtual/main.c:15:
In file included from include/linux/sched.h:13:
arch/x86/include/asm/processor.h:545:10: warning: multiple identical address spaces specified for type [-Wduplicate-decl-specifier]
  545 | return this_cpu_read_const(const_pcpu_hot.top_of_stack);
      | ^
arch/x86/include/asm/percpu.h:577:36: note: expanded from macro 'this_cpu_read_const'
  577 | #define this_cpu_read_const(pcp) __raw_cpu_read_const(pcp)
      | ^
arch/x86/include/asm/percpu.h:163:35: note: expanded from macro '__raw_cpu_read_const'
  163 | #define __raw_cpu_read_const(pcp) __raw_cpu_read(, , pcp)
      | ^
arch/x86/include/asm/percpu.h:155:30: note: expanded from macro '__raw_cpu_read'
  155 | *(qual __my_cpu_type(pcp) *)__my_cpu_ptr(&(pcp)); \
      | ^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
arch/x86/include/asm/percpu.h:94:40: note: expanded from macro '__my_cpu_type'
   94 | #define __my_cpu_type(var) typeof(var) __percpu_seg_override
      | ^
arch/x86/include/asm/percpu.h:45:32: note: expanded from macro '__percpu_seg_override'
   45 | # define __percpu_seg_override __seg_gs
      | ^
<built-in>:358:33: note: expanded from macro '__seg_gs'
  358 | #define __seg_gs __attribute__((address_space(256)))
      | ^
In file included from /virtual/main.c:15:
In file included from include/linux/sched.h:13:
arch/x86/include/asm/processor.h:545:10: warning: multiple identical address spaces specified for type [-Wduplicate-decl-specifier]
arch/x86/include/asm/percpu.h:577:36: note: expanded from macro 'this_cpu_read_const'
  577 | #define this_cpu_read_const(pcp) __raw_cpu_read_const(pcp)
      | ^
arch/x86/include/asm/percpu.h:163:35: note: expanded from macro '__raw_cpu_read_const'
  163 | #define __raw_cpu_read_const(pcp) __raw_cpu_read(, , pcp)
      | ^
arch/x86/include/asm/percpu.h:155:9: note: expanded from macro '__raw_cpu_read'
  155 | *(qual __my_cpu_type(pcp) *)__my_cpu_ptr(&(pcp)); \
      | ^
arch/x86/include/asm/percpu.h:94:40: note: expanded from macro '__my_cpu_type'
   94 | #define __my_cpu_type(var) typeof(var) __percpu_seg_override
      | ^
arch/x86/include/asm/percpu.h:45:32: note: expanded from macro '__percpu_seg_override'
   45 | # define __percpu_seg_override __seg_gs
      | ^
<built-in>:358:33: note: expanded from macro '__seg_gs'
  358 | #define __seg_gs __attribute__((address_space(256)))
      | ^
In file included from /virtual/main.c:16:
In file included from include/linux/security.h:35:
include/linux/bpf.h:349:10: error: invalid application of 'sizeof' to an incomplete type 'struct bpf_wq'
  349 | return sizeof(struct bpf_wq);
      | ^ ~~~~~~~~~~~~~~~
include/linux/bpf.h:349:24: note: forward declaration of 'struct bpf_wq'
  349 | return sizeof(struct bpf_wq);
      | ^
include/linux/bpf.h:378:10: error: invalid application of '__alignof' to an incomplete type 'struct bpf_wq'
  378 | return __alignof__(struct bpf_wq);
      | ^ ~~~~~~~~~~~~~~~
include/linux/bpf.h:378:29: note: forward declaration of 'struct bpf_wq'
  378 | return __alignof__(struct bpf_wq);
      | ^
4 warnings and 2 errors generated.
Traceback (most recent call last):
  File "/usr/sbin/capable-bpfcc", line 250, in <module>
    b = BPF(text=bpf_text)
        ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/bcc/__init__.py", line 479, in __init__
    raise Exception("Failed to compile BPF module %s" % (src_file or "<text>"))
Exception: Failed to compile BPF module <text>
$ uname -a
Linux ryan-lee-laptop-13-amd 6.11.0-25-generic #25~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 15 17:20:50 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: bpfcc-tools 0.29.1+ds-1ubuntu7
ProcVersionSignature: Ubuntu 6.11.0-25.25~24.04.1-generic 6.11.11
Uname: Linux 6.11.0-25-generic x86_64
ApportVersion: 2.28.1-0ubuntu3.5
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Wed May 7 11:24:13 2025
InstallationDate: Installed on 2024-07-25 (286 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Release amd64 (20240424)
PackageArchitecture: all
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
SourcePackage: bpfcc
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Ryan Lee (rlee287) wrote :
Revision history for this message
Ryan Lee (rlee287) wrote :

Note: this affects linux-hwe-6.11 but not linux-generic (6.8).

Edoardo Canepa (ecanepa)
Changed in linux-hwe-6.11 (Ubuntu Noble):
status: New → Triaged
Revision history for this message
Edoardo Canepa (ecanepa) wrote :
Changed in linux-hwe-6.11 (Ubuntu):
status: New → Invalid
Changed in linux-hwe-6.11 (Ubuntu Noble):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.