Replaying fails when converting big file into json format
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start in pkg/kevent/marshaller_windows.go at Kevent.UnmarshalRaw around line 394, then trace how pkg/kcap/reader_windows.go passes capture data into it. Reproduce with a large .kcap file using the reported fibratus replay command and JSON output. Done means replay completes without the slice bounds panic; the report says this worked in v2.3.0 and fails in v2.4.0.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
Hi, I have a common issue when I try to replay big capture files (like 300 Mo .kcap file)
When I use this command :
fibratus replay -k events.kcap --output.console.format json > capture.json
I get the following error :
panic: runtime error: slice bounds out of range [129756:109723]
goroutine 9 [running]:
github.com/rabbitstack/fibratus/pkg/kevent.(*Kevent).UnmarshalRaw(0xc0078956c0, {0xc007a3e000, 0x1ac9b, 0x1ac9b}, 0x2)
D:/a/fibratus/fibratus/pkg/kevent/marshaller_windows.go:394 +0x224f
github.com/rabbitstack/fibratus/pkg/kevent.NewFromKcap({0xc007a3e000, 0x1ac9b, 0x1ac9b}, 0x2)
D:/a/fibratus/fibratus/pkg/kevent/kevent.go:234 +0xa5
github.com/rabbitstack/fibratus/pkg/kcap.(*reader).Read.func1()
D:/a/fibratus/fibratus/pkg/kcap/reader_windows.go:137 +0x306
created by github.com/rabbitstack/fibratus/pkg/kcap.(*reader).Read in goroutine 1
D:/a/fibratus/fibratus/pkg/kcap/reader_windows.go:109 +0xc8
How to reproduce it
I have first realized a big capture, for testing purposes, by installing and removing programs, with the following command :
fibratus capture -o events.kcap
Then, I try to write it into a json file using the following command :
fibratus replay -k events.kcap --output.console.format json > capture.json
However, I get the error described above before I managed to load the complete capture into my json file
Expected behavior
I expected to get a full capture file without any incidents. When I tried the same steps with fibratus v2.3.0, it worked perfectly. However, after updating to v2.4.0, it does not work anymore.
Environment
-
Fibratus version:
Version : 2.4.0
Commit : 6e9efb83
Build date : 20-05-2025.17:13:06
Go compiler : go1.23.9
-
Configuration:
aggregator ..................... [ flush-timeout=>4s flush-period=>500ms] alertsenders ................... [ mail=>[ port=>25 enabled=>false content-type=>text/html to=>[] use-template=>true] eventlog=>[ verbose=>true enabled=>true] slack=>[ enabled=>false] systray=>[ quiet-mode=>false enabled=>false sound=>true]] api ............................ [ timeout=>5s transport=>localhost:8482] config-file .................... C:\Program Files\fibratus\config\fibratus.yml debug-privilege ................ true filament ....................... [ path=>C:\Program Files\fibratus\filaments] filters ........................ [ rules=>[ enabled=>true from-urls=>[] from-paths=>[C:\Program Files\Fibratus\Rules\*]] macros=>[ from-paths=>[C:\Program Files\Fibratus\Rules\Macros\*]] match-all=>true] forward ........................ false handle ......................... [ init-snapshot=>false enumerate-handles=>false] kcap ........................... [] kevent ......................... [ serialize-threads=>false serialize-handles=>false serialize-pe=>false serialize-envs=>false serialize-images=>false] kstream ........................ [ enable-thread=>true enable-dns=>true enable-registry=>true blacklist=>[ images=>[] events=>[CloseFile RegCloseKey]] enable-audit-api=>true enable-fileio=>true min-buffers=>16 enable-mem=>true enable-net=>true flush-interval=>1s enable-vamap=>true max-buffers=>36 enable-threadpool=>true enable-image=>true enable-handle=>false buffer-size=>512 stack-enrichment=>true] logging ........................ [ max-size=>100 max-age=>0 level=>info log-stdout=>false max-backups=>15 formatter=>text] output ......................... [ amqp=>[ routing-key=>fibratus exchange-type=>topic enabled=>false delivery-mode=>transient vhost=>/ url=>amqp://localhost:5672 exchange=>fibratus durable=>false tls-insecure-skip-verify=>false timeout=>5s passive=>false] http=>[ serializer=>json endpoints=>[] enabled=>false timeout=>5s enable-gzip=>false tls-insecure-skip-verify=>false method=>POST] eventlog=>[ level=>info enabled=>false] elasticsearch=>[ gzip-compression=>false servers=>[http://127.0.0.1:9200] sniff=>false flush-period=>1s healthcheck-timeout=>5s bulk-workers=>1 healthcheck=>true template-name=>fibratus trace-log=>false index-name=>fibratus enabled=>false healthcheck-interval=>10s timeout=>5s] console=>[ enabled=>true format=>pretty]] pe ............................. [ excluded-images=>[svchost.exe] enabled=>false read-symbols=>false read-resources=>false read-sections=>false] symbol-paths ................... srv*c:\\SymCache*https://msdl.microsoft.com/download/symbols symbolize-kernel-addresses ..... false transformers ................... [ trim=>[ enabled=>false] replace=>[ enabled=>false] remove=>[ kparams=>[] enabled=>false] tags=>[ enabled=>false] rename=>[ enabled=>false]] yara ........................... [ skip-registry=>false fastscan=>true scan-timeout=>10s enabled=>false skip-mmaps=>false skip-files=>false rule=>[ strings=>[map[namespace:<nil> string:<nil>]] paths=>[map[namespace: path:]]] excluded-procs=>[] excluded-files=>[] skip-allocs=>false] -
OS:
Windows 11
- 主要言語
- Go
- スター
- 2.6k
- フォーク
- 222
- 平均マージ
- 16時間 23分
- マージ済み PR(30日)
- 11
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rabbitstack/fibratus のほかの issue
-
Service crashes on Windows Server 2016: "panic: sub-authority index out of range" in RidToStringオープンtype: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
rabbitstack/fibratus#761 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
CI: the test job has been red since September, and TestFsProcessor looks like a real mmap regressionオープンci
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
rabbitstack/fibratus#754 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ci rules type: enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
rabbitstack/fibratus#715 ·
メンテナーはふだん 1 日以内に返信
-
scope: hardering type: enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
rabbitstack/fibratus#713 ·
メンテナーはふだん 1 日以内に返信
-
needs: config scope: events/telemetry type: feature
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
rabbitstack/fibratus#710 ·
メンテナーはふだん 1 日以内に返信
rabbitstack/fibratus の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
unbound-force/replicator#193 ·
メンテナーはふだん 2 日以内に返信
-
A Gemini stream that fails partway completes the call with the partial text対応中かも @bnaylor が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
go-steer/core-agent#1600 ·
メンテナーはふだん 1 日以内に返信
-
bug raised-by:reviewer
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
medici-finance/assay#7655 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Edwin-metcalf/MetCode#67 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信