diff --git a/.evergreen/compile-unix.sh b/.evergreen/compile-unix.sh
index 9cad0c3..a7e4dd9 100755
--- a/.evergreen/compile-unix.sh
+++ b/.evergreen/compile-unix.sh
@@ -278,17 +278,12 @@ fi
 
 export MONGOC_TEST_SERVER_LOG=stdout
 
-# Write stderr to error.log and to console. Turn off tracing to avoid spurious
-# log messages that CHECK_LOG considers failures.
-mkfifo pipe || true
-if [ -e pipe ]; then
-   set +o xtrace
-   tee error.log < pipe &
-   run_valgrind ./src/libmongoc/test-libmongoc --no-fork -d -F test-results.json 2>pipe
-   rm pipe
-else
-   run_valgrind ./src/libmongoc/test-libmongoc --no-fork -d -F test-results.json
-fi
+set +o xtrace
+for i in $(seq 1 100000); do
+   echo "Running test: $i"
+   run_valgrind ./src/libmongoc/test-libmongoc --no-fork -d -F test-results.json -l "/inheritance/db_write_cmd/writeConcern"
+   #run_valgrind ./src/libmongoc/test-libmongoc --no-fork -d -F test-results.json -l "/inheritance/count_documents/readPrefs"
+done
 
 # Check if the error.log exists, and is more than 0 byte
 if [ -s error.log ]; then
diff --git a/.evergreen/compile-windows.sh b/.evergreen/compile-windows.sh
index 9cba851..ceba88f 100755
--- a/.evergreen/compile-windows.sh
+++ b/.evergreen/compile-windows.sh
@@ -136,4 +136,9 @@ fi
 
 export MONGOC_TEST_SERVER_LOG=stdout
 
-"$TEST_PATH" --no-fork -d -F test-results.json
+set +o xtrace
+for i in $(seq 1 100000); do
+   echo "Running test: $i"
+   "$TEST_PATH" --no-fork -d -F test-results.json -l "/inheritance/db_write_cmd/writeConcern"
+   #"$TEST_PATH" --no-fork -d -F test-results.json -l "/inheritance/count_documents/readPrefs"
+done
diff --git a/src/libmongoc/tests/TestSuite.c b/src/libmongoc/tests/TestSuite.c
index 340b40a..c418d9a 100644
--- a/src/libmongoc/tests/TestSuite.c
+++ b/src/libmongoc/tests/TestSuite.c
@@ -112,6 +112,34 @@ static BSON_ONCE_FUN (_test_suite_ensure_mutex_once)
    BSON_ONCE_RETURN;
 }
 
+#ifdef BSON_OS_UNIX
+#include <stdio.h>
+#include <execinfo.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <unistd.h>
+void
+print_trace (void)
+{
+  void *array[100];
+  char **strings;
+  int size, i;
+
+  fprintf (stderr, "Entering print_trace\n");
+
+  size = backtrace (array, 100);
+  strings = backtrace_symbols (array, size);
+  if (strings != NULL)
+  {
+    fprintf (stderr, "Obtained %d stack frames.\n", size);
+    for (i = 0; i < size; i++)
+      fprintf (stderr, "%s\n", strings[i]);
+  }
+  fflush (stderr);
+
+  free (strings);
+}
+#endif
 
 static void
 _handle_signal (int signum)
@@ -135,6 +163,7 @@ _handle_signal (int signum)
       sigstr = "(Unknown signal delivered)";
    }
 #ifdef BSON_OS_UNIX
+   print_trace ();
    /* On POSIX these APIs are signal-safe */
    write (STDERR_FILENO, s, strlen (s));
    write (STDERR_FILENO, "  ", 2);
diff --git a/src/libmongoc/tests/mock_server/mock-rs.c b/src/libmongoc/tests/mock_server/mock-rs.c
index 0bb26fe..4d7a6d0 100644
--- a/src/libmongoc/tests/mock_server/mock-rs.c
+++ b/src/libmongoc/tests/mock_server/mock-rs.c
@@ -293,7 +293,12 @@ static bool
 rs_q_append (request_t *request, void *data)
 {
    mock_rs_t *rs = (mock_rs_t *) data;
+   int i;
 
+   for (i = 0; i < request->docs.len; i++) {
+      printf ("----- 10 -----: %s\n",
+              bson_as_canonical_extended_json (request_get_doc (request, i), NULL));
+   }
    q_put (rs->q, (void *) request);
 
    return true; /* handled */
@@ -441,7 +446,17 @@ mock_rs_get_uri (mock_rs_t *rs)
 request_t *
 mock_rs_receives_request (mock_rs_t *rs)
 {
-   return (request_t *) q_get (rs->q, rs->request_timeout_msec);
+   int i;
+   request_t *request = q_get (rs->q, rs->request_timeout_msec);
+   if (request) {
+      for (i = 0; i < request->docs.len; i++) {
+         printf ("----- 11 -----: %s\n",
+                 bson_as_canonical_extended_json (request_get_doc (request, i), NULL));
+      }
+   } else {
+      printf ("----- 11 -----: no request was received\n");
+   }
+   return request;
 }
 
 
@@ -553,6 +568,7 @@ mock_rs_receives_command (mock_rs_t *rs,
    char *formatted_command_json = NULL;
    char *ns;
    request_t *request;
+   int i;
 
    va_start (args, command_json);
    if (command_json) {
@@ -563,6 +579,14 @@ mock_rs_receives_command (mock_rs_t *rs,
    ns = bson_strdup_printf ("%s.$cmd", database_name);
 
    request = (request_t *) q_get (rs->q, rs->request_timeout_msec);
+   if (request) {
+      for (i = 0; i < request->docs.len; i++) {
+         printf ("----- 12 -----: %s\n",
+                 bson_as_canonical_extended_json (request_get_doc (request, i), NULL));
+      }
+   } else {
+      printf ("----- 12 -----: no request was received\n");
+   }
 
    if (request &&
        !request_matches_query (
@@ -603,8 +627,17 @@ mock_rs_receives_insert (mock_rs_t *rs,
                          const char *doc_json)
 {
    request_t *request;
+   int i;
 
    request = (request_t *) q_get (rs->q, rs->request_timeout_msec);
+   if (request) {
+      for (i = 0; i < request->docs.len; i++) {
+         printf ("----- 13 -----: %s\n",
+                 bson_as_canonical_extended_json (request_get_doc (request, i), NULL));
+      }
+   } else {
+      printf ("----- 13 -----: no request was received\n");
+   }
 
    if (request && !request_matches_insert (request, ns, flags, doc_json)) {
       request_destroy (request);
@@ -640,8 +673,17 @@ mock_rs_receives_getmore (mock_rs_t *rs,
                           int64_t cursor_id)
 {
    request_t *request;
+   int i;
 
    request = (request_t *) q_get (rs->q, rs->request_timeout_msec);
+   if (request) {
+      for (i = 0; i < request->docs.len; i++) {
+         printf ("----- 14 -----: %s\n",
+                 bson_as_canonical_extended_json (request_get_doc (request, i), NULL));
+      }
+   } else {
+      printf ("----- 14 -----: no request was received\n");
+   }
 
    if (request && !request_matches_getmore (request, ns, n_return, cursor_id)) {
       request_destroy (request);
@@ -677,8 +719,17 @@ _mock_rs_receives_msg (mock_rs_t *rs, uint32_t flags, ...)
    request_t *request;
    va_list args;
    bool r;
+   int i;
 
    request = (request_t *) q_get (rs->q, rs->request_timeout_msec);
+   if (request) {
+      for (i = 0; i < request->docs.len; i++) {
+         printf ("----- 15 -----: %s\n",
+                 bson_as_canonical_extended_json (request_get_doc (request, i), NULL));
+      }
+   } else {
+      printf ("----- 15 -----: no request was received\n");
+   }
 
    va_start (args, flags);
    r = request_matches_msgv (request, flags, &args);
@@ -740,8 +791,17 @@ request_t *
 mock_rs_receives_kill_cursors (mock_rs_t *rs, int64_t cursor_id)
 {
    request_t *request;
+   int i;
 
    request = (request_t *) q_get (rs->q, rs->request_timeout_msec);
+   if (request) {
+      for (i = 0; i < request->docs.len; i++) {
+         printf ("----- 16 -----: %s\n",
+                 bson_as_canonical_extended_json (request_get_doc (request, i), NULL));
+      }
+   } else {
+      printf ("----- 16 -----: no request was received\n");
+   }
 
    if (request && !request_matches_kill_cursors (request, cursor_id)) {
       request_destroy (request);
diff --git a/src/libmongoc/tests/mock_server/mock-server.c b/src/libmongoc/tests/mock_server/mock-server.c
index 236a0ab..393a4f5 100644
--- a/src/libmongoc/tests/mock_server/mock-server.c
+++ b/src/libmongoc/tests/mock_server/mock-server.c
@@ -877,12 +877,19 @@ mock_server_receives_request (mock_server_t *server)
    sync_queue_t *q;
    int64_t request_timeout_msec;
    request_t *r;
+   int i;
 
    q = mock_server_get_queue (server);
    request_timeout_msec = mock_server_get_request_timeout_msec (server);
    r = (request_t *) q_get (q, request_timeout_msec);
    if (r) {
+      for (i = 0; i < r->docs.len; i++) {
+         printf ("----- 1 -----: %s\n",
+                 bson_as_canonical_extended_json (request_get_doc (r, i), NULL));
+      }
       request_assert_no_duplicate_keys (r);
+   } else {
+      printf ("----- 1 -----: no request was received\n");
    }
 
    return r;
@@ -1358,6 +1365,8 @@ mock_server_hangs_up (request_t *request)
                                request_get_server_port (request));
    reply = bson_malloc0 (sizeof (reply_t));
    reply->type = HANGUP;
+   printf ("----- 2 -----: %s\n",
+           bson_as_canonical_extended_json (reply->docs, NULL));
    q_put (request->replies, reply);
 }
 
@@ -1388,6 +1397,8 @@ mock_server_resets (request_t *request)
 
    reply = bson_malloc0 (sizeof (reply_t));
    reply->type = RESET;
+   printf ("----- 3 -----: %s\n",
+           bson_as_canonical_extended_json (reply->docs, NULL));
    q_put (request->replies, reply);
 }
 
@@ -1483,6 +1494,8 @@ mock_server_replies_opmsg (request_t *request,
    reply->request_opcode = MONGOC_OPCODE_MSG;
    reply->response_to = request->request_rpc.header.request_id;
 
+   printf ("----- 4 -----: %s\n",
+           bson_as_canonical_extended_json (reply->docs, NULL));
    q_put (request->replies, reply);
 }
 
@@ -1651,6 +1664,10 @@ mock_server_destroy (mock_server_t *server)
    mongoc_uri_destroy (server->uri);
 
    while ((request = (request_t *) q_get_nowait (server->q))) {
+      for (i = 0; i < request->docs.len; i++) {
+         printf ("----- 5 -----: %s\n",
+                 bson_as_canonical_extended_json (request_get_doc (request, i), NULL));
+      }
       request_destroy (request);
    }
 
@@ -1905,6 +1922,10 @@ again:
       if (!handled) {
          /* pass to the main thread via the queue */
          requests = mock_server_get_queue (server);
+         for (i = 0; i < request->docs.len; i++) {
+            printf ("----- 6 -----: %s\n",
+                    bson_as_canonical_extended_json (request_get_doc (request, i), NULL));
+         }
          q_put (requests, (void *) request);
       }
    }
@@ -1915,8 +1936,12 @@ again:
 
    reply = q_get (replies, 10);
    if (reply) {
+      printf ("----- 7 -----: %s\n",
+              bson_as_canonical_extended_json (reply->docs, NULL));
       _mock_server_reply_with_stream (server, reply, client_stream);
       _reply_destroy (reply);
+   } else {
+      printf ("----- 7 -----: no reply was received\n");
    }
 
    if (_mock_server_stopping (server)) {
@@ -1936,6 +1961,8 @@ failure:
    _mongoc_buffer_destroy (&buffer);
 
    while ((reply = q_get_nowait (replies))) {
+      printf ("----- 8 -----: %s\n",
+              bson_as_canonical_extended_json (reply->docs, NULL));
       _reply_destroy (reply);
    }
 
@@ -1975,6 +2002,8 @@ mock_server_reply_multi (request_t *request,
    reply->query_flags = (mongoc_query_flags_t) request->request_rpc.query.flags;
    reply->response_to = request->request_rpc.header.request_id;
 
+   printf ("----- 9 -----: %s\n",
+           bson_as_canonical_extended_json (reply->docs, NULL));
    q_put (request->replies, reply);
 }
 
diff --git a/src/libmongoc/tests/test-mongoc-opts.c b/src/libmongoc/tests/test-mongoc-opts.c
index 4593937..30e073d 100644
--- a/src/libmongoc/tests/test-mongoc-opts.c
+++ b/src/libmongoc/tests/test-mongoc-opts.c
@@ -838,17 +838,23 @@ test_func_inherits_opts (void *ctx)
          if (strstr (test->func_name, "aggregate")) {
             if (test->opt_type != OPT_READ_PREFS) {
                add_expected_opt (source_matrix[i], test->opt_type, &cmd);
+               printf ("++++++++++ 1 ++++++++++\n");
+            } else {
+               printf ("++++++++++ 2 ++++++++++\n");
             }
          } else {
             add_expected_opt (source_matrix[i], test->opt_type, &cmd);
             expect_secondary = test->opt_type == OPT_READ_PREFS;
+            printf ("++++++++++ 3 ++++++++++\n");
          }
       }
 
       /* write commands send two OP_MSG sections */
       if (test->n_sections == 2) {
+         printf ("////////// calling 1\n");
          request = mock_rs_receives_msg (rs, 0, &cmd, tmp_bson ("{}"));
       } else {
+         printf ("////////// calling 2\n");
          request = mock_rs_receives_msg (rs, 0, &cmd);
       }
 
