Project

General

Profile

Actions

Bug #79277

closed
MH MH

rgw: segfault in rgw_http_req_data::set_state() after request completion

Bug #79277: rgw: segfault in rgw_http_req_data::set_state() after request completion

Added by Matthew Heler 4 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
umbrella, tentacle, squid
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v21.3.0-2814-gc6e60c8033
Released In:
Upkeep Timestamp:
2026-10-21T01:39:38+00:00

Description

radosgw can segfault on the http_manager thread when a request finishes before a queued pause/resume is applied.

This is reproducible with the 503 retry path added by PR #68922. The bug predates that PR, but retries make the race easy to trigger: a request fails and is torn down for retry while a queued state change is still pending.

  • Caught signal (Segmentation fault) **
    in thread 7f4be2b9a6c0 thread_name:http_manager
    ceph version 21.1.0 (...) umbrella (stable)
    1: /lib/x86_64-linux-gnu/libc.so.6(+0x45330)
    2: (rgw_http_req_data::set_state(int)+0x24)
    3: (RGWHTTPManager::manage_pending_requests()+0x14c)
    4: (RGWHTTPManager::reqs_thread_entry()+0xc6)
    5: (RGWHTTPManager::ReqsThread::entry()+0x11)

reqs_change_state stores a raw request pointer. A state change can be queued while the request is alive, then applied after the request has finished. At that point curl_handle may be null, or the request may already have been destroyed, resulting in a crash or use-after-free.


Related issues 3 (0 open — 3 closed)

Copied to rgw - Backport #80197: umbrella: rgw: segfault in rgw_http_req_data::set_state() after request completionResolvedMatthew Heler

Actions
Copied to rgw - Backport #80198: squid: rgw: segfault in rgw_http_req_data::set_state() after request completionResolvedMatthew Heler

Actions
Copied to rgw - Backport #80199: tentacle: rgw: segfault in rgw_http_req_data::set_state() after request completionResolvedMatthew Heler

Actions

MH Updated by Matthew Heler 4 months ago Actions #1

  • Pull request ID set to 70930

CB Updated by Casey Bodley 4 months ago Actions #2

  • Status changed from New to Fix Under Review

UB Updated by Upkeep Bot 3 months ago Actions #3

  • Status changed from Fix Under Review to Pending Backport
  • Merge Commit set to c6e60c80330c67fcf1aa9bf6c2e3fec223fac9bd
  • Fixed In set to v21.3.0-2814-gc6e60c8033
  • Upkeep Timestamp set to 2026-09-02T11:49:33+00:00

UB Updated by Upkeep Bot 3 months ago Actions #4

  • Copied to Backport #80197: umbrella: rgw: segfault in rgw_http_req_data::set_state() after request completion added

UB Updated by Upkeep Bot 3 months ago Actions #5

  • Copied to Backport #80198: squid: rgw: segfault in rgw_http_req_data::set_state() after request completion added

UB Updated by Upkeep Bot 3 months ago Actions #6

  • Copied to Backport #80199: tentacle: rgw: segfault in rgw_http_req_data::set_state() after request completion added

UB Updated by Upkeep Bot 3 months ago Actions #7

  • Status changed from Pending Backport to Backporting
  • Upkeep Timestamp changed from 2026-09-02T11:49:33+00:00 to 2026-09-02T12:27:19+00:00

UB Updated by Upkeep Bot about 1 month ago Actions #8

  • Status changed from Backporting to Resolved
  • Upkeep Timestamp changed from 2026-09-02T12:27:19+00:00 to 2026-10-21T01:39:38+00:00
Actions

Also available in: PDF Atom