S3 connection hangs when S3 Put request times out server side.

Đang mở
#291 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
cpp
Lĩnh vực
cloud, networking

Hướng nghiên cứu

Bắt đầu trong s3_key_value_store.cc, khoảng dòng 764, và lần theo IssueRequestOptions đến curl_transport.cc, khoảng các dòng 198-205. Xem xét cách request_timeout và connect_timeout hiện được đặt mặc định như thế nào và driver S3 nên cung cấp chúng ra sao. Được xem là hoàn tất khi một timeout phía máy chủ khiến yêu cầu bị hủy và thử lại thay vì bị treo trong khoảng 30 phút.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hi google friends! Apologies for the trouble!! We found this interesting issue when using tensorstore!! Thanks for taking a look

Summary

When an S3 PUT request is timed out server-side, the TensorStore client can hang for ~30 minutes before retrying. During this window, S3 access logs show zero retries — the request appears to be "in flight" on the client but dead on the
server. The receive of the request is confirmed by s3 access logs.

The ~30-minute gap matches the default OS-level TCP keepalive + retransmission timeout, which is the only thing that eventually forces the stalled socket closed.

Root Cause

2 layers of missing timeout configuration compound each other:

1. S3 driver issues requests with no timeouts (s3_key_value_store.cc:764)

auto future = owner->transport_->IssueRequest(
    request, internal_http::IssueRequestOptions(value_));
// IssueRequestOptions only sets payload; request_timeout and connect_timeout
// remain at their defaults of absl::ZeroDuration().
  1. Zero duration → curl sets nothing (curl_transport.cc:198-205)

if (options.request_timeout > absl::ZeroDuration()) { // never true
handle_.SetOption(CURLOPT_TIMEOUT_MS, ...);
}

CURLOPT_TIMEOUT_MS is never set, so libcurl has no deadline on the transfer.

Workaround

Set environment variables before launching your process:

export TENSORSTORE_CURL_LOW_SPEED_TIME_SECONDS=30
export TENSORSTORE_CURL_LOW_SPEED_LIMIT_BYTES=1

This enables the low-speed watchdog: if fewer than 1 byte/sec is transferred for 30 seconds, libcurl aborts the request and the retry logic takes over.

Suggested fix

  • Expose request timeout and connect timeout to s3 query driver
Ngôn ngữ chính
C++
Star
1.6k
Fork
151
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của google/tensorstore

Tất cả issue của google/tensorstore

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.