grpc 1.8.3 → 1.8.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of grpc might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0608a89917ee43dca921f344a0e999259a4359f188cae5bf21f09f08298d66da'
4
- data.tar.gz: 8c5a07aef607e15c825f21ff993e761542c27bc5e2539945a78e20617f6bfe36
3
+ metadata.gz: 5a158c8d870d3a5f52263d90b323a4cf8adb2783d9fd5a3833993796e61190fd
4
+ data.tar.gz: b3fd61695f55e21f7f5b36d02172ce677f25b598373121a9e6009841875424ae
5
5
  SHA512:
6
- metadata.gz: '09c712f7d2136cf6582b103412c93726f36de3d2ad8a52f14432be730b0edfc1891cc3920d8375a64143304480a7459d04b988d360dade90dbdc0980ef94070e'
7
- data.tar.gz: 92d5ff1d379b7caf349974f4665e4b489f4cb2d7d380d95fc5fab5f2eb1b09f414741754215966afd7f3d214c61b9ed6fce386e7fbe262854113548ff0034505
6
+ metadata.gz: d8e480f567627a66ccf9ba82bd0b85c81ac4f86b912891cd10bd37f69a6abe8c6637dcaf9d62dcf0078cac1a69e983be0970e4e7cd34008798ad7f6a0f071d1d
7
+ data.tar.gz: 9ec12f6b381e88be135551b360e68a3b4777d1ecef7c9085f8b7b074dc08cf3f318aa789aac391543bb501a48dffa85bde84f45ec2e71ac19c4cff1bce93f88a
data/Makefile CHANGED
@@ -412,8 +412,8 @@ Q = @
412
412
  endif
413
413
 
414
414
  CORE_VERSION = 5.0.0
415
- CPP_VERSION = 1.8.3
416
- CSHARP_VERSION = 1.8.3
415
+ CPP_VERSION = 1.8.6
416
+ CSHARP_VERSION = 1.8.6
417
417
 
418
418
  CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES))
419
419
  CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
@@ -1223,6 +1223,7 @@ boringssl_tab_test: $(BINDIR)/$(CONFIG)/boringssl_tab_test
1223
1223
  boringssl_v3name_test: $(BINDIR)/$(CONFIG)/boringssl_v3name_test
1224
1224
  badreq_bad_client_test: $(BINDIR)/$(CONFIG)/badreq_bad_client_test
1225
1225
  connection_prefix_bad_client_test: $(BINDIR)/$(CONFIG)/connection_prefix_bad_client_test
1226
+ duplicate_header_bad_client_test: $(BINDIR)/$(CONFIG)/duplicate_header_bad_client_test
1226
1227
  head_of_line_blocking_bad_client_test: $(BINDIR)/$(CONFIG)/head_of_line_blocking_bad_client_test
1227
1228
  headers_bad_client_test: $(BINDIR)/$(CONFIG)/headers_bad_client_test
1228
1229
  initial_settings_frame_bad_client_test: $(BINDIR)/$(CONFIG)/initial_settings_frame_bad_client_test
@@ -1476,6 +1477,7 @@ buildtests_c: privatelibs_c \
1476
1477
  $(BINDIR)/$(CONFIG)/public_headers_must_be_c89 \
1477
1478
  $(BINDIR)/$(CONFIG)/badreq_bad_client_test \
1478
1479
  $(BINDIR)/$(CONFIG)/connection_prefix_bad_client_test \
1480
+ $(BINDIR)/$(CONFIG)/duplicate_header_bad_client_test \
1479
1481
  $(BINDIR)/$(CONFIG)/head_of_line_blocking_bad_client_test \
1480
1482
  $(BINDIR)/$(CONFIG)/headers_bad_client_test \
1481
1483
  $(BINDIR)/$(CONFIG)/initial_settings_frame_bad_client_test \
@@ -2004,6 +2006,8 @@ test_c: buildtests_c
2004
2006
  $(Q) $(BINDIR)/$(CONFIG)/badreq_bad_client_test || ( echo test badreq_bad_client_test failed ; exit 1 )
2005
2007
  $(E) "[RUN] Testing connection_prefix_bad_client_test"
2006
2008
  $(Q) $(BINDIR)/$(CONFIG)/connection_prefix_bad_client_test || ( echo test connection_prefix_bad_client_test failed ; exit 1 )
2009
+ $(E) "[RUN] Testing duplicate_header_bad_client_test"
2010
+ $(Q) $(BINDIR)/$(CONFIG)/duplicate_header_bad_client_test || ( echo test duplicate_header_bad_client_test failed ; exit 1 )
2007
2011
  $(E) "[RUN] Testing head_of_line_blocking_bad_client_test"
2008
2012
  $(Q) $(BINDIR)/$(CONFIG)/head_of_line_blocking_bad_client_test || ( echo test head_of_line_blocking_bad_client_test failed ; exit 1 )
2009
2013
  $(E) "[RUN] Testing headers_bad_client_test"
@@ -18478,6 +18482,26 @@ ifneq ($(NO_DEPS),true)
18478
18482
  endif
18479
18483
 
18480
18484
 
18485
+ DUPLICATE_HEADER_BAD_CLIENT_TEST_SRC = \
18486
+ test/core/bad_client/tests/duplicate_header.cc \
18487
+
18488
+ DUPLICATE_HEADER_BAD_CLIENT_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(DUPLICATE_HEADER_BAD_CLIENT_TEST_SRC))))
18489
+
18490
+
18491
+ $(BINDIR)/$(CONFIG)/duplicate_header_bad_client_test: $(DUPLICATE_HEADER_BAD_CLIENT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
18492
+ $(E) "[LD] Linking $@"
18493
+ $(Q) mkdir -p `dirname $@`
18494
+ $(Q) $(LD) $(LDFLAGS) $(DUPLICATE_HEADER_BAD_CLIENT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/duplicate_header_bad_client_test
18495
+
18496
+ $(OBJDIR)/$(CONFIG)/test/core/bad_client/tests/duplicate_header.o: $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
18497
+
18498
+ deps_duplicate_header_bad_client_test: $(DUPLICATE_HEADER_BAD_CLIENT_TEST_OBJS:.o=.dep)
18499
+
18500
+ ifneq ($(NO_DEPS),true)
18501
+ -include $(DUPLICATE_HEADER_BAD_CLIENT_TEST_OBJS:.o=.dep)
18502
+ endif
18503
+
18504
+
18481
18505
  HEAD_OF_LINE_BLOCKING_BAD_CLIENT_TEST_SRC = \
18482
18506
  test/core/bad_client/tests/head_of_line_blocking.cc \
18483
18507
 
@@ -549,6 +549,7 @@ static void init_transport(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
549
549
  /* No pings allowed before receiving a header or data frame. */
550
550
  t->ping_state.pings_before_data_required = 0;
551
551
  t->ping_state.is_delayed_ping_timer_set = false;
552
+ t->ping_state.last_ping_sent_time = GRPC_MILLIS_INF_PAST;
552
553
 
553
554
  t->ping_recv_state.last_ping_recv_time = GRPC_MILLIS_INF_PAST;
554
555
  t->ping_recv_state.ping_strikes = 0;
@@ -69,20 +69,24 @@ static void maybe_initiate_ping(grpc_exec_ctx* exec_ctx,
69
69
  return;
70
70
  }
71
71
  grpc_millis now = grpc_exec_ctx_now(exec_ctx);
72
+
73
+ grpc_millis next_allowed_ping_interval =
74
+ (t->keepalive_permit_without_calls == 0 &&
75
+ grpc_chttp2_stream_map_size(&t->stream_map) == 0)
76
+ ? 7200 * GPR_MS_PER_SEC
77
+ : t->ping_policy.min_sent_ping_interval_without_data;
72
78
  grpc_millis next_allowed_ping =
73
- t->ping_state.last_ping_sent_time +
74
- t->ping_policy.min_sent_ping_interval_without_data;
75
- if (t->keepalive_permit_without_calls == 0 &&
76
- grpc_chttp2_stream_map_size(&t->stream_map) == 0) {
77
- next_allowed_ping =
78
- t->ping_recv_state.last_ping_recv_time + 7200 * GPR_MS_PER_SEC;
79
- }
79
+ t->ping_state.last_ping_sent_time + next_allowed_ping_interval;
80
+
80
81
  if (next_allowed_ping > now) {
81
82
  /* not enough elapsed time between successive pings */
82
83
  if (grpc_http_trace.enabled() || grpc_bdp_estimator_trace.enabled()) {
83
84
  gpr_log(GPR_DEBUG,
84
- "%s: Ping delayed [%p]: not enough time elapsed since last ping",
85
- t->is_client ? "CLIENT" : "SERVER", t->peer_string);
85
+ "%s: Ping delayed [%p]: not enough time elapsed since last ping. "
86
+ " Last ping %f: Next ping %f: Now %f",
87
+ t->is_client ? "CLIENT" : "SERVER", t->peer_string,
88
+ (double)t->ping_state.last_ping_sent_time,
89
+ (double)next_allowed_ping, (double)now);
86
90
  }
87
91
  if (!t->ping_state.is_delayed_ping_timer_set) {
88
92
  t->ping_state.is_delayed_ping_timer_set = true;
@@ -91,6 +95,7 @@ static void maybe_initiate_ping(grpc_exec_ctx* exec_ctx,
91
95
  }
92
96
  return;
93
97
  }
98
+
94
99
  pq->inflight_id = t->ping_ctr;
95
100
  t->ping_ctr++;
96
101
  GRPC_CLOSURE_LIST_SCHED(exec_ctx, &pq->lists[GRPC_CHTTP2_PCL_INITIATE]);
@@ -473,7 +473,7 @@ static grpc_error* fd_shutdown_error(grpc_fd* fd) {
473
473
 
474
474
  static void notify_on_locked(grpc_exec_ctx* exec_ctx, grpc_fd* fd,
475
475
  grpc_closure** st, grpc_closure* closure) {
476
- if (fd->shutdown) {
476
+ if (fd->shutdown || gpr_atm_no_barrier_load(&fd->pollhup)) {
477
477
  GRPC_CLOSURE_SCHED(exec_ctx, closure,
478
478
  GRPC_ERROR_CREATE_FROM_STATIC_STRING("FD shutdown"));
479
479
  } else if (*st == CLOSURE_NOT_READY) {
@@ -65,6 +65,17 @@ typedef struct {
65
65
  grpc_pollset* pollset;
66
66
  } grpc_tcp;
67
67
 
68
+ static grpc_error* tcp_annotate_error(grpc_error* src_error, grpc_tcp* tcp) {
69
+ return grpc_error_set_str(
70
+ grpc_error_set_int(
71
+ src_error,
72
+ /* All tcp errors are marked with UNAVAILABLE so that application may
73
+ * choose to retry. */
74
+ GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE),
75
+ GRPC_ERROR_STR_TARGET_ADDRESS,
76
+ grpc_slice_from_copied_string(tcp->peer_string));
77
+ }
78
+
68
79
  static void tcp_free(grpc_exec_ctx* exec_ctx, grpc_tcp* tcp) {
69
80
  grpc_resource_user_unref(exec_ctx, tcp->resource_user);
70
81
  gpr_free(tcp->handle);
@@ -166,7 +177,8 @@ static void read_callback(uv_stream_t* stream, ssize_t nread,
166
177
  // TODO(murgatroid99): figure out what the return value here means
167
178
  uv_read_stop(stream);
168
179
  if (nread == UV_EOF) {
169
- error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("EOF");
180
+ error =
181
+ tcp_annotate_error(GRPC_ERROR_CREATE_FROM_STATIC_STRING("EOF"), tcp);
170
182
  grpc_slice_buffer_reset_and_unref_internal(&exec_ctx, tcp->read_slices);
171
183
  } else if (nread > 0) {
172
184
  // Successful read
@@ -181,7 +193,8 @@ static void read_callback(uv_stream_t* stream, ssize_t nread,
181
193
  }
182
194
  } else {
183
195
  // nread < 0: Error
184
- error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("TCP Read failed");
196
+ error = tcp_annotate_error(
197
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("TCP Read failed"), tcp);
185
198
  grpc_slice_buffer_reset_and_unref_internal(&exec_ctx, tcp->read_slices);
186
199
  }
187
200
  call_read_cb(&exec_ctx, tcp, error);
@@ -200,7 +213,9 @@ static void tcp_read_allocation_done(grpc_exec_ctx* exec_ctx, void* tcpp,
200
213
  status =
201
214
  uv_read_start((uv_stream_t*)tcp->handle, alloc_uv_buf, read_callback);
202
215
  if (status != 0) {
203
- error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("TCP Read failed at start");
216
+ error = tcp_annotate_error(
217
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("TCP Read failed at start"),
218
+ tcp);
204
219
  error = grpc_error_set_str(
205
220
  error, GRPC_ERROR_STR_OS_ERROR,
206
221
  grpc_slice_from_static_string(uv_strerror(status)));
@@ -241,7 +256,8 @@ static void write_callback(uv_write_t* req, int status) {
241
256
  if (status == 0) {
242
257
  error = GRPC_ERROR_NONE;
243
258
  } else {
244
- error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("TCP Write failed");
259
+ error = tcp_annotate_error(
260
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("TCP Write failed"), tcp);
245
261
  }
246
262
  if (grpc_tcp_trace.enabled()) {
247
263
  const char* str = grpc_error_string(error);
@@ -275,9 +291,10 @@ static void uv_endpoint_write(grpc_exec_ctx* exec_ctx, grpc_endpoint* ep,
275
291
  }
276
292
 
277
293
  if (tcp->shutting_down) {
278
- GRPC_CLOSURE_SCHED(
279
- exec_ctx, cb,
280
- GRPC_ERROR_CREATE_FROM_STATIC_STRING("TCP socket is shutting down"));
294
+ GRPC_CLOSURE_SCHED(exec_ctx, cb,
295
+ tcp_annotate_error(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
296
+ "TCP socket is shutting down"),
297
+ tcp));
281
298
  return;
282
299
  }
283
300
 
@@ -1101,6 +1101,7 @@ static grpc_stream_compression_algorithm decode_stream_compression(
1101
1101
  static void publish_app_metadata(grpc_call* call, grpc_metadata_batch* b,
1102
1102
  int is_trailing) {
1103
1103
  if (b->list.count == 0) return;
1104
+ if (is_trailing && call->buffered_metadata[1] == nullptr) return;
1104
1105
  GPR_TIMER_BEGIN("publish_app_metadata", 0);
1105
1106
  grpc_metadata_array* dest;
1106
1107
  grpc_metadata* mdusr;
@@ -14,5 +14,5 @@
14
14
 
15
15
  # GRPC contains the General RPC module.
16
16
  module GRPC
17
- VERSION = '1.8.3'
17
+ VERSION = '1.8.6'
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.3
4
+ version: 1.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - gRPC Authors
8
8
  autorequire:
9
9
  bindir: src/ruby/bin
10
10
  cert_chain: []
11
- date: 2018-01-02 00:00:00.000000000 Z
11
+ date: 2018-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf