iovisor / iovisor/bcc

Can't execute networks example on 32 bits architecture

Open
#2,273 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

Hello,

I am currently trying to use python-bcc and python3-bcc on servers having a 32 bits architecture without any success.
I successfully builded all the bcc packages (after pulling master branch) and installed them on a virtual machine with debian stretch 32 bits installed
uname -a gives me :
```
Linux bcc 4.19.0-0.bpo.2-686 #1 SMP Debian 4.19.16-1~bpo9+1 (2019-02-07) i686 GNU/Linux
```
When trying to execute my python scripts or even the networking examples, I have the following results.
Python 2.7 :
```
charles@bcc:/usr/share/bcc/examples/networking/neighbor_sharing$ sudo -HE PYTHONPATH=$PYTHONPATH:/home/charles/.local/lib/python2.7/site-packages/ python tc_neighbor_sharing.py
Traceback (most recent call last):
File "tc_neighbor_sharing.py", line 14, in
b = BPF(src_file="tc_neighbor_sharing.c", debug=0)
File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 344, in __init__
self._trace_autoload()
File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 1087, in _trace_autoload
for i in range(0, lib.bpf_num_functions(self.module)):
OverflowError: range() result has too many items
```
Python 3.5 :
```
charles@bcc:/usr/share/bcc/examples/networking/neighbor_sharing$ sudo -HE PYTHONPATH=$PYTHONPATH:/home/charles/.local/lib/python3.5/site-packages/ python3 tc_neighbor_sharing.py
Traceback (most recent call last):
File "tc_neighbor_sharing.py", line 14, in
b = BPF(src_file="tc_neighbor_sharing.c", debug=0)
File "/usr/lib/python3/dist-packages/bcc/__init__.py", line 344, in __init__
self._trace_autoload()
File "/usr/lib/python3/dist-packages/bcc/__init__.py", line 1089, in _trace_autoload
if func_name.startswith(b"kprobe__"):
AttributeError: 'NoneType' object has no attribute 'startswith'
```

The same python script and examples are working fine on 64 bits architecture.
By the way bcc is great :)

Best regards

Charles

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.