dns-stats / compactor

Tools to capture DNS traffic and record it in C-DNS files.
Other
32 stars 12 forks source link

[1.0-beta] failing test same-tshark-output #57

Closed c0bw3b closed 4 years ago

c0bw3b commented 4 years ago

Hello @banburybill

I've been testing the build of 1.0.0-beta1 on NixOS and I'm getting a failure similar to #49 The root cause may be different this time, but not sure. I've reproduced it on two different NixOS VMs and the failure happens on every build (ie not transient).

Deps versions are : boost 1.67 / libtins 4.2 / libpcap 1.9.0 / cbor-diag 0.5.6 / wireshark-cli 3.0.3 / tcpdump 4.9.2

Here is the test suite log :

===================================================
   dns-stats-compactor 0.1-dev: ./test-suite.log
===================================================

# TOTAL: 27
# PASS:  26
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: test-scripts/same-tshark-output.sh
========================================

1  of  8  with id  0 ,  0x00000000
2  of  8  with id  11414 ,  0x00002c96
3  of  8  with id  37807 ,  0x000093af
4  of  8  with id  39463 ,  0x00009a27
5  of  8  with id  55259 ,  0x0000d7db
6  of  8  with id  57217 ,  0x0000df81
7  of  8  with id  61888 ,  0x0000f1c0
8  of  8  with id  61912 ,  0x0000f1d8
Total  8 , good  8
All good

1  of  2  with id  3953 ,  0x00000f71
--- /build/same-tshark-output.isTm7D/unmatched.pcap.ts.orig.3953.out    2019-11-15 15:25:44.673752041 +0000
+++ /build/same-tshark-output.isTm7D/unmatched.pcap.ts.conv.3953.out    2019-11-15 15:25:44.881752041 +0000
@@ -10,8 +10,8 @@
     Length: 342
     [Checksum Status: Unverified]
     [Timestamps]
-        [Time since first frame: 0.000000000 seconds]
-        [Time since previous frame: 0.000000000 seconds]
+        [Time since first frame: -0.000002000 seconds]
+        [Time since previous frame: -0.000002000 seconds]
 Domain Name System (response)
     Transaction ID: 0x0f71
     Flags: 0x8100 Standard query response, No error
2  of  2  with id  4047 ,  0x00000fcf
--- /build/same-tshark-output.isTm7D/unmatched.pcap.ts.orig.4047.out    2019-11-15 15:25:45.090752041 +0000
+++ /build/same-tshark-output.isTm7D/unmatched.pcap.ts.conv.4047.out    2019-11-15 15:25:45.301752041 +0000
@@ -10,8 +10,8 @@
     Length: 30
     [Checksum Status: Unverified]
     [Timestamps]
-        [Time since first frame: 0.000002000 seconds]
-        [Time since previous frame: 0.000002000 seconds]
+        [Time since first frame: 0.000000000 seconds]
+        [Time since previous frame: 0.000000000 seconds]
 Domain Name System (query)
     Transaction ID: 0x0fcf
     Flags: 0x0100 Standard query
Total  2 , good  0

FAIL test-scripts/same-tshark-output.sh (exit status: 1)

(BTW the test suite log headers are still saying 0.1-dev :) )

On NixOS the build takes place in a chroot-like sandbox, so maybe I'm missing a silent dep needed to compute proper timestamps?

Let me know if I can provide more informations.

banburybill commented 4 years ago

I'm pretty sure that's not #49. It may, however, be something that I've fixed since -beta1. There's at least one potential issue with timestamps that I've fixed. Can you try this on the develop branch and see if it persists?

c0bw3b commented 4 years ago

I'm getting the same failure when building from the develop branch

banburybill commented 4 years ago

On 15 November 2019 22:14:03 GMT, Renaud notifications@github.com wrote:

I'm getting the same failure when building from the develop branch

Oh, drat :( I've started getting NixOS installed in a VM. Hopefully I'll be able to dig further into this next week.

banburybill commented 4 years ago

OK, so I've found NixOS isn't straightforward. How are you building compactor? Do have a default.nix file you can share with me?

c0bw3b commented 4 years ago

Yes indeed! I wanted to give you a heads up and my default.nix but then a week-end happened.. My bad.

Here is my default.nix I used to build from the develop branch. The SHA hash is computed over the whole content of the repo after unpacking the GH zip archive. It must be recomputed and changed if you push new commits, otherwise nix will silently used the previous sources already available in its store.

To build this I use:

nix-build -E "with import <nixpkgs> {}; callPackage ./default.nix {}" --option build-use-sandbox true --keep-failed |& tee build.log
banburybill commented 4 years ago

I've reproduced this with an up-to-date Debian Sid. I'll investigate further.