update_engine: trigger a crash on unrecoverable condition

CURLM_INTERNAL_ERROR and CURLM_OUT_OF_MEMORY are two libcurl error codes
that caller (update_engine) has no way to recover on its own. Reference: https://curl.haxx.se/libcurl/c/libcurl-errors.html

Since those error conditions aren't recoverable and might be responsible
for the failures to update observed in crbug.com/927039, we exit and let the
system respawn update_engine to start from a fresh state and recover.

BUG=chromium:962730,chromium:927039
TEST=unittest

Change-Id: I55946e58e518da5bc5cb0c23690430c6298b8582
Reviewed-on: https://chromium-review.googlesource.com/1616425
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Xiaochu Liu <xiaochu@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
diff --git a/libcurl_http_fetcher.cc b/libcurl_http_fetcher.cc
index 1aa7e8b..f469435 100644
--- a/libcurl_http_fetcher.cc
+++ b/libcurl_http_fetcher.cc
@@ -416,7 +416,11 @@
         metrics::CheckResult::kUnset,
         metrics::CheckReaction::kUnset,
         metrics::DownloadErrorCode::kInternalError);
-    LOG(ERROR) << "curl_multi_perform is in an unrecoverable error condition: "
+    // According to https://curl.haxx.se/libcurl/c/libcurl-errors.html:
+    // CURLM_INTERNAL_ERROR and CURLM_OUT_OF_MEMORY are two libcurl error codes
+    // that caller has no way to recover on its own. Thus, we exit and let the
+    // system respawn update_engine to start from a fresh state and recover.
+    LOG(FATAL) << "curl_multi_perform is in an unrecoverable error condition: "
                << retcode;
   } else if (retcode != CURLM_OK) {
     LOG(ERROR) << "curl_multi_perform returns error: " << retcode;