Duplicated keys on argdist per string
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
I was on an eBPF workshop by @goldshtn at SRECon Europe 2016 and ran into the following situation:
Running `argdist -z 4 -v -p $(pidof node) -C 'u:/usr/local/bin/node:http__server__request():char*:arg6'` to, hopefully, get a list of counts by path requested to the node.js server.
Doing the following test `for i in {1..10000}; do curl http://localhost:8080/hiiii; done` would cause the following output:
``` u:/usr/local/bin/node:http__server__request():char*:arg6
COUNT EVENT
196 arg6 = /hiiii
199 arg6 = /hiiii
[15:43:29]
u:/usr/local/bin/node:http__server__request():char*:arg6
COUNT EVENT
199 arg6 = /hiiii
224 arg6 = /hiiii
[15:43:30]
u:/usr/local/bin/node:http__server__request():char*:arg6
COUNT EVENT
199 arg6 = /hiiii
251 arg6 = /hiiii
[15:43:31]
u:/usr/local/bin/node:http__server__request():char*:arg6
COUNT EVENT
199 arg6 = /hiiii
251 arg6 = /hiiii
[15:43:32]
u:/usr/local/bin/node:http__server__request():char*:arg6
COUNT EVENT
199 arg6 = /hiiii
251 arg6 = /hiiii
[15:43:33]
u:/usr/local/bin/node:http__server__request():char*:arg6
COUNT EVENT
199 arg6 = /hiiii
251 arg6 = /hiiii
```
A bit more investigation with @goldshtn indicates that adding the flag `-z 4` fixes the problem.
I believe he mentioned that this could mean that there's some uninitialized data in the string used as the key.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.