-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
A number of Wireshark bugs have been filed due to a
Can't get packet-drop statistics: PacketGetStats error: The I/O operation has been aborted because of either a thread exit or an application request. (995)
error.
That comes from a pcap_stats() call in the dumpcap program (the program that does traffic capture for Wireshark and TShark). That ultimately turns into a BIOCGSTATS DeviceIoControl() call; that call isn't overlapped, so:
- I'm not sure how it'd be aborted by an application request unless another thread closes the HANDLE in the
pcap_t, and I don't see any path to close thepcap_tbefore thepcap_stats()call; - the thread making the call hasn't exited as 1) it's in the middle of the call and 2) when the call fails it continues and reports the error.
Looking at the driver (from current Git master), I don't see any obvious way that ERROR_OPERATION_ABORTED would be returned.
I can reproduce this with Wireshark 3.0.2 and Npcap 0.995, running on Windows 7 in a virtual machine on my Mac, with a USB Wi-Fi adapter attached to the VM, by starting a capture on the Wi-Fi adapter and then suspending and restarting the virtual machine.
The first error I get is
"The network adapter on which the capture was being done is no longer running; the capture has stopped."
which is probably dumpcap's translation of a "read error: PacketReceivePacket failed" error reported by Npcap (dumpcap maps various errors reported by libpcap/WinPcap/Npcap for an interface going down into that message; I need to arrange for a way for pcap to return a common "interface went down, capture stopped" error).
When I dismiss that dialog, I get the
"Can't get packet-drop statistics: PacketGetStats error: The I/O operation has been aborted because of either a thread exit or an application request. (995)"
error.