eunomia-bpf / bpftime

Userspace eBPF runtime for fast Uprobe & Syscall hook & Extensions with LLVM JIT
https://eunomia.dev/bpftime/
MIT License
699 stars 70 forks source link

[BUG] bpftimetool should not report shm removed when there is nothing to remove #169

Closed agentzh closed 4 months ago

agentzh commented 6 months ago

Currently, running bpftimetool multiple times always gives the message:

[agentzh@fed32-dev ~/bpftime 134 (master)]$ bpftimetool remove
[2024-01-27 12:57:56.552] [info] [bpftime_shm_internal.cpp:46] Global shm removed
[agentzh@fed32-dev ~/bpftime 0 (master)]$ sudo bpftimetool remove
[2024-01-27 12:57:58.261] [info] [bpftime_shm_internal.cpp:46] Global shm removed
[agentzh@fed32-dev ~/bpftime 0 (master)]$ sudo bpftimetool remove
[2024-01-27 12:58:01.619] [info] [bpftime_shm_internal.cpp:46] Global shm removed

It's confusing to see it reports "Global shm removed" when there is actually nothing to remove...

aneeshdamle11 commented 5 months ago

Hello, I'd like to work on this issue. I'm fairly new to open-source programming and would love to start contributing.