Merge pull request #13322 from jboeuf/oauth_failure

Switching from UNAUTHENTICATED to UNAVAILABLE for auth metadata failure
diff --git a/build.yaml b/build.yaml
index 4f43125..cd6486e 100644
--- a/build.yaml
+++ b/build.yaml
@@ -3475,8 +3475,6 @@
   - grpc_unsecure
   - gpr_test_util
   - gpr
-  args:
-  - --benchmark_min_time=0
   benchmark: true
   defaults: benchmark
   platforms:
@@ -3498,8 +3496,6 @@
   - grpc_unsecure
   - gpr_test_util
   - gpr
-  args:
-  - --benchmark_min_time=0
   benchmark: true
   defaults: benchmark
   platforms:
@@ -3521,8 +3517,6 @@
   - grpc_unsecure
   - gpr_test_util
   - gpr
-  args:
-  - --benchmark_min_time=0
   benchmark: true
   defaults: benchmark
   platforms:
@@ -3544,8 +3538,6 @@
   - grpc_unsecure
   - gpr_test_util
   - gpr
-  args:
-  - --benchmark_min_time=0
   benchmark: true
   defaults: benchmark
   platforms:
@@ -3566,8 +3558,6 @@
   - grpc_unsecure
   - gpr_test_util
   - gpr
-  args:
-  - --benchmark_min_time=0
   benchmark: true
   defaults: benchmark
   platforms:
@@ -3588,8 +3578,6 @@
   - grpc_unsecure
   - gpr_test_util
   - gpr
-  args:
-  - --benchmark_min_time=0
   benchmark: true
   defaults: benchmark
   platforms:
@@ -3610,8 +3598,6 @@
   - grpc_unsecure
   - gpr_test_util
   - gpr
-  args:
-  - --benchmark_min_time=4
   benchmark: true
   defaults: benchmark
   platforms:
@@ -3632,8 +3618,6 @@
   - grpc_unsecure
   - gpr_test_util
   - gpr
-  args:
-  - --benchmark_min_time=0
   benchmark: true
   defaults: benchmark
   platforms:
@@ -3657,8 +3641,6 @@
   - grpc_unsecure
   - gpr_test_util
   - gpr
-  args:
-  - --benchmark_min_time=0
   benchmark: true
   defaults: benchmark
   excluded_poll_engines:
@@ -3685,8 +3667,6 @@
   - grpc_unsecure
   - gpr_test_util
   - gpr
-  args:
-  - --benchmark_min_time=0
   benchmark: true
   defaults: benchmark
   excluded_poll_engines:
@@ -3712,8 +3692,6 @@
   - gpr_test_util
   - gpr
   - grpc++_test_config
-  args:
-  - --benchmark_min_time=0
   benchmark: true
   defaults: benchmark
   exclude_configs:
@@ -3742,8 +3720,6 @@
   - grpc_unsecure
   - gpr_test_util
   - gpr
-  args:
-  - --benchmark_min_time=0
   benchmark: true
   defaults: benchmark
   excluded_poll_engines:
@@ -3768,8 +3744,6 @@
   - grpc_unsecure
   - gpr_test_util
   - gpr
-  args:
-  - --benchmark_min_time=0
   benchmark: true
   defaults: benchmark
   platforms:
@@ -3791,8 +3765,6 @@
   - grpc_unsecure
   - gpr_test_util
   - gpr
-  args:
-  - --benchmark_min_time=0
   benchmark: true
   defaults: benchmark
   platforms:
diff --git a/doc/connectivity-semantics-and-api.md b/doc/connectivity-semantics-and-api.md
index 6d39619..dc30fe5 100644
--- a/doc/connectivity-semantics-and-api.md
+++ b/doc/connectivity-semantics-and-api.md
@@ -115,8 +115,14 @@
 -----------------
 
 All gRPC libraries will expose a channel-level API method to poll the current
-state of a channel. In C++, this method is called GetCurrentState and returns
-an enum for one of the five legal states.
+state of a channel. In C++, this method is called GetState and returns an enum
+for one of the five legal states. It also accepts a boolean `try_to_connect` to
+transition to CONNECTING if the channel is currently IDLE. The boolean should
+act as if an RPC occurred, so it should also reset IDLE_TIMEOUT.
+
+```cpp
+grpc_connectivity_state GetState(bool try_to_connect);
+```
 
 All libraries should also expose an API that enables the application (user of
 the gRPC API) to be notified when the channel state changes. Since state
@@ -127,11 +133,11 @@
 The synchronous version of this API is:
 
 ```cpp
-bool WaitForStateChange(gpr_timespec deadline, ChannelState source_state);
+bool WaitForStateChange(grpc_connectivity_state source_state, gpr_timespec deadline);
 ```
 
-which returns true when the state changes to something other than the
-source_state and false if the deadline expires. Asynchronous and futures based
+which returns `true` when the state is something other than the
+`source_state` and `false` if the deadline expires. Asynchronous- and futures-based
 APIs should have a corresponding method that allows the application to be
 notified when the state of a channel changes.
 
diff --git a/src/core/ext/filters/client_channel/backup_poller.cc b/src/core/ext/filters/client_channel/backup_poller.cc
index 466bf86..c3795c3 100644
--- a/src/core/ext/filters/client_channel/backup_poller.cc
+++ b/src/core/ext/filters/client_channel/backup_poller.cc
@@ -143,9 +143,16 @@
                     grpc_exec_ctx_now(exec_ctx) + g_poll_interval_ms,
                     &g_poller->run_poller_closure);
   }
+
   gpr_ref(&g_poller->refs);
+  /* Get a reference to g_poller->pollset before releasing g_poller_mu to make
+   * TSAN happy. Otherwise, reading from g_poller (i.e g_poller->pollset) after
+   * releasing the lock and setting g_poller to NULL in g_poller_unref() is
+   * being flagged as a data-race by TSAN */
+  grpc_pollset* pollset = g_poller->pollset;
   gpr_mu_unlock(&g_poller_mu);
-  grpc_pollset_set_add_pollset(exec_ctx, interested_parties, g_poller->pollset);
+
+  grpc_pollset_set_add_pollset(exec_ctx, interested_parties, pollset);
 }
 
 void grpc_client_channel_stop_backup_polling(
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
index 034e6ed..a955ec2 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
@@ -205,6 +205,8 @@
     GPR_ASSERT(t->lists[i].tail == NULL);
   }
 
+  GRPC_ERROR_UNREF(t->goaway_error);
+
   GPR_ASSERT(grpc_chttp2_stream_map_size(&t->stream_map) == 0);
 
   grpc_chttp2_stream_map_destroy(&t->stream_map);
@@ -320,6 +322,7 @@
                     keepalive_watchdog_fired_locked, t,
                     grpc_combiner_scheduler(t->combiner));
 
+  t->goaway_error = GRPC_ERROR_NONE;
   grpc_chttp2_goaway_parser_init(&t->goaway_parser);
   grpc_chttp2_hpack_parser_init(exec_ctx, &t->hpack_parser);
 
@@ -1123,7 +1126,16 @@
                                      grpc_slice goaway_text) {
   // GRPC_CHTTP2_IF_TRACING(
   //     gpr_log(GPR_DEBUG, "got goaway [%d]: %s", goaway_error, msg));
-  t->seen_goaway = 1;
+
+  // Discard the error from a previous goaway frame (if any)
+  if (t->goaway_error != GRPC_ERROR_NONE) {
+    GRPC_ERROR_UNREF(t->goaway_error);
+  }
+  t->goaway_error = grpc_error_set_str(
+      grpc_error_set_int(
+          GRPC_ERROR_CREATE_FROM_STATIC_STRING("GOAWAY received"),
+          GRPC_ERROR_INT_HTTP2_ERROR, (intptr_t)goaway_error),
+      GRPC_ERROR_STR_RAW_BYTES, goaway_text);
 
   /* When a client receives a GOAWAY with error code ENHANCE_YOUR_CALM and debug
    * data equal to "too_many_pings", it should log the occurrence at a log level
@@ -1144,14 +1156,8 @@
 
   /* lie: use transient failure from the transport to indicate goaway has been
    * received */
-  connectivity_state_set(
-      exec_ctx, t, GRPC_CHANNEL_TRANSIENT_FAILURE,
-      grpc_error_set_str(
-          grpc_error_set_int(
-              GRPC_ERROR_CREATE_FROM_STATIC_STRING("GOAWAY received"),
-              GRPC_ERROR_INT_HTTP2_ERROR, (intptr_t)goaway_error),
-          GRPC_ERROR_STR_RAW_BYTES, goaway_text),
-      "got_goaway");
+  connectivity_state_set(exec_ctx, t, GRPC_CHANNEL_TRANSIENT_FAILURE,
+                         GRPC_ERROR_REF(t->goaway_error), "got_goaway");
 }
 
 static void maybe_start_some_streams(grpc_exec_ctx* exec_ctx,
@@ -2078,7 +2084,6 @@
   grpc_status_code status;
   grpc_slice slice;
   grpc_error_get_status(exec_ctx, error, s->deadline, &status, &slice, NULL);
-
   if (status != GRPC_STATUS_OK) {
     s->seen_error = true;
   }
@@ -2546,6 +2551,12 @@
         "Transport closed", &t->closed_with_error, 1);
   }
   if (error != GRPC_ERROR_NONE) {
+    /* If a goaway frame was received, this might be the reason why the read
+     * failed. Add this info to the error */
+    if (t->goaway_error != GRPC_ERROR_NONE) {
+      error = grpc_error_add_child(error, GRPC_ERROR_REF(t->goaway_error));
+    }
+
     close_transport_locked(exec_ctx, t, GRPC_ERROR_REF(error));
     t->endpoint_reading = 0;
   } else if (t->closed_with_error == GRPC_ERROR_NONE) {
diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h
index a5a0a80..60cc280 100644
--- a/src/core/ext/transport/chttp2/transport/internal.h
+++ b/src/core/ext/transport/chttp2/transport/internal.h
@@ -306,9 +306,10 @@
    */
   uint32_t write_buffer_size;
 
-  /** have we seen a goaway */
-  bool seen_goaway;
-  /** have we sent a goaway */
+  /** Set to a grpc_error object if a goaway frame is received. By default, set
+   * to GRPC_ERROR_NONE */
+  grpc_error* goaway_error;
+
   grpc_chttp2_sent_goaway_state sent_goaway_state;
 
   /** are the local settings dirty and need to be sent? */
@@ -376,11 +377,6 @@
                         grpc_chttp2_transport* t, grpc_chttp2_stream* s,
                         grpc_slice slice, int is_last);
 
-  /* goaway data */
-  grpc_status_code goaway_error;
-  uint32_t goaway_last_stream_index;
-  grpc_slice goaway_text;
-
   grpc_chttp2_write_cb* write_cb_pool;
 
   /* bdp estimator */
diff --git a/src/core/ext/transport/chttp2/transport/parsing.cc b/src/core/ext/transport/chttp2/transport/parsing.cc
index 8a3774d..6737c26 100644
--- a/src/core/ext/transport/chttp2/transport/parsing.cc
+++ b/src/core/ext/transport/chttp2/transport/parsing.cc
@@ -590,7 +590,11 @@
         GRPC_CHTTP2_IF_TRACING(gpr_log(
             GPR_ERROR, "ignoring new grpc_chttp2_stream creation on client"));
       }
-      return init_skip_frame_parser(exec_ctx, t, 1);
+      grpc_error* err = init_skip_frame_parser(exec_ctx, t, 1);
+      if (t->incoming_frame_flags & GRPC_CHTTP2_FLAG_HAS_PRIORITY) {
+        grpc_chttp2_hpack_parser_set_has_priority(&t->hpack_parser);
+      }
+      return err;
     } else if (t->last_new_stream_id >= t->incoming_stream_id) {
       GRPC_CHTTP2_IF_TRACING(gpr_log(
           GPR_ERROR,
diff --git a/src/core/lib/iomgr/ev_epoll1_linux.cc b/src/core/lib/iomgr/ev_epoll1_linux.cc
index 9e3643f..61da996 100644
--- a/src/core/lib/iomgr/ev_epoll1_linux.cc
+++ b/src/core/lib/iomgr/ev_epoll1_linux.cc
@@ -18,6 +18,8 @@
 
 #include "src/core/lib/iomgr/port.h"
 
+#include <grpc/support/log.h>
+
 /* This polling engine is only relevant on linux kernels supporting epoll() */
 #ifdef GRPC_LINUX_EPOLL
 #include "src/core/lib/iomgr/ev_epoll1_linux.h"
@@ -34,7 +36,6 @@
 
 #include <grpc/support/alloc.h>
 #include <grpc/support/cpu.h>
-#include <grpc/support/log.h>
 #include <grpc/support/string_util.h>
 #include <grpc/support/tls.h>
 #include <grpc/support/useful.h>
@@ -1230,6 +1231,7 @@
  * support is available */
 const grpc_event_engine_vtable* grpc_init_epoll1_linux(bool explicit_request) {
   if (!grpc_has_wakeup_fd()) {
+    gpr_log(GPR_ERROR, "Skipping epoll1 because of no wakeup fd.");
     return NULL;
   }
 
@@ -1254,6 +1256,8 @@
 /* If GRPC_LINUX_EPOLL is not defined, it means epoll is not available. Return
  * NULL */
 const grpc_event_engine_vtable* grpc_init_epoll1_linux(bool explicit_request) {
+  gpr_log(GPR_ERROR,
+          "Skipping epoll1 becuase GRPC_LINUX_EPOLL is not defined.");
   return NULL;
 }
 #endif /* defined(GRPC_POSIX_SOCKET) */
diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc
index 26ed1f6..caaee76 100644
--- a/src/core/lib/iomgr/ev_epollex_linux.cc
+++ b/src/core/lib/iomgr/ev_epollex_linux.cc
@@ -18,6 +18,8 @@
 
 #include "src/core/lib/iomgr/port.h"
 
+#include <grpc/support/log.h>
+
 /* This polling engine is only relevant on linux kernels supporting epoll() */
 #ifdef GRPC_LINUX_EPOLL
 
@@ -34,7 +36,6 @@
 #include <unistd.h>
 
 #include <grpc/support/alloc.h>
-#include <grpc/support/log.h>
 #include <grpc/support/string_util.h>
 #include <grpc/support/tls.h>
 #include <grpc/support/useful.h>
@@ -1451,10 +1452,12 @@
   }
 
   if (!grpc_has_wakeup_fd()) {
+    gpr_log(GPR_ERROR, "Skipping epollex because of no wakeup fd.");
     return NULL;
   }
 
   if (!grpc_is_epollexclusive_available()) {
+    gpr_log(GPR_INFO, "Skipping epollex because it is not supported.");
     return NULL;
   }
 
@@ -1480,6 +1483,8 @@
  * NULL */
 const grpc_event_engine_vtable* grpc_init_epollex_linux(
     bool explicitly_requested) {
+  gpr_log(GPR_ERROR,
+          "Skipping epollex becuase GRPC_LINUX_EPOLL is not defined.");
   return NULL;
 }
 #endif /* defined(GRPC_POSIX_SOCKET) */
diff --git a/src/core/lib/iomgr/ev_epollsig_linux.cc b/src/core/lib/iomgr/ev_epollsig_linux.cc
index 9a12780..42806e9 100644
--- a/src/core/lib/iomgr/ev_epollsig_linux.cc
+++ b/src/core/lib/iomgr/ev_epollsig_linux.cc
@@ -19,6 +19,7 @@
 #include "src/core/lib/iomgr/port.h"
 
 #include <grpc/grpc_posix.h>
+#include <grpc/support/log.h>
 
 /* This polling engine is only relevant on linux kernels supporting epoll() */
 #ifdef GRPC_LINUX_EPOLL
@@ -37,7 +38,6 @@
 #include <unistd.h>
 
 #include <grpc/support/alloc.h>
-#include <grpc/support/log.h>
 #include <grpc/support/string_util.h>
 #include <grpc/support/tls.h>
 #include <grpc/support/useful.h>
@@ -1711,14 +1711,17 @@
     bool explicit_request) {
   /* If use of signals is disabled, we cannot use epoll engine*/
   if (is_grpc_wakeup_signal_initialized && grpc_wakeup_signal < 0) {
+    gpr_log(GPR_ERROR, "Skipping epollsig because use of signals is disabled.");
     return NULL;
   }
 
   if (!grpc_has_wakeup_fd()) {
+    gpr_log(GPR_ERROR, "Skipping epollsig because of no wakeup fd.");
     return NULL;
   }
 
   if (!is_epoll_available()) {
+    gpr_log(GPR_ERROR, "Skipping epollsig because epoll is unavailable.");
     return NULL;
   }
 
@@ -1726,6 +1729,8 @@
     if (explicit_request) {
       grpc_use_signal(SIGRTMIN + 6);
     } else {
+      gpr_log(GPR_ERROR,
+              "Skipping epollsig because uninitialized wakeup signal.");
       return NULL;
     }
   }
@@ -1751,6 +1756,8 @@
  * NULL */
 const grpc_event_engine_vtable* grpc_init_epollsig_linux(
     bool explicit_request) {
+  gpr_log(GPR_ERROR,
+          "Skipping epollsig becuase GRPC_LINUX_EPOLL is not defined.");
   return NULL;
 }
 #endif /* defined(GRPC_POSIX_SOCKET) */
diff --git a/src/core/lib/iomgr/ev_poll_posix.cc b/src/core/lib/iomgr/ev_poll_posix.cc
index 554a438..5745a2a 100644
--- a/src/core/lib/iomgr/ev_poll_posix.cc
+++ b/src/core/lib/iomgr/ev_poll_posix.cc
@@ -1712,6 +1712,7 @@
 
 const grpc_event_engine_vtable* grpc_init_poll_posix(bool explicit_request) {
   if (!grpc_has_wakeup_fd()) {
+    gpr_log(GPR_ERROR, "Skipping poll because of no wakeup fd.");
     return NULL;
   }
   if (!GRPC_LOG_IF_ERROR("pollset_global_init", pollset_global_init())) {
diff --git a/src/core/lib/iomgr/ev_posix.cc b/src/core/lib/iomgr/ev_posix.cc
index f72f508..a05279a 100644
--- a/src/core/lib/iomgr/ev_posix.cc
+++ b/src/core/lib/iomgr/ev_posix.cc
@@ -172,12 +172,12 @@
     gpr_free(strings[i]);
   }
   gpr_free(strings);
-  gpr_free(s);
 
   if (g_event_engine == NULL) {
-    gpr_log(GPR_ERROR, "No event engine could be initialized");
+    gpr_log(GPR_ERROR, "No event engine could be initialized from %s", s);
     abort();
   }
+  gpr_free(s);
 }
 
 void grpc_event_engine_shutdown(void) {
diff --git a/src/core/lib/iomgr/pollset_uv.cc b/src/core/lib/iomgr/pollset_uv.cc
index 6b9c53c..1d54942 100644
--- a/src/core/lib/iomgr/pollset_uv.cc
+++ b/src/core/lib/iomgr/pollset_uv.cc
@@ -40,7 +40,7 @@
 #endif
 
 struct grpc_pollset {
-  uv_timer_t timer;
+  uv_timer_t* timer;
   int shutting_down;
 };
 
@@ -78,12 +78,16 @@
 
 static void timer_run_cb(uv_timer_t* timer) {}
 
-static void timer_close_cb(uv_handle_t* handle) { handle->data = (void*)1; }
+static void timer_close_cb(uv_handle_t* handle) {
+  handle->data = (void*)1;
+  gpr_free(handle);
+}
 
 void grpc_pollset_init(grpc_pollset* pollset, gpr_mu** mu) {
   GRPC_UV_ASSERT_SAME_THREAD();
   *mu = &grpc_polling_mu;
-  uv_timer_init(uv_default_loop(), &pollset->timer);
+  pollset->timer = (uv_timer_t*)gpr_malloc(sizeof(uv_timer_t));
+  uv_timer_init(uv_default_loop(), pollset->timer);
   pollset->shutting_down = 0;
 }
 
@@ -104,11 +108,11 @@
 
 void grpc_pollset_destroy(grpc_exec_ctx* exec_ctx, grpc_pollset* pollset) {
   GRPC_UV_ASSERT_SAME_THREAD();
-  uv_close((uv_handle_t*)&pollset->timer, timer_close_cb);
+  uv_close((uv_handle_t*)pollset->timer, timer_close_cb);
   // timer.data is a boolean indicating that the timer has finished closing
-  pollset->timer.data = (void*)0;
+  pollset->timer->data = (void*)0;
   if (grpc_pollset_work_run_loop) {
-    while (!pollset->timer.data) {
+    while (!pollset->timer->data) {
       uv_run(uv_default_loop(), UV_RUN_NOWAIT);
     }
   }
@@ -130,11 +134,11 @@
     /* We special-case timeout=0 so that we don't bother with the timer when
        the loop won't block anyway */
     if (timeout > 0) {
-      uv_timer_start(&pollset->timer, timer_run_cb, timeout, 0);
+      uv_timer_start(pollset->timer, timer_run_cb, timeout, 0);
       /* Run until there is some I/O activity or the timer triggers. It doesn't
          matter which happens */
       uv_run(uv_default_loop(), UV_RUN_ONCE);
-      uv_timer_stop(&pollset->timer);
+      uv_timer_stop(pollset->timer);
     } else {
       uv_run(uv_default_loop(), UV_RUN_NOWAIT);
     }
diff --git a/test/core/support/cpu_test.cc b/test/core/support/cpu_test.cc
index a76531e..c69ce55 100644
--- a/test/core/support/cpu_test.cc
+++ b/test/core/support/cpu_test.cc
@@ -68,7 +68,7 @@
   unsigned i, j;
   /* Avoid repetitive division calculations */
   int64_t max_i = 1000 / grpc_test_slowdown_factor();
-  int64_t max_j = 1000000 / grpc_test_slowdown_factor();
+  int64_t max_j = 1000 / grpc_test_slowdown_factor();
   for (i = 0; i < max_i; i++) {
     /* run for a bit - just calculate something random. */
     for (j = 0; j < max_j; j++) {
diff --git a/tools/dockerfile/grpc_artifact_linux_x64/Dockerfile b/tools/dockerfile/grpc_artifact_linux_x64/Dockerfile
new file mode 100644
index 0000000..0251b2b
--- /dev/null
+++ b/tools/dockerfile/grpc_artifact_linux_x64/Dockerfile
@@ -0,0 +1,88 @@
+# Copyright 2016 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Docker file for building gRPC artifacts.
+
+FROM debian:jessie
+
+RUN apt-get update && apt-get install debian-keyring && apt-key update
+
+# Install Git and basic packages.
+RUN apt-get update && apt-key update && apt-get install -y \
+  autoconf \
+  autotools-dev \
+  build-essential \
+  bzip2 \
+  clang \
+  curl \
+  gcc \
+  gcc-multilib \
+  git \
+  golang \
+  libc6 \
+  libc6-dbg \
+  libc6-dev \
+  libgtest-dev \
+  libtool \
+  make \
+  perl \
+  strace \
+  python-dev \
+  python-setuptools \
+  python-yaml \
+  telnet \
+  unzip \
+  wget \
+  zip && apt-get clean
+
+# Install Node dependencies
+RUN touch .profile
+RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash
+RUN /bin/bash -l -c "nvm install 8 && npm install -g node-pre-gyp"
+
+
+##################
+# Ruby dependencies
+
+# Install rvm
+RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
+RUN \curl -sSL https://get.rvm.io | bash -s stable
+
+# Install Ruby 2.1
+RUN /bin/bash -l -c "rvm install ruby-2.1"
+RUN /bin/bash -l -c "rvm use --default ruby-2.1"
+RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
+RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
+RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc"
+RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"
+
+
+##################
+# PHP dependencies
+
+RUN apt-get update && apt-get install -y \
+    php5 php5-dev php-pear phpunit
+
+##################
+# Install cross compiler for ARM
+
+RUN echo 'deb http://emdebian.org/tools/debian/ jessie main' | tee -a /etc/apt/sources.list.d/crosstools.list && \
+  curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add -
+
+RUN dpkg --add-architecture armhf && apt-get update && apt-get install -y crossbuild-essential-armhf
+
+RUN mkdir /var/local/jenkins
+
+# Define the default command.
+CMD ["bash"]
diff --git a/tools/dockerfile/grpc_artifact_linux_x86/Dockerfile b/tools/dockerfile/grpc_artifact_linux_x86/Dockerfile
new file mode 100644
index 0000000..2d179c8
--- /dev/null
+++ b/tools/dockerfile/grpc_artifact_linux_x86/Dockerfile
@@ -0,0 +1,73 @@
+# Copyright 2016 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Docker file for building gRPC artifacts.
+
+FROM 32bit/debian:jessie
+
+RUN apt-get update && apt-get install debian-keyring && apt-key update
+
+# Install Git and basic packages.
+RUN apt-get update && apt-key update && apt-get install -y \
+  autoconf \
+  autotools-dev \
+  build-essential \
+  bzip2 \
+  clang \
+  curl \
+  gcc \
+  gcc-multilib \
+  git \
+  golang \
+  libc6 \
+  libc6-dbg \
+  libc6-dev \
+  libgtest-dev \
+  libtool \
+  make \
+  perl \
+  strace \
+  python-dev \
+  python-setuptools \
+  python-yaml \
+  telnet \
+  unzip \
+  wget \
+  zip && apt-get clean
+
+# Install Node dependencies
+RUN touch .profile
+RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash
+RUN /bin/bash -l -c "nvm install 8 && npm install -g node-pre-gyp"
+
+
+##################
+# Ruby dependencies
+
+# Install rvm
+RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
+RUN \curl -sSL https://get.rvm.io | bash -s stable
+
+# Install Ruby 2.1
+RUN /bin/bash -l -c "rvm install ruby-2.1"
+RUN /bin/bash -l -c "rvm use --default ruby-2.1"
+RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
+RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
+RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc"
+RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"
+
+RUN mkdir /var/local/jenkins
+
+# Define the default command.
+CMD ["bash"]
diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json
index 5ba06bf..5df5a74 100644
--- a/tools/run_tests/generated/tests.json
+++ b/tools/run_tests/generated/tests.json
@@ -2964,9 +2964,7 @@
     "uses_polling": false
   }, 
   {
-    "args": [
-      "--benchmark_min_time=0"
-    ], 
+    "args": [], 
     "benchmark": true, 
     "ci_platforms": [
       "linux", 
@@ -2988,9 +2986,7 @@
     "uses_polling": false
   }, 
   {
-    "args": [
-      "--benchmark_min_time=0"
-    ], 
+    "args": [], 
     "benchmark": true, 
     "ci_platforms": [
       "linux", 
@@ -3012,9 +3008,7 @@
     "uses_polling": false
   }, 
   {
-    "args": [
-      "--benchmark_min_time=0"
-    ], 
+    "args": [], 
     "benchmark": true, 
     "ci_platforms": [
       "linux", 
@@ -3036,9 +3030,7 @@
     "uses_polling": false
   }, 
   {
-    "args": [
-      "--benchmark_min_time=0"
-    ], 
+    "args": [], 
     "benchmark": true, 
     "ci_platforms": [
       "linux", 
@@ -3060,9 +3052,7 @@
     "uses_polling": true
   }, 
   {
-    "args": [
-      "--benchmark_min_time=0"
-    ], 
+    "args": [], 
     "benchmark": true, 
     "ci_platforms": [
       "linux", 
@@ -3084,9 +3074,7 @@
     "uses_polling": true
   }, 
   {
-    "args": [
-      "--benchmark_min_time=0"
-    ], 
+    "args": [], 
     "benchmark": true, 
     "ci_platforms": [
       "linux", 
@@ -3108,9 +3096,7 @@
     "uses_polling": true
   }, 
   {
-    "args": [
-      "--benchmark_min_time=4"
-    ], 
+    "args": [], 
     "benchmark": true, 
     "ci_platforms": [
       "linux", 
@@ -3132,9 +3118,7 @@
     "uses_polling": true
   }, 
   {
-    "args": [
-      "--benchmark_min_time=0"
-    ], 
+    "args": [], 
     "benchmark": true, 
     "ci_platforms": [
       "linux", 
@@ -3156,9 +3140,7 @@
     "uses_polling": false
   }, 
   {
-    "args": [
-      "--benchmark_min_time=0"
-    ], 
+    "args": [], 
     "benchmark": true, 
     "ci_platforms": [
       "linux", 
@@ -3185,9 +3167,7 @@
     "uses_polling": true
   }, 
   {
-    "args": [
-      "--benchmark_min_time=0"
-    ], 
+    "args": [], 
     "benchmark": true, 
     "ci_platforms": [
       "linux", 
@@ -3214,9 +3194,7 @@
     "uses_polling": true
   }, 
   {
-    "args": [
-      "--benchmark_min_time=0"
-    ], 
+    "args": [], 
     "benchmark": true, 
     "ci_platforms": [
       "linux", 
@@ -3245,9 +3223,7 @@
     "uses_polling": true
   }, 
   {
-    "args": [
-      "--benchmark_min_time=0"
-    ], 
+    "args": [], 
     "benchmark": true, 
     "ci_platforms": [
       "linux", 
@@ -3274,9 +3250,7 @@
     "uses_polling": true
   }, 
   {
-    "args": [
-      "--benchmark_min_time=0"
-    ], 
+    "args": [], 
     "benchmark": true, 
     "ci_platforms": [
       "linux", 
@@ -3298,9 +3272,7 @@
     "uses_polling": false
   }, 
   {
-    "args": [
-      "--benchmark_min_time=0"
-    ], 
+    "args": [], 
     "benchmark": true, 
     "ci_platforms": [
       "linux",