Uploaded image for project: 'Percona XtraBackup'
  1. Percona XtraBackup
  2. PXB-1875

xbcloud doesn't handle Google's HTTP 408 error correctly

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 2.4.14, 8.0.6
    • Fix Version/s: 2.4.15, 8.0.7
    • Component/s: None
    • Labels:
      None

      Description

      XBCloud is trying to parse a reply as an XML message if it begins with <.

       

      https://github.com/percona/percona-xtrabackup/blob/343d3489d159a58032ac222c3f82c0807c508202/storage/innobase/xtrabackup/src/xbcloud/s3.cc#L67

       

      When request-timeout is hit, Google replies with HTML page:

       

      <!DOCTYPE html>
      <html lang=en>
        <meta charset=utf-8>
        <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
        <title>Error 408 (Request Timeout)!!1</title>
        <style>
          *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
        </style>
        <a href=//www.google.com/><span id=logo aria-label=Google></span></a>
        <p><b>408.</b> <ins>That’s an error.</ins>
        <p>Your client has taken too long to issue its request.  <ins>That’s all we know.</ins> 

      which causes rapidxml to abort whole process:

      < HTTP/1.1 408 Request Time-out
      < Server: nginx/1.10.3
      < Date: Mon, 17 Jun 2019 10:14:03 GMT
      < Content-Type: application/octet-stream
      < Content-Length: 1557
      < Connection: keep-alive
      * HTTP error before end of send, stop sending
      < 
      * Curl_http_done: called premature == 0
      * Closing connection 0
      terminate called after throwing an instance of 'rapidxml::parse_error'
        what():  expected ' or "
      Przerwane

      Moreover, 408 should be included in the retriable_http_error list.

      https://github.com/percona/percona-xtrabackup/blob/343d3489d159a58032ac222c3f82c0807c508202/storage/innobase/xtrabackup/src/xbcloud/http.cc#L431

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                sergei.glushchenko Sergei Glushchenko
                Reporter:
                iwo.panowicz Iwo Panowicz
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 59 minutes
                  59m