Commit be291efd authored by jan.koester's avatar jan.koester
Browse files

deb



Co-authored-by: default avatarCopilot <copilot@github.com>
parent 0c20ba74
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
libnetplus (20260504+3) unstable; urgency=medium
libnetplus (20260504+4) unstable; urgency=medium

  * QUIC: add client-side [QUIC-DIAG] logging for ACK processing (first
    ACK received, range count, sent_packets), PTO probes (age, threshold),
    and loss detection (lost count, retransmit stats) to trace why gaps
    in server-side stream receive are never filled
  * QUIC: add server-side [QUIC-DIAG] logging for large streams that
    have received FIN but are not yet contiguously complete — logs
    stream ID, FIN offset, contiguous bytes, range count, and first gap
+20 −0
Original line number Diff line number Diff line
@@ -3555,6 +3555,15 @@ void quic::processAckFrame(const uint8_t* data, size_t len, size_t& offset) {
    uint64_t lo = (largest_ack >= first_ack_range) ? largest_ack - first_ack_range : 0;
    acked_ranges.push_back({lo, hi});

    // Log first ACK received per connection (helps diagnose client-side ACK flow)
    if (_largest_acked_pn == UINT64_MAX && !_is_server) {
        std::cerr << "[QUIC-DIAG] first ACK: largest=" << largest_ack
                  << " range_count=" << ack_range_count
                  << " first_range=[" << lo << "," << hi << "]"
                  << " sent_packets=" << _sent_packets.size()
                  << "\n";
    }

    uint64_t prev_smallest = lo;

    // Additional ranges
@@ -3683,6 +3692,11 @@ void quic::checkLossAndRetransmit() {
                }
                QUIC_DBG("PTO probe: new_pn=%lu age=%.3fs pto=%.3fs",
                         (unsigned long)new_pn, age, pto_thresh);
                std::cerr << "[QUIC-DIAG] PTO probe: age=" << age
                          << "s pto=" << pto_thresh
                          << "s sent_packets=" << _sent_packets.size()
                          << " largest_acked=" << _largest_acked_pn
                          << "\n";
            }
        }
    }
@@ -3730,6 +3744,12 @@ void quic::checkLossAndRetransmit() {
    }

    // Retransmit lost stream data with new packet numbers
    if (!lost.empty()) {
        std::cerr << "[QUIC-DIAG] loss detected: " << lost.size()
                  << " packets, largest_acked=" << _largest_acked_pn
                  << " sent_packets_remaining=" << _sent_packets.size()
                  << "\n";
    }
    for (auto& sp : lost) {
        if (sp.data_length == 0 && !sp.fin) continue;