mscdex / cap

A cross-platform binding for performing packet capturing with node.js
MIT License
361 stars 45 forks source link

Assertion `status == 0’ failed #82

Open mwittig opened 5 years ago

mwittig commented 5 years ago
node: …/src/binding.cc:186: static void Pcap::cb_packets(uv_poll_t*, int, int): Assertion `status == 0’ failed.

I think, socket errors need to be properly handled similar to the cases reported earlier. See #23 and #26

mscdex commented 5 years ago

Can you provide a reproducible test for this? What platform did you encounter this on?

mwittig commented 5 years ago

Sorry for the delay in reply. The platform is:

libpcap 1.6.2-2
Linux raspberrypi 4.9.35-v7+

I am using cap as part of complex application. Thus I'll try to to create an isolated test case.

Generally, I am wondering why status != 0 isn't handled gracefully. Is it really a pathological case? A similar assertion issue had occurred on Windows earlier. See #23 and #26

mscdex commented 5 years ago

What node version and cap version are you using?

mscdex commented 5 years ago

Also, does simply commenting out the offending line out fix the issue or cause other problems? It would be interesting to know what the status value is when it's not zero.... it should correspond to an libuv error.