-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"brimcap analyze" hangs on a pcap that produces no Suricata logs #112
Comments
Huh, interesting. This is a good bit of debug for me to go off of. |
Fix error where an analyze process that writes no records caused a deadlock. Closes #112
Fix error where an analyze process that writes no records caused a deadlock. Closes #112
Verified in Brimcap commit 1760eba. Now instead of hanging, when processing the example pcap, Brimcap now exits with an appropriate error.
Unfortunately it looks like the higher-level problem of Brim hanging is still there even when using this newer Brimcap version, and per the verification video in #111 (comment) it looks to be due to the fact that the app still uses Thanks @mattnibs! |
Repro is with Brimcap commit 357bd57, but I also confirmed this issue was with us at commit 6406f89, so it seems it's not unique to the recent refactor of
brimcap analyze
(#110).The ultimate user problem is that they tried to drag a pcap into Brim which neither Zeek nor Suricata can produce meaningful logs from. The attached test pcap
cap_00001_20210622092340.pcap.gz (after uncompressing) reproduces the issue. Using Brim commit
976d840
with itspackage.json
pointing at Brimcap commit 357bd57, the following video shows the current user-facing result, which is:brimcap
process is left behind and must be killed manuallyRepro.mp4
The inability to parse is ultimately an orthogonal Zeek/Suricata problem and is separately tracked in #107. However, knowing that un-parse-able pcaps are likely to come up in practice, the purpose of this issue to ensure that we can fail on them gracefully so we don't have the kind of hanging & orphaned process like we just saw.
Knowing that our intent is to move to a
brimcap analyze
approach, I then reproduced it at the CLI, seeing it hang there as well.Analyze-Hang.mp4
The dump it showed after I gave up and Ctrl-
\
'ed it:Knowing as I do that
brimcap analyze
is just calling the built-inzeekrunner
andsuricatarunner
, I also repro'ed at that layer, and I think I see what's going on.I think Zeek is doing fine. It produces a few useless logs that reflect little beyond its inability to parse, but at minimum the
weird.log
that gets produced could have been turned into ZNG/ZSON just fine.I suspect Suricata is what's giving the problem. Its output reflects its inability to parse the pcap, but unfortunately it then shows an exit code of
0
and a zero-lengtheve.json
.Is it possible the successful exit of the analyzer process is somehow not playing well with the zero-length log file, such that maybe we're hung waiting on output that's never going to arrive? If so, maybe we need some special handling to catch this corner case.
The text was updated successfully, but these errors were encountered: