Giter Site home page Giter Site logo

uwnetworkslab / meshinsight Goto Github PK

View Code? Open in Web Editor NEW
42.0 42.0 7.0 578 KB

MeshInsight: Dissecting Overheads of Service Mesh Sidecars

License: Apache License 2.0

Python 49.27% Dockerfile 0.06% Go 0.94% Shell 3.19% Lua 13.32% Perl 22.68% C 0.06% HTML 8.78% Rust 1.70%
envoy istio performance-analysis service-mesh

meshinsight's People

Contributors

haokang-timmy avatar livingshade avatar romero027 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

meshinsight's Issues

ValueError: Input y contains NaN

Hi
I was getting the below error after running offline profiler for meshinsight:

Traceback (most recent call last):
  File "./meshinsight/profiler/offline_profiler.py", line 604, in <module>
    latency_models = build_latency_model(latency_profile, request_sizes, p)
  File "./meshinsight/profiler/offline_profiler.py", line 271, in build_latency_model
    models['read_reg'] = linear_regression("read", read_data)
  File "./meshinsight/profiler/offline_profiler.py", line 262, in linear_regression
    reg = LinearRegression().fit(X, y)
  File "/home/ryzen02/.local/lib/python3.8/site-packages/sklearn/linear_model/_base.py", line 648, in fit
    X, y = self._validate_data(
  File "/home/ryzen02/.local/lib/python3.8/site-packages/sklearn/base.py", line 584, in _validate_data
    X, y = check_X_y(X, y, **check_params)
  File "/home/ryzen02/.local/lib/python3.8/site-packages/sklearn/utils/validation.py", line 1122, in check_X_y
    y = _check_y(y, multi_output=multi_output, y_numeric=y_numeric, estimator=estimator)
  File "/home/ryzen02/.local/lib/python3.8/site-packages/sklearn/utils/validation.py", line 1132, in _check_y
    y = check_array(
  File "/home/ryzen02/.local/lib/python3.8/site-packages/sklearn/utils/validation.py", line 921, in check_array
    _assert_all_finite(
  File "/home/ryzen02/.local/lib/python3.8/site-packages/sklearn/utils/validation.py", line 161, in _assert_all_finite
    raise ValueError(msg_err)
ValueError: Input y contains NaN.

Before this error I was also getting some runtime warnings


/home/ryzen02/.local/lib/python3.8/site-packages/numpy/core/fromnumeric.py:3464: RuntimeWarning: Mean of empty slice.
  return _methods._mean(a, axis=axis, dtype=dtype,
/home/ryzen02/.local/lib/python3.8/site-packages/numpy/core/_methods.py:192: RuntimeWarning: invalid value encountered in scalar divide
  ret = ret.dtype.type(ret / rcount)
/home/ryzen02/.local/lib/python3.8/site-packages/numpy/core/_methods.py:269: RuntimeWarning: Degrees of freedom <= 0 for slice
  ret = _var(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/home/ryzen02/.local/lib/python3.8/site-packages/numpy/core/_methods.py:226: RuntimeWarning: invalid value encountered in divide
  arrmean = um.true_divide(arrmean, div, out=arrmean,
/home/ryzen02/.local/lib/python3.8/site-packages/numpy/core/_methods.py:261: RuntimeWarning: invalid value encountered in scalar divide

I am running meshinsight on Ubuntu18.04 , kernel version 4.15 , python3.8 and istio 1.18.0.

[Error] Failed to attach BPF program b'trace_func_entry' to kprobe

Hello,
I use Ubuntu 20.04, and meshinsight commit is f2e2142c5d5fe641ddc4a8675614c2d10e9eac5f

Author: lbr <[email protected]>
Date:   Sat Mar 25 21:56:20 2023 -0400

    set default CNI to flannel

wenn i run

sudo python3 ./meshinsight/profiler/offline_profiler.py --latency --cpu -v

I received the error:

29-Mar-23 22:43:10 |    DEBUG | Running cmd: python3 /home/naibaoofficial/projects/meshinsight/meshinsight/profiler/latency/funclatency_filter.py -p 114620 ep_send_events_proc -d 30 -t 0
Traceback (most recent call last):
  File "/home/naibaoofficial/projects/meshinsight/meshinsight/profiler/latency/funclatency_filter.py", line 380, in <module>
    b.attach_kprobe(event_re=pattern, fn_name="trace_func_entry")
  File "/usr/lib/python3/dist-packages/bcc/__init__.py", line 835, in attach_kprobe
    raise Exception("Failed to attach BPF program %s to kprobe %s"
Exception: Failed to attach BPF program b'trace_func_entry' to kprobe , it's not traceable (either non-existing, inlined, or marked as "notrace")

The python context is:

# load BPF program
b = BPF(text=bpf_text)

# attach probes
if not library:
    b.attach_kprobe(event_re=pattern, fn_name="trace_func_entry")
    b.attach_kretprobe(event_re=pattern, fn_name="trace_func_return")
    matched = b.num_open_kprobes()

Could anyone help me to fix it?
Thank you

Exception: Failed to compile BPF module <text>

I am facing the following error after running the code for Meshinsight's profiler:

ryzen02@ryzen02-rs-iiitd:~/meshinsight$ sudo python3 ./meshinsight/profiler/offline_profiler.py --latency --cpu
18-Jun-23 18:35:42 |     INFO | Starting latency profiling!
In file included from /virtual/main.c:2:
In file included from include/uapi/linux/ptrace.h:143:
In file included from ./arch/x86/include/asm/ptrace.h:5:
./arch/x86/include/asm/segment.h:266:2: error: expected '(' after 'asm'
        alternative_io ("lsl %[seg],%[p]",
        ^
./arch/x86/include/asm/alternative.h:240:2: note: expanded from macro 'alternative_io'
        asm_inline volatile (ALTERNATIVE(oldinstr, newinstr, feature)   \
        ^
include/linux/compiler_types.h:214:24: note: expanded from macro 'asm_inline'
#define asm_inline asm __inline
                       ^
/virtual/main.c:53:9: error: no member named 'atomic_increment' in 'struct avg_table_t'
    avg.atomic_increment(lat, delta);
    ~~~ ^
/virtual/main.c:54:9: error: no member named 'atomic_increment' in 'struct avg_table_t'
    avg.atomic_increment(cnt);
    ~~~ ^
/virtual/main.c:59:10: error: no member named 'atomic_increment' in 'struct dist_table_t'
    dist.atomic_increment(bpf_log2l(delta));
    ~~~~ ^
4 errors generated.
Traceback (most recent call last):
  File "/home/ryzen02/meshinsight/meshinsight/profiler/latency/funclatency.py", line 345, in <module>
    b = BPF(text=bpf_text)
  File "/usr/lib/python3/dist-packages/bcc/__init__.py", line 343, in __init__
    raise Exception("Failed to compile BPF module %s" % (src_file or "<text>"))
Exception: Failed to compile BPF module <text>
Traceback (most recent call last):
  File "./meshinsight/profiler/offline_profiler.py", line 596, in <module>
    syscall_overhead  = profile_syscall(args.duration)
  File "./meshinsight/profiler/offline_profiler.py", line 41, in profile_syscall
    result = subprocess.run(cmd, stdout=subprocess.PIPE, check=True)
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['python3', '/home/ryzen02/meshinsight/meshinsight/profiler/latency/funclatency.py', '-p 6234', 'c:getpid', '-d 30']' returned non-zero exit status 1.

I am using Linux kernel version 5.4.0 , Ubuntu 18.04, Python 3.8, libllvm 6.0 , libclang 6.0 , llvm 6.0

I would be obliged if someone can help with this !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.