Quantcast
Channel: Active questions tagged crash - Stack Overflow
Viewing all articles
Browse latest Browse all 7199

Tshark crashes silently on the first received packet randomly (linux)

$
0
0

I have a custom sniffer, which produces output in pcapng format. I launch it like that:

<sniffer launch line> | tee out.pcapng | tshark -Tpdml -i -

expecting to have a pdml output in stdout. Generally it works, but sometimes the following happens: after the first packet was written to stdout by sniffer, tshark just reports 0 packets captured and closes. At the same time the out.pcapng appears to be valid and successfully can be opened with wireshark.

Moreover, when I try cat out.pcapng | tshark -Tpdml -i -, it would handle the input successfully in 90% of launches, but would still fail sometimes.

It seems, that changing tshark flag from -i to -r helps, but I'm not sure if it solves the problem or just make it appear less often. And anyway, I'd be pleased to know what actually happens there. Launching tsahrk with stdbuf -o 0 tshark ... doesn't help.

An example of problematic .pcapng file: https://drive.google.com/file/d/1GS41yti0zs5-ZT5bgRNYslIQW1q_fDfQ/view?usp=sharing

Version of Tshark: TShark (Wireshark) 3.2.3 (Git v3.2.3 packaged as 3.2.3-1)


Viewing all articles
Browse latest Browse all 7199

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>