-
Notifications
You must be signed in to change notification settings - Fork 132
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
"Error: write EPIPE" or "Error: write EPIPE" on attempted pcap import #2926
Comments
I don't know if it could be related at all, but I also noticed there's an open Brimcap issue brimdata/brimcap#167 that mentions |
I remain uncertain as to the degree that this is a Brimcap problem vs. a Zui problem vs. both. I'll continue to track here until there's more clarity around that. I did some more debugging with a local build of Brimcap commit Analyzing the pcap with this Zeek-only config:
I see:
Likewise with this Suricata-only config:
I see:
After clearing out the
To summarize what I just saw:
|
What's happening here is that Suricata is exiting cleanly (i.e., with status 0) without reading its standard input to EOF. When Suricata exits, io.Copy in the goroutine created by analyzer.runProcesses returns because writes to the pipe connected to its standard input start failing. The goroutine then closes Zeek's standard input, resulting in this error. |
I talked to @nwt offline about has last comment above. He confirmed the fix here would be non-trivial, but we know what it would take to fix it. We've got other priorities at the moment so we're not going to get to this right away. We also agreed that the error handling on the Zui side could still stand to be improved as I noted above, so I'll let this live on as a Zui issue and I can spawn off a Brimcap issue when we get some time to fix that side of things. |
We recently had what looks like another incident of this, brought to our attention in a community Slack thread. In their own words:
The user shared their pcap for repro but due to sensitivity asked that we not share it. However, the repro in the attached video shows once again that when I repro on macOS I instead see the exception as Repro.mp4Separate from the exception, @nwt studied the nature of this pcap:
We've got work underway in https://github.com/brimdata/build-zeek to start building a newer Zeek that we can ship with Zui, so we hope to soon be at a point where the user's pcap would have loaded without error. However, since other problems of this nature are likely to come up in the future with unsupported link layer protocols, it's another reminder that we'll want to improve the error handling here. |
The video below verifies the error handling improvements from #2955. Using the pcap data referenced in the opening of this issue, we no longer see the confusing pop-up, and instead the Zeek error that's bubbled up through Brimcap is presented and persists. Verify.mp4That specific error from Zeek unfortunately doesn't quite capture the "802.11 isn't supported" nature of the root issue, but that's a Zeek problem and not a Zui/Brimcap one. In the time since this issue was opened, Zui is now using a very current Zeek artifact (based on Zeek v6.0.3 so to the degree that there's some 802.11 support in there, it would remain an "exercise for the user" to pursue via a Custom Brimcap Config. |
Since Zui is now handling this error better as shown in the last comment above, I'm going to go ahead and close this issue. In an offline discussion with @nwt and @mattnibs it was confirmed that Brimcap could also still do some better handling of the failure condition (as described above) so a new Brimcap issue brimdata/brimcap#331 has been opened to track that. |
tl;dr
An attempt to import a pcap containing 802.11 traffic resulted in a JavaScript error pop-up. I suspect the root cause is a Zeek failure that bubbles up through Brimcap. It would seem ideal if we could catch and surface that error instead.
Details
Repro is with Zui commit 29860a0.
This issue was reported in a recent community Slack thread. In the user's own words:
The user shared their pcap VanSpy.pcapng.zip which I used to reproduce the problem with Zui 29860a0 on macOS as shown in the attached video. In my repro it happened to show
Error: write EPIPE
as the exception instead.Repro.mp4
As it turns out, if I dismiss the pop-up I can see a handful of Zeek events were generated based on the pcap. However, since the user was clearly expecting to see more, the pop-up gives the impression that the limited data was possibly due to a bug.
After seeing this, I opened the pcap file in Wireshark and could see the likely problem: All the traffic is 802.11. We've confronted this before and a prior issue asking about 802.11 (#570) was closed a long time ago when the team concluded that there's really not much that can be done here since Zeek and Suricata seem to expect IP traffic. In the time since I can see some 802.11 references in the Zeek repo so maybe there's potential for something there, but we're currently stuck with the older Zeek/Suricata artifacts we've got.
After seeing this, I dropped to the shell and sniffed the
brimcap
command line out ofps
and tried to run it by hand. Here's what I saw:So indeed, it looks like
brimcap
effectively failed because Zeek failed. However, is there any hope of catching the failure and surfacing the error in that last line instead of the JavaScript error that pops up now? If we could present that error text along with links to https://zui.brimdata.io/docs/support/Troubleshooting and https://github.com/brimdata/brimcap/wiki/Troubleshooting it would give the user a bit more to go on, e.g., I could make an entry in one of the Troubleshooting guides specifically acknowledging that 802.11 is not going to work.The text was updated successfully, but these errors were encountered: