Skip to content

engine: map more unknown_failure to a specified failure string #2420

Closed
@hellais

Description

@hellais

While doing some data analysis work I enumerated all the unknown failures found in the OONI dataset since Jan 1st 2022 and produced this list: https://gist.github.com/hellais/8b38d360c169e5a2a8ce8856bcf519ff.

I think it would be very useful to have some specific error strings defined for some of these so that we can use them as part of the analysis more easily.

I think the TLS related ones are especially interesting.

Several of these have been consolidated into a single failure string and replaced the variable part with [token] to make it easier to look at.

Here is the snipped used for doing that mapping:

import re

lookup_re = re.compile(r'(lookup [a-zA-Z0-9\.\-]*)')

def consolidate_failure(f):
    if f.startswith("unknown_failure: net/http: HTTP/1.x transport connection broken: malformed HTTP response"):
        return "unknown_failure: net/http: HTTP/1.x transport connection broken: malformed HTTP response [garbage]"
    if f.startswith("unknown_failure: net/http: HTTP/1.x transport connection broken: malformed HTTP status code"):
        return "unknown_failure: net/http: HTTP/1.x transport connection broken: malformed HTTP status code [garbage]"
    if f.startswith("unknown_failure: tls: oversized record received with length"):
        return "unknown_failure: tls: oversized record received with length [length]"
    if f.startswith("unknown_failure: net/http: HTTP/1.x transport connection broken: malformed MIME header: missing colon:"):
        return "unknown_failure: net/http: HTTP/1.x transport connection broken: malformed MIME header: missing colon: [garbage]"
    if f.startswith("unknown_failure: x509: certificate is valid for "):
        return "unknown_failure: x509: certificate is valid for [domain_1], [domain_2] not [domain_3]"
    return lookup_re.sub('lookup [domain_name]', f)

This list is a superset of what has been reported in these issues: #2412 #2411 #2410

Metadata

Metadata

Assignees

Labels

bugSomething isn't working correctlydata qualityenhancementNew feature request or improvement to existing functionalitymethodologyissues related to the testing methodologyneeds investigationThis issue needs extra data and investigationooni/probe-enginepriority/mediumNormal priority issuetesting

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions