fix: remove duration arg from 22 event-based BCC tools (fixes #19)#20
Merged
Merged
Conversation
Event-based BCC tracers (tcpretrans, tcpdrop, killsnoop, etc.) run until killed — they don't accept a duration positional argument. Passing formatDuration(d) caused "unrecognized arguments: 10" errors. Fixed tools (22 total): - Network: tcpretrans, tcpdrop, tcpstates, tcpconnect, tcpaccept, tcplife, udpconnect, sofdsnoop, skbdrop - Process: killsnoop, threadsnoop, syncsnoop, exitsnoop, capable - Disk: filelife, mountsnoop, mdflush - Memory: oomkill, shmsnoop, drsnoop, numamove - CPU: cpufreq - Filter-based (positional arg is threshold, not duration): tcpconnlat (min_ms), gethostlatency (no positional args) Note: biolatency failure in #19 is a BCC/kernel compat issue (blk_account_io_done kprobe removed in kernel 6.x). Requires updated bcc-tools package, not fixable in melisai. Tests: - TestEventBasedToolsNoArgs: verifies all 22 event tools pass no args - TestDurationToolsHaveArgs: guards that histogram/sampling tools still pass duration correctly Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #19
Problem
Event-based BCC tracers don't accept a duration positional argument. melisai was passing
formatDuration(d)(e.g.,10) to all tools, causing:Root Cause
The registry assumed all BCC tools accept
<seconds>as positional arg. In reality, BCC tools split into two categories:runqlat 10 1,biolatency -D 10 1— accept secondstcpretrans,killsnoop,oomkill— run until killed, no duration argFix
22 event-based tools now return
nilargs (rely on context timeout to kill):Note on biolatency
The biolatency failure in #19 is a BCC/kernel compatibility issue —
blk_account_io_donekprobe was removed in kernel 6.x. This requires an updatedbcc-toolspackage and is not fixable in melisai.Tests
TestEventBasedToolsNoArgs: verifies all 22 event tools pass no argsTestDurationToolsHaveArgs: guards that histogram/sampling tools still pass duration🤖 Generated with Claude Code