nixpanic/gluster-wireshark-1.4

Wireshark and tshark crash when searching for specific glusterfs procedures

nixpanic opened this issue · 2 comments

The tcpdump test-some-fops.pcap.gz from the Reference Captures causes segmentation faults when searching for a specific glusterfs procedure. Search for glusterfs == 1 should show STAT calls, where glusterfs == 27 shows all LOOKUP calls.

For example:

$ tshark -r test-some-fops.pcap.gz 'glusterfs == 1'
Segmentation fault

Narrowing down the problem:

$ CNT=0 ; while true ; do \
echo -n "Checking frame.number $CNT... "
tshark -r test-some-fops.pcap.gz "frame.number == $CNT && glusterfs == 1" || break
echo OK
CNT=$[CNT + 1]
done

results in

...
Checking frame.number 78... OK
Checking frame.number 79... OK
Checking frame.number 80... OK
Checking frame.number 81... Segmentation fault

So, when checking frame.number 81 for a STAT, the crash happens:

$ tshark -r test-some-fops.pcap.gz 'frame.number == 80 && glusterfs == 1'
$ tshark -r test-some-fops.pcap.gz 'frame.number == 81 && glusterfs == 1'
Segmentation fault

fixed with commit 470a584

No segmentation faults anymore:

$ ./tshark -r ../captures/glusterfs-3.3.0qa43/test-some-fops.pcap.gz 'frame.number == 81 && glusterfs == 1'
$ ./tshark -r ../captures/glusterfs-3.3.0qa43/test-some-fops.pcap.gz 'frame.number == 81 && glusterfs.proc == 1'
$ ./tshark -r ../captures/glusterfs-3.3.0qa43/test-some-fops.pcap.gz 'glusterfs == 1'
$ ./tshark -r ../captures/glusterfs-3.3.0qa43/test-some-fops.pcap.gz 'glusterfs.proc == 1'
$ ./tshark -r ../captures/glusterfs-3.3.0qa43/test-some-fops.pcap.gz 'glusterfs == 27'
$ ./tshark -r ../captures/glusterfs-3.3.0qa43/test-some-fops.pcap.gz 'glusterfs.proc == 27'