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

Segmentation fault (core dumped) when running btrfsslower.py #1221

Closed
cmurf opened this issue Jun 11, 2017 · 18 comments
Closed

Segmentation fault (core dumped) when running btrfsslower.py #1221

cmurf opened this issue Jun 11, 2017 · 18 comments

Comments

@cmurf
Copy link

cmurf commented Jun 11, 2017

This is on Fedora 26 (basically the packages are at versions for the beta release)

[root@f26h tools]# ./btrfsslower 
In file included from /virtual/main.c:3:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/include/linux/fs.h:5:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/include/linux/wait.h:8:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/include/linux/spinlock.h:50:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/include/linux/preempt.h:80:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/preempt.h:6:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/include/linux/thread_info.h:25:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/thread_info.h:52:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/cpufeature.h:4:
/lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/processor.h:534:30: warning: taking address of packed member 'sp0' of class or structure 'x86_hw_tss' may
      result in an unaligned pointer value [-Waddress-of-packed-member]
        return this_cpu_read_stable(cpu_tss.x86_tss.sp0);
                                    ^~~~~~~~~~~~~~~~~~~
/lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/percpu.h:391:59: note: expanded from macro 'this_cpu_read_stable'
#define this_cpu_read_stable(var)       percpu_stable_op("mov", var)
                                                                ^~~
/lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/percpu.h:218:16: note: expanded from macro 'percpu_stable_op'
                    : "p" (&(var)));                    \
                             ^~~
In file included from /virtual/main.c:3:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/include/linux/fs.h:5:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/include/linux/wait.h:8:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/include/linux/spinlock.h:50:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/include/linux/preempt.h:80:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/preempt.h:6:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/include/linux/thread_info.h:25:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/thread_info.h:52:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/cpufeature.h:4:
/lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/processor.h:534:30: warning: taking address of packed member 'sp0' of class or structure 'x86_hw_tss' may
      result in an unaligned pointer value [-Waddress-of-packed-member]
        return this_cpu_read_stable(cpu_tss.x86_tss.sp0);
                                    ^~~~~~~~~~~~~~~~~~~
/lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/percpu.h:391:59: note: expanded from macro 'this_cpu_read_stable'
#define this_cpu_read_stable(var)       percpu_stable_op("mov", var)
                                                                ^~~
/lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/percpu.h:223:16: note: expanded from macro 'percpu_stable_op'
                    : "p" (&(var)));                    \
                             ^~~
In file included from /virtual/main.c:3:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/include/linux/fs.h:5:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/include/linux/wait.h:8:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/include/linux/spinlock.h:50:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/include/linux/preempt.h:80:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/preempt.h:6:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/include/linux/thread_info.h:25:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/thread_info.h:52:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/cpufeature.h:4:
/lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/processor.h:534:30: warning: taking address of packed member 'sp0' of class or structure 'x86_hw_tss' may
      result in an unaligned pointer value [-Waddress-of-packed-member]
        return this_cpu_read_stable(cpu_tss.x86_tss.sp0);
                                    ^~~~~~~~~~~~~~~~~~~
/lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/percpu.h:391:59: note: expanded from macro 'this_cpu_read_stable'
#define this_cpu_read_stable(var)       percpu_stable_op("mov", var)
                                                                ^~~
/lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/percpu.h:228:16: note: expanded from macro 'percpu_stable_op'
                    : "p" (&(var)));                    \
                             ^~~
In file included from /virtual/main.c:3:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/include/linux/fs.h:5:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/include/linux/wait.h:8:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/include/linux/spinlock.h:50:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/include/linux/preempt.h:80:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/preempt.h:6:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/include/linux/thread_info.h:25:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/thread_info.h:52:
In file included from /lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/cpufeature.h:4:
/lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/processor.h:534:30: warning: taking address of packed member 'sp0' of class or structure 'x86_hw_tss' may
      result in an unaligned pointer value [-Waddress-of-packed-member]
        return this_cpu_read_stable(cpu_tss.x86_tss.sp0);
                                    ^~~~~~~~~~~~~~~~~~~
/lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/percpu.h:391:59: note: expanded from macro 'this_cpu_read_stable'
#define this_cpu_read_stable(var)       percpu_stable_op("mov", var)
                                                                ^~~
/lib/modules/4.11.3-300.fc26.x86_64/build/arch/x86/include/asm/percpu.h:233:16: note: expanded from macro 'percpu_stable_op'
                    : "p" (&(var)));                    \
                             ^~~
4 warnings generated.
Segmentation fault (core dumped)

bcc-0.3.0-2.fc26.x86_64
kernel-4.11.3-300.fc26.x86_64
python3-3.6.1-6.fc26.x86_64

@marcosps
Copy link

marcosps commented Jul 4, 2017

Same error when trying stacksnoop hid_scan_report.

@yonghong-song
Copy link
Collaborator

I checked fc26. Looks like they only install llvm shared libraries.
[yhs@localhost build]$ cd /usr
[yhs@localhost usr]$ find . -name "libLLVM*" -print
./lib64/libLLVM-4.0.0.so
./lib64/libLLVM-4.0.so
./lib64/libLLVM.so
find: ‘./share/polkit-1/rules.d’: Permission denied
find: ‘./share/selinux/targeted/default/active’: Permission denied
find: ‘./libexec/initscripts/legacy-actions/auditd’: Permission denied
[yhs@localhost usr]$

If you build locally on fc26, you will have issue as well:

[yhs@localhost build]$ !41
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
-- Latest recognized Git tag is v0.3.0
-- Git HEAD is 34cbbfe
-- Revision is 0.3.0-34cbbfe5
CMake Error at /usr/lib64/cmake/llvm/LLVMExports.cmake:955 (message):
The imported target "LLVMDemangle" references the file

 "/usr/lib64/libLLVMDemangle.a"

but this file does not exist. Possible reasons include:

The current bcc requires static libraries.

@drzaeus77 I forgot the history. Is static library absolutely required?

@r4f4
Copy link
Contributor

r4f4 commented Jul 5, 2017

@yonghong-song Do you have llvm-static package installed? Notice that this package is a BuildRequire in the bcc spec file in Fedora.

@r4f4
Copy link
Contributor

r4f4 commented Jul 5, 2017

@cmurf @marcosps it seems that problem is reproducible with all the tools. Not sure what's happening. We need to find out where it is segfaulting.

@yonghong-song
Copy link
Collaborator

As a workaround, you can follow instructions in INSTALL.md to build llvm locally.
https://github.com/iovisor/bcc/blob/master/INSTALL.md#older-instructions

@marcosps
Copy link

marcosps commented Jul 5, 2017

@r4f4 good, I'll try this in the next few days.

@r4f4
Copy link
Contributor

r4f4 commented Jul 7, 2017

I compiled bcc from source and in both python3 and python2 I get the following error when trying to execute the tools:

`# ./cachestat
bpf: Invalid argument

Traceback (most recent call last):
File "./cachestat", line 111, in
b.attach_kprobe(event="add_to_page_cache_lru", fn_name="do_count")
File "/usr/lib/python2.7/site-packages/bcc/init.py", line 514, in attach_kp
robe fn = self.load_func(fn_name, BPF.KPROBE)
File "/usr/lib/python2.7/site-packages/bcc/init.py", line 345, in load_func
(func_name, errstr))
Exception: Failed to load BPF program do_count: Invalid argument
`

@yonghong-song
Copy link
Collaborator

It works fine in my fc25 environment.

@r4f4
Copy link
Contributor

r4f4 commented Jul 7, 2017

@yonghong-song interesting. I will try again in a fc25 box.

@r4f4
Copy link
Contributor

r4f4 commented Jul 10, 2017

Indeed it works fine on f25. Here are the differences:

fc25: kernel-4.11.8-200, llvm-3.9.1-3, python-3.5.3-6
fc26: kernel-4.11.8-300, llvm-4.0.0-2, python-3.6.1-8

@edrex
Copy link

edrex commented Aug 1, 2017

I see similar errors running any of the tools under arch linux, having built from AUR:

/usr/share/bcc/tools                                                                               
_ ./tcptop                                                                                                                                                                            eric@alexandria 
In file included from /virtual/main.c:3:                                                           
In file included from include/net/sock.h:43:                                                       
In file included from include/linux/hardirq.h:4:                                                   
In file included from include/linux/preempt.h:80:                                                                                                                                                 
In file included from ./arch/x86/include/asm/preempt.h:6:                                          
In file included from include/linux/thread_info.h:37:                                              
In file included from ./arch/x86/include/asm/thread_info.h:52:                                     
In file included from ./arch/x86/include/asm/cpufeature.h:4:                                       
./arch/x86/include/asm/processor.h:527:30: warning: taking address of packed member 'sp0' of class or structure 'x86_hw_tss' may result in an unaligned pointer value [-Waddress-of-packed-member]    
        return this_cpu_read_stable(cpu_tss.x86_tss.sp0);                                          
                                    ^~~~~~~~~~~~~~~~~~~                                            
./arch/x86/include/asm/percpu.h:391:59: note: expanded from macro 'this_cpu_read_stable'           
#define this_cpu_read_stable(var)       percpu_stable_op("mov", var)                                                                                                                                  
                                                                ^~~                                
./arch/x86/include/asm/percpu.h:218:16: note: expanded from macro 'percpu_stable_op'               
                    : "p" (&(var)));                    \                                          
                             ^~~                                                                   
In file included from /virtual/main.c:3:                                                           
In file included from include/net/sock.h:43:                                                       
In file included from include/linux/hardirq.h:4:                                                   
In file included from include/linux/preempt.h:80:        
In file included from ./arch/x86/include/asm/preempt.h:6:                                          
In file included from include/linux/thread_info.h:37:                                              
In file included from ./arch/x86/include/asm/thread_info.h:52:                                     
In file included from ./arch/x86/include/asm/cpufeature.h:4:                                                                                                                                      
./arch/x86/include/asm/processor.h:527:30: warning: taking address of packed member 'sp0' of class or structure 'x86_hw_tss' may result in an unaligned pointer value [-Waddress-of-packed-member]    
        return this_cpu_read_stable(cpu_tss.x86_tss.sp0);                                          
                                    ^~~~~~~~~~~~~~~~~~~                                            
./arch/x86/include/asm/percpu.h:391:59: note: expanded from macro 'this_cpu_read_stable'           
#define this_cpu_read_stable(var)       percpu_stable_op("mov", var)                                                                                                                                  
                                                                ^~~                                
./arch/x86/include/asm/percpu.h:223:16: note: expanded from macro 'percpu_stable_op'               
                    : "p" (&(var)));                    \                                          
                             ^~~                                                                                                                                                                      
In file included from /virtual/main.c:3:         
In file included from include/net/sock.h:43:     
In file included from include/linux/hardirq.h:4: 
In file included from include/linux/preempt.h:80:                                                                                                                                                    
In file included from ./arch/x86/include/asm/preempt.h:6:                                                                                                                         
In file included from include/linux/thread_info.h:37:                                                                                                                               
In file included from ./arch/x86/include/asm/thread_info.h:52:                                                                                                                    
In file included from ./arch/x86/include/asm/cpufeature.h:4:                                                                                                                        
./arch/x86/include/asm/processor.h:527:30: warning: taking address of packed member 'sp0' of class or structure 'x86_hw_tss' may result in an unaligned pointer value [-Waddress-of-packed-member]    
        return this_cpu_read_stable(cpu_tss.x86_tss.sp0);                                                                                                                
                                    ^~~~~~~~~~~~~~~~~~~                                                                                                                                               
./arch/x86/include/asm/percpu.h:391:59: note: expanded from macro 'this_cpu_read_stable'
#define this_cpu_read_stable(var)       percpu_stable_op("mov", var)
                                                                ^~~
./arch/x86/include/asm/percpu.h:228:16: note: expanded from macro 'percpu_stable_op'
                    : "p" (&(var)));                    \
                             ^~~
In file included from /virtual/main.c:3:
In file included from include/net/sock.h:43:
In file included from include/linux/hardirq.h:4:
In file included from include/linux/preempt.h:80:
In file included from ./arch/x86/include/asm/preempt.h:6:
In file included from include/linux/thread_info.h:37:
In file included from ./arch/x86/include/asm/thread_info.h:52:
In file included from ./arch/x86/include/asm/cpufeature.h:4:
./arch/x86/include/asm/processor.h:527:30: warning: taking address of packed member 'sp0' of class or structure 'x86_hw_tss' may result in an unaligned pointer value [-Waddress-of-packed-member]
        return this_cpu_read_stable(cpu_tss.x86_tss.sp0);
                                    ^~~~~~~~~~~~~~~~~~~
./arch/x86/include/asm/percpu.h:391:59: note: expanded from macro 'this_cpu_read_stable'
#define this_cpu_read_stable(var)       percpu_stable_op("mov", var)
                                                                ^~~
./arch/x86/include/asm/percpu.h:233:16: note: expanded from macro 'percpu_stable_op'
                    : "p" (&(var)));                    \
                             ^~~
4 warnings generated.
[1]    23915 segmentation fault (core dumped)  ./tcptop
> pacman -Qs llvm                                                                                                                                                                     local/clang 4.0.1-5
    C language family frontend for LLVM
local/lib32-llvm-libs 4.0.1-1
    Low Level Virtual Machine (runtime library)(32-bit)
local/llvm 4.0.1-5
    Low Level Virtual Machine
local/llvm-libs 4.0.1-5
    Low Level Virtual Machine (runtime libraries)

@troyengel
Copy link
Contributor

This may help - the CPP HelloWorld which builds a static copy of libbcc inside itself segfaults, so we can examine it with gdb a bit (this is compiled on Arch with the same above versions):

# gdb -q ./HelloWorld
Reading symbols from ./HelloWorld...(no debugging symbols found)...done.
(gdb) r
Starting program: /root/foo/HelloWorld 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
warning: JITed object file architecture unknown is not compatible with target architecture i386:x86-64.

Program received signal SIGSEGV, Segmentation fault.
0x0000000101995354 in llvm::RuntimeDyldELF::resolveRelocation(llvm::RelocationEntry const&, unsigned long)
    ()


(gdb) bt
#0  0x0000000101995354 in llvm::RuntimeDyldELF::resolveRelocation(llvm::RelocationEntry const&, unsigned long) ()
#1  0x0000000101995385 in llvm::RuntimeDyldELF::resolveRelocation(llvm::RelocationEntry const&, unsigned long) ()
#2  0x0000000101995385 in llvm::RuntimeDyldELF::resolveRelocation(llvm::RelocationEntry const&, unsigned long) ()
#3  0x000000010197d8f9 in llvm::RuntimeDyldImpl::resolveRelocationList(llvm::SmallVector<llvm::RelocationEntry, 64u> const&, unsigned long) ()
#4  0x0000000101980d09 in llvm::RuntimeDyldImpl::resolveRelocations() ()
#5  0x0000000101966871 in llvm::MCJIT::finalizeLoadedModules() ()
#6  0x0000000101966e52 in llvm::MCJIT::finalizeObject() ()
#7  0x000000010064a7e2 in ebpf::BPFModule::finalize() ()
#8  0x0000000100656373 in ebpf::BPF::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<ebpf::USDT, std::allocator<ebpf::USDT> >) ()
#9  0x000000010060570e in main ()


(gdb) frame 0
#0  0x0000000101995354 in llvm::RuntimeDyldELF::resolveRelocation(llvm::RelocationEntry const&, unsigned long) ()


(gdb) info frame
Stack level 0, frame at 0x7fffffffe000:
 rip = 0x101995354 in llvm::RuntimeDyldELF::resolveRelocation(llvm::RelocationEntry const&, unsigned long)
   ; saved rip = 0x101995385
 called by frame at 0x7fffffffe020
 Arglist at 0x7fffffffdfe8, args: 
 Locals at 0x7fffffffdfe8, Previous frame's sp is 0x7fffffffe000
 Saved registers:
  rip at 0x7fffffffdff8

@yonghong-song
Copy link
Collaborator

yonghong-song commented Aug 2, 2017 via email

@yonghong-song
Copy link
Collaborator

I suggest that you use the manual approach described in INSTALL. build llvm and bcc from source codes temporarily until clang/llvm 5.0 official out.

@mpictor
Copy link

mpictor commented Sep 26, 2017

The relocation bug is fixed in llvm/clang 5.0, not released yet

Can you provide a link or bugzilla # for this bug? I'm wondering if/when the fix will be backported, and my google-fu is failing.

@yonghong-song
Copy link
Collaborator

It is fixed by the following llvm patch:

commit bd87726db47eb83032b456d062e936bfc3b3bcaa
Author: Alexei Starovoitov alexei.starovoitov@gmail.com
Date: Wed May 3 17:30:56 2017 +0000

[bpf] add relocation support

  . there should be no runtime relocation inside the bpf function.
  . relocation supported here mostly for debugging.
  . a test case is added.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

@brendangregg
Copy link
Member

Thanks @yonghong-song and @4ast for the patch. If other people are looking, the patch is: https://reviews.llvm.org/rL302055

FWIW, I hit this on Fedora 26 as well. In case people are searching for it, here's the info:

# /usr/share/bcc/tools/opensnoop
In file included from /virtual/main.c:4:
In file included from /lib/modules/4.11.8-300.fc26.x86_64/build/include/linux/sched.h:13:
In file included from /lib/modules/4.11.8-300.fc26.x86_64/build/include/linux/pid.h:4:
In file included from /lib/modules/4.11.8-300.fc26.x86_64/build/include/linux/rculist.h:10:
In file included from /lib/modules/4.11.8-300.fc26.x86_64/build/include/linux/rcupdate.h:38:
In file included from /lib/modules/4.11.8-300.fc26.x86_64/build/include/linux/spinlock.h:50:
In file included from /lib/modules/4.11.8-300.fc26.x86_64/build/include/linux/preempt.h:80:
In file included from /lib/modules/4.11.8-300.fc26.x86_64/build/arch/x86/include/asm/preempt.h:6:
In file included from /lib/modules/4.11.8-300.fc26.x86_64/build/include/linux/thread_info.h:25:
In file included from /lib/modules/4.11.8-300.fc26.x86_64/build/arch/x86/include/asm/thread_info.h:52:
In file included from /lib/modules/4.11.8-300.fc26.x86_64/build/arch/x86/include/asm/cpufeature.h:4:
/lib/modules/4.11.8-300.fc26.x86_64/build/arch/x86/include/asm/processor.h:534:30: warning: taking address of packed member 'sp0' of class or structure 'x86_hw_tss' may result in an unaligned pointer
      value [-Waddress-of-packed-member]
        return this_cpu_read_stable(cpu_tss.x86_tss.sp0);
                                    ^~~~~~~~~~~~~~~~~~~
/lib/modules/4.11.8-300.fc26.x86_64/build/arch/x86/include/asm/percpu.h:391:59: note: expanded from macro 'this_cpu_read_stable'
#define this_cpu_read_stable(var)       percpu_stable_op("mov", var)
                                                                ^~~
/lib/modules/4.11.8-300.fc26.x86_64/build/arch/x86/include/asm/percpu.h:218:16: note: expanded from macro 'percpu_stable_op'
                    : "p" (&(var)));                    \
                             ^~~
[...]
In file included from /virtual/main.c:4:
In file included from /lib/modules/4.11.8-300.fc26.x86_64/build/include/linux/sched.h:13:
In file included from /lib/modules/4.11.8-300.fc26.x86_64/build/include/linux/pid.h:4:
In file included from /lib/modules/4.11.8-300.fc26.x86_64/build/include/linux/rculist.h:10:
In file included from /lib/modules/4.11.8-300.fc26.x86_64/build/include/linux/rcupdate.h:38:
In file included from /lib/modules/4.11.8-300.fc26.x86_64/build/include/linux/spinlock.h:50:
In file included from /lib/modules/4.11.8-300.fc26.x86_64/build/include/linux/preempt.h:80:
In file included from /lib/modules/4.11.8-300.fc26.x86_64/build/arch/x86/include/asm/preempt.h:6:
In file included from /lib/modules/4.11.8-300.fc26.x86_64/build/include/linux/thread_info.h:25:
In file included from /lib/modules/4.11.8-300.fc26.x86_64/build/arch/x86/include/asm/thread_info.h:52:
In file included from /lib/modules/4.11.8-300.fc26.x86_64/build/arch/x86/include/asm/cpufeature.h:4:
/lib/modules/4.11.8-300.fc26.x86_64/build/arch/x86/include/asm/processor.h:534:30: warning: taking address of packed member 'sp0' of class or structure 'x86_hw_tss' may result in an unaligned pointer
      value [-Waddress-of-packed-member]
        return this_cpu_read_stable(cpu_tss.x86_tss.sp0);
                                    ^~~~~~~~~~~~~~~~~~~
/lib/modules/4.11.8-300.fc26.x86_64/build/arch/x86/include/asm/percpu.h:391:59: note: expanded from macro 'this_cpu_read_stable'
#define this_cpu_read_stable(var)       percpu_stable_op("mov", var)
                                                                ^~~
/lib/modules/4.11.8-300.fc26.x86_64/build/arch/x86/include/asm/percpu.h:233:16: note: expanded from macro 'percpu_stable_op'
                    : "p" (&(var)));                    \
                             ^~~
4 warnings generated.
Segmentation fault (core dumped)

and the stack:

# gdb /usr/bin/python3 core.2924
[...]
Core was generated by `/usr/bin/python3 /usr/share/bcc/tools/opensnoop'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007ff4fac76ee4 in llvm::RuntimeDyldELF::resolveRelocation(llvm::RelocationEntry const&, unsigned long) () from /lib64/libbcc.so.0
Missing separate debuginfos, use: dnf debuginfo-install python3-3.6.1-8.fc26.x86_64
(gdb) bt
#0  0x00007ff4fac76ee4 in llvm::RuntimeDyldELF::resolveRelocation(llvm::RelocationEntry const&, unsigned long) () from /lib64/libbcc.so.0
#1  0x00007ff4fac76f14 in llvm::RuntimeDyldELF::resolveRelocation(llvm::RelocationEntry const&, unsigned long) () from /lib64/libbcc.so.0
#2  0x00007ff4fac76f14 in llvm::RuntimeDyldELF::resolveRelocation(llvm::RelocationEntry const&, unsigned long) () from /lib64/libbcc.so.0
#3  0x00007ff4fac60ba9 in llvm::RuntimeDyldImpl::resolveRelocationList(llvm::SmallVector<llvm::RelocationEntry, 64u> const&, unsigned long) () from /lib64/libbcc.so.0
#4  0x00007ff4fac63520 in llvm::RuntimeDyldImpl::resolveRelocations() () from /lib64/libbcc.so.0
#5  0x00007ff4fac4a71f in llvm::MCJIT::finalizeLoadedModules() () from /lib64/libbcc.so.0
#6  0x00007ff4fac4ace1 in llvm::MCJIT::finalizeObject() () from /lib64/libbcc.so.0
#7  0x00007ff4fa80525a in ebpf::BPFModule::finalize() () from /lib64/libbcc.so.0
#8  0x00007ff4fa7fe4cb in bpf_module_create_c_from_string () from /lib64/libbcc.so.0
#9  0x00007ff4fc9b1bde in ffi_call_unix64 () from /lib64/libffi.so.6
#10 0x00007ff4fc9b154f in ffi_call () from /lib64/libffi.so.6
#11 0x00007ff4fcbcfcf9 in _ctypes_callproc () from /usr/lib64/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so
#12 0x00007ff4fcbcfee4 in PyCFuncPtr_call () from /usr/lib64/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so
#13 0x00007ff5047a62d4 in _PyObject_FastCallDict () from /lib64/libpython3.6m.so.1.0
#14 0x00007ff504816d3d in call_function () from /lib64/libpython3.6m.so.1.0
#15 0x00007ff504853f6a in _PyEval_EvalFrameDefault () from /lib64/libpython3.6m.so.1.0
#16 0x00007ff5047a5103 in _PyEval_EvalCodeWithName () from /lib64/libpython3.6m.so.1.0
#17 0x00007ff5047a6147 in _PyFunction_FastCallDict () from /lib64/libpython3.6m.so.1.0
#18 0x00007ff5047a64ae in _PyObject_FastCallDict () from /lib64/libpython3.6m.so.1.0
#19 0x00007ff5047b02a1 in _PyObject_Call_Prepend () from /lib64/libpython3.6m.so.1.0
#20 0x00007ff5047a688b in PyObject_Call () from /lib64/libpython3.6m.so.1.0
#21 0x00007ff50480e5c9 in slot_tp_init () from /lib64/libpython3.6m.so.1.0
#22 0x00007ff50480f9ee in type_call () from /lib64/libpython3.6m.so.1.0
#23 0x00007ff5047a62d4 in _PyObject_FastCallDict () from /lib64/libpython3.6m.so.1.0
#24 0x00007ff50480f958 in _PyObject_FastCallKeywords () from /lib64/libpython3.6m.so.1.0
#25 0x00007ff504816d3d in call_function () from /lib64/libpython3.6m.so.1.0
#26 0x00007ff504854ef5 in _PyEval_EvalFrameDefault () from /lib64/libpython3.6m.so.1.0
#27 0x00007ff504823c87 in PyEval_EvalCodeEx () from /lib64/libpython3.6m.so.1.0
#28 0x00007ff504824a3b in PyEval_EvalCode () from /lib64/libpython3.6m.so.1.0
#29 0x00007ff5048ac5f2 in run_mod () from /lib64/libpython3.6m.so.1.0
#30 0x00007ff5048ad2bd in PyRun_FileExFlags () from /lib64/libpython3.6m.so.1.0
#31 0x00007ff5048af547 in PyRun_SimpleFileExFlags () from /lib64/libpython3.6m.so.1.0
#32 0x00007ff5048b0543 in Py_Main () from /lib64/libpython3.6m.so.1.0
#33 0x000055f252dc5cf5 in main ()

@cmurf
Copy link
Author

cmurf commented Oct 28, 2020

long since fixed, closing

@cmurf cmurf closed this as completed Oct 28, 2020
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

No branches or pull requests

8 participants