]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
If out-of-disk when saving a consensus cache entry, don't BUG.
authorNick Mathewson <nickm@torproject.org>
Fri, 26 Jan 2018 18:14:14 +0000 (13:14 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 26 Jan 2018 18:14:14 +0000 (13:14 -0500)
Just warn instead.

Fixes bug 24859.

changes/bug24859 [new file with mode: 0644]
src/or/consdiffmgr.c

diff --git a/changes/bug24859 b/changes/bug24859
new file mode 100644 (file)
index 0000000..122109d
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes (logging):
+    - Don't treat inability to store a cached consensus object as a
+      bug: it can happen normally when we are out of disk space.
+      Fixes bug 24859; bugfix on 0.3.1.1-alpha.
index c5f55b6f3ffc9d638c32cc3edd82fd7fa266c118..e2bb31e527520ea7d4d09381fda0ee351b7fe44b 100644 (file)
@@ -1310,8 +1310,11 @@ store_multiple(consensus_cache_entry_handle_t **handles_out,
                             labels,
                             body_out,
                             bodylen_out);
-      if (BUG(ent == NULL))
+      if (ent == NULL) {
+        log_warn(LD_FS, "Unable to store object %s compressed with %s.",
+                 description, methodname);
         continue;
+      }
 
       status = CDM_DIFF_PRESENT;
       handles_out[i] = consensus_cache_entry_handle_new(ent);