Backed out changeset 2d5b0bd070a8 (bug 1905939) for causing xpcshell failures at test_httpssvc_retry_with_ech.js. CLOSED TREE

This commit is contained in:
Butkovits Atila 2024-09-18 19:51:39 +03:00
Родитель b141730c0e
Коммит 56fd3b4318
4 изменённых файлов: 49 добавлений и 99 удалений

Просмотреть файл

@ -19,7 +19,6 @@
#include "mozilla/RandomNum.h"
#include "mozilla/RefPtr.h"
#include "mozilla/Telemetry.h"
#include "mozilla/glean/GleanMetrics.h"
#include "mozilla/net/DNS.h"
#include "nsHttpHandler.h"
#include "nsIHttpActivityObserver.h"
@ -212,11 +211,9 @@ nsresult Http3Session::Init(const nsHttpConnectionInfo* aConnInfo,
}
}
#ifndef ANDROID
if (mState != ZERORTT) {
ZeroRttTelemetry(ZeroRttOutcome::NOT_USED);
}
#endif
auto config = mConnInfo->GetEchConfig();
if (config.IsEmpty()) {
@ -370,9 +367,8 @@ void Http3Session::Shutdown() {
Http3Session::~Http3Session() {
LOG3(("Http3Session::~Http3Session %p", this));
#ifndef ANDROID
EchOutcomeTelemetry();
#endif
Telemetry::Accumulate(Telemetry::HTTP3_REQUEST_PER_CONN, mTransactionCount);
Telemetry::Accumulate(Telemetry::HTTP3_BLOCKED_BY_STREAM_LIMIT_PER_CONN,
mBlockedByStreamLimitCount);
@ -601,9 +597,7 @@ nsresult Http3Session::ProcessEvents() {
mState = INITIALIZING;
mTransactionCount = 0;
Finish0Rtt(true);
#ifndef ANDROID
ZeroRttTelemetry(ZeroRttOutcome::USED_REJECTED);
#endif
}
break;
case Http3Event::Tag::ResumptionToken: {
@ -627,9 +621,7 @@ nsresult Http3Session::ProcessEvents() {
mSocketControl->HandshakeCompleted();
if (was0RTT) {
Finish0Rtt(false);
#ifndef ANDROID
ZeroRttTelemetry(ZeroRttOutcome::USED_SUCCEEDED);
#endif
}
OnTransportStatus(nullptr, NS_NET_STATUS_CONNECTED_TO, 0);
@ -1742,12 +1734,10 @@ void Http3Session::CloseInternal(bool aCallNeqoClose) {
mBeforeConnectedError = true;
}
#ifndef ANDROID
if (mState == ZERORTT) {
ZeroRttTelemetry(aCallNeqoClose ? ZeroRttOutcome::USED_CONN_CLOSED_BY_NECKO
: ZeroRttOutcome::USED_CONN_ERROR);
}
#endif
mState = CLOSING;
Shutdown();
@ -2496,29 +2486,29 @@ void Http3Session::ReportHttp3Connection() {
}
}
#ifndef ANDROID
void Http3Session::EchOutcomeTelemetry() {
MOZ_ASSERT(OnSocketThread(), "not on socket thread");
nsAutoCString key;
nsLiteralCString label = mHandshakeSucceeded ? "success"_ns : "fail"_ns;
switch (mEchExtensionStatus) {
case EchExtensionStatus::kNotPresent:
key = "NONE";
mozilla::glean::netwerk::http3_ech_outcome_none.Get(label).Add(1);
break;
case EchExtensionStatus::kGREASE:
key = "GREASE";
mozilla::glean::netwerk::http3_ech_outcome_grease.Get(label).Add(1);
break;
case EchExtensionStatus::kReal:
key = "REAL";
mozilla::glean::netwerk::http3_ech_outcome_real.Get(label).Add(1);
break;
}
Telemetry::Accumulate(Telemetry::HTTP3_ECH_OUTCOME, key,
mHandshakeSucceeded ? 0 : 1);
}
void Http3Session::ZeroRttTelemetry(ZeroRttOutcome aOutcome) {
Telemetry::Accumulate(Telemetry::HTTP3_0RTT_STATE, aOutcome);
nsAutoCString key;
switch (aOutcome) {
@ -2538,18 +2528,12 @@ void Http3Session::ZeroRttTelemetry(ZeroRttOutcome aOutcome) {
break;
}
if (key.IsEmpty()) {
mozilla::glean::netwerk::http3_0rtt_state.Get("not_used"_ns).Add(1);
} else {
if (!key.IsEmpty()) {
MOZ_ASSERT(mZeroRttStarted);
mozilla::TimeStamp zeroRttEnded = mozilla::TimeStamp::Now();
mozilla::glean::netwerk::http3_0rtt_state_duration.Get(key)
.AccumulateRawDuration(zeroRttEnded - mZeroRttStarted);
mozilla::glean::netwerk::http3_0rtt_state.Get(key).Add(1);
Telemetry::AccumulateTimeDelta(Telemetry::HTTP3_0RTT_STATE_DURATION, key,
mZeroRttStarted, TimeStamp::Now());
}
}
#endif
nsresult Http3Session::GetTransactionTLSSocketControl(
nsITLSSocketControl** tlsSocketControl) {

Просмотреть файл

@ -253,9 +253,7 @@ class Http3Session final : public nsAHttpTransaction, public nsAHttpConnection {
void CallCertVerification(Maybe<nsCString> aEchPublicName);
void SetSecInfo();
#ifndef ANDROID
void EchOutcomeTelemetry();
#endif
void StreamReadyToWrite(Http3StreamBase* aStream);
void MaybeResumeSend();
@ -263,7 +261,6 @@ class Http3Session final : public nsAHttpTransaction, public nsAHttpConnection {
void CloseConnectionTelemetry(CloseError& aError, bool aClosing);
void Finish0Rtt(bool aRestart);
#ifndef ANDROID
enum ZeroRttOutcome {
NOT_USED,
USED_SUCCEEDED,
@ -272,7 +269,6 @@ class Http3Session final : public nsAHttpTransaction, public nsAHttpConnection {
USED_CONN_CLOSED_BY_NECKO
};
void ZeroRttTelemetry(ZeroRttOutcome aOutcome);
#endif
RefPtr<NeqoHttp3Conn> mHttp3Connection;
RefPtr<nsAHttpConnection> mConnection;

Просмотреть файл

@ -25,76 +25,6 @@ netwerk:
- manuel@mozilla.com
expires: never
http3_ech_outcome_none: &http3_ech_outcome_none
type: labeled_counter
description: >
Success / Fail Rates for HTTP3 when No ECH Extension was sent
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1822876
- https://bugzilla.mozilla.org/show_bug.cgi?id=1905939
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1905939
notification_emails:
- necko@mozilla.com
expires: never
labels:
- success
- fail
http3_ech_outcome_grease:
<<: *http3_ech_outcome_none
description: >
Success / Fail Rates for HTTP3 when a GREASE ECH Extension was sent
http3_ech_outcome_real:
<<: *http3_ech_outcome_none
description: >
Success / Fail Rates for HTTP3 when a 'real' ECH Extension was sent
http3_0rtt_state:
type: labeled_counter
description: >
Gather the outcome of 0-RTT usage:
- "not_used": 0RTT_NOT_USED
- "succeeded": 0RTT_USED_SUCCESS
- "rejected": 0RTT_USED_REJECT
- "conn_error": 0RTT_USED_CONN_ERROR
- "conn_closed_by_necko": 0RTT_CONN_CLOSED_BY_NECKO
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1688850
- https://bugzilla.mozilla.org/show_bug.cgi?id=1905939
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1905939
notification_emails:
- necko@mozilla.com
expires: never
labels:
- not_used
- succeeded
- rejected
- conn_error
- conn_closed_by_necko
http3_0rtt_state_duration:
type: labeled_timing_distribution
time_unit: millisecond
description: >
The time a connection was in the 0-RTT state
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1688850
- https://bugzilla.mozilla.org/show_bug.cgi?id=1905939
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1905939
notification_emails:
- necko@mozilla.com
labels:
- succeeded
- rejected
- conn_error
- conn_closed_by_necko
- not_used
expires: never
network:
byte_range_request:
type: labeled_counter

Просмотреть файл

@ -3560,6 +3560,22 @@
"n_buckets": 200,
"description": "ms of SSL wait time for full handshake including TCP and proxy tunneling, keyed by the key exchange algorithm used"
},
"HTTP3_ECH_OUTCOME": {
"record_in_processes": ["main"],
"products": ["firefox", "fennec"],
"alert_emails": [
"seceng-telemetry@mozilla.com",
"necko@mozilla.com",
"djackson@mozilla.com"
],
"bug_numbers": [182287],
"releaseChannelCollection": "opt-out",
"expires_in_version": "never",
"kind": "enumerated",
"keyed": true,
"n_values": 32,
"description": "Success / Fail Rates for HTTP3 Keyed by ECH Usage"
},
"SSL_BYTES_BEFORE_CERT_CALLBACK": {
"record_in_processes": ["main"],
"products": ["firefox"],
@ -4101,6 +4117,30 @@
"keyed": true,
"description": "Error code when http3 connection is closed. Look at Http3Session for more details."
},
"HTTP3_0RTT_STATE": {
"record_in_processes": ["main", "socket"],
"products": ["firefox"],
"alert_emails": ["necko@mozilla.com", "ddamjanovic@mozilla.com"],
"bug_numbers": [1688850],
"expires_in_version": "never",
"releaseChannelCollection": "opt-out",
"kind": "enumerated",
"n_values": 5,
"description": "Collect what is the outcome when 0rtt is used: (0)0RTT_NOT_USED, (1)0RTT_USED_SUCCESS, (2)0RTT_USED_REJECT, (3)0RTT_USED_CONN_ERROR, (4)0RTT_CONN_CLOSED_BY_NECKO."
},
"HTTP3_0RTT_STATE_DURATION": {
"record_in_processes": ["main", "socket"],
"products": ["firefox"],
"alert_emails": ["necko@mozilla.com", "ddamjanovic@mozilla.com"],
"bug_numbers": [1688850],
"expires_in_version": "never",
"releaseChannelCollection": "opt-out",
"kind": "exponential",
"high": 30000,
"n_buckets": 50,
"keyed": true,
"description": "The time a connection was in the zero rtt state, it is keyed by the zero rtt outcome."
},
"HTTP3_TIME_TO_REUSE_IDLE_CONNECTTION_MS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec"],