Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

measurement with null test_keys #1002

Closed
bassosimone opened this issue Oct 26, 2020 · 7 comments
Closed

measurement with null test_keys #1002

bassosimone opened this issue Oct 26, 2020 · 7 comments
Assignees
Labels
bug Something isn't working data quality Describes data/measurement quality issues effort/S Small effort interrupt Task not planned during planning priority/high High priority

Comments

@bassosimone
Copy link
Contributor

See ooni/backend#456 (comment). To debug, the idea is to modify the e2etesting repository such that the CI fails when such a measurement occurs, so we can investigate what happens.

@bassosimone bassosimone added the bug Something isn't working label Oct 26, 2020
@bassosimone bassosimone self-assigned this Oct 26, 2020
@bassosimone bassosimone added priority/high High priority effort/S Small effort labels Oct 26, 2020
@bassosimone bassosimone added this to the Sprint 25 - Näkki milestone Oct 26, 2020
@bassosimone bassosimone added the interrupt Task not planned during planning label Feb 4, 2021
@bassosimone
Copy link
Contributor Author

bassosimone commented Feb 4, 2021

Implemented this functionality and immediately found the corresponding failure:

{
  "annotations": {
    "assets_version": "20210129095811",
    "engine_name": "ooniprobe-engine",
    "engine_version": "3.6.0-alpha",
    "platform": "linux"
  },
  "data_format_version": "0.2.0",
  "input": null,
  "measurement_start_time": "2021-02-04 10:48:21",
  "probe_asn": "AS30722",
  "probe_cc": "IT",
  "probe_ip": "127.0.0.1",
  "probe_network_name": "Vodafone Italia S.p.A.",
  "report_id": "20210204T104821Z_tor_IT_30722_n1_kxHvURksoGJcZaP2",
  "resolver_asn": "AS30722",
  "resolver_ip": "91.80.36.84",
  "resolver_network_name": "Vodafone Italia S.p.A.",
  "software_name": "miniooni",
  "software_version": "3.6.0-alpha",
  "test_keys": null,
  "test_name": "tor",
  "test_runtime": 0.177108758,
  "test_start_time": "2021-02-04 10:48:21",
  "test_version": "0.3.0"
}

There's clearly a need to investigate what could be producing this result. Perhaps the testing backend?

@bassosimone
Copy link
Contributor Author

We can reproduce this problem by running:

./miniooni --probe-services=https://dvp6h0xblpcqp.cloudfront.net tor

@bassosimone
Copy link
Contributor Author

This issue is also likely related to #1101

@bassosimone
Copy link
Contributor Author

bassosimone commented Feb 4, 2021

This is the diff I used to reveal the problem:

commit 3bf93a6301958bfdff75f8c6dea67ee48990ba40
Author: Simone Basso <[email protected]>
Date:   Thu Feb 4 11:45:58 2021 +0100

    fix(e2epostprocess): fail if we see nil test keys
    
    Closes https://github.com/ooni/probe-engine/issues/1002

diff --git a/internal/cmd/e2epostprocess/main.go b/internal/cmd/e2epostprocess/main.go
index 06eacc4..337fb48 100644
--- a/internal/cmd/e2epostprocess/main.go
+++ b/internal/cmd/e2epostprocess/main.go
@@ -20,10 +20,11 @@ func fatalOnError(err error) {
 
 // Measurement contains a OONI measurement.
 type Measurement struct {
-	ReportID        string  `json:"report_id"`
-	Input           *string `json:"input"`
-	SoftwareName    string  `json:"software_name"`
-	SoftwareVersion string  `json:"software_version"`
+	ReportID        string      `json:"report_id"`
+	Input           *string     `json:"input"`
+	SoftwareName    string      `json:"software_name"`
+	SoftwareVersion string      `json:"software_version"`
+	TestKeys        interface{} `json:"test_keys"`
 }
 
 func main() {
@@ -57,6 +58,11 @@ func main() {
 			var entry Measurement
 			err = json.Unmarshal(measurement, &entry)
 			fatalOnError(err)
+			if entry.TestKeys == nil {
+				// See https://github.com/ooni/probe-engine/issues/1002
+				log.Printf("%s\n", string(measurement))
+				log.Fatal("found measurement with nil TestKeys")
+			}
 			log.Printf("processing: %+v", entry)
 			options := []string{
 				"run",

Diff applied on top of ooni/probe-cli#220.

@hellais hellais self-assigned this Feb 12, 2021
@hellais hellais added the data quality Describes data/measurement quality issues label Feb 12, 2021
@hellais
Copy link
Member

hellais commented Feb 22, 2021

It appears to be a misconfiguration issue on the domain front, because I am seeing the following error output:

[      0.436638] <warn> measurement failed: map[error:httpx: request failed: 401 Unauthorized]

@bassosimone
Copy link
Contributor Author

@hellais yes, we're not forwarding the correct headers, I suspect!

@bassosimone
Copy link
Contributor Author

I've just fixed the configuration of the testing cloudfront. The issue is that it was not forwarding Authorization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working data quality Describes data/measurement quality issues effort/S Small effort interrupt Task not planned during planning priority/high High priority
Projects
None yet
Development

No branches or pull requests

2 participants