[c++] channel.WaitForConnected assertion failed on pollset.polling_island != nullptr

172 views
Skip to first unread message

yihao yang

unread,
Sep 8, 2017, 10:41:32 PM9/8/17
to grpc.io
// get channel state first
I0711
11:31:07.631235663   15477 channel_connectivity.c:53]  grpc_channel_check_connectivity_state(channel=0x21d94b0, try_to_connect=1)

// create cq and call grpc_completion_queue_next
D0711
11:31:07.631243561   15477 connectivity_state.c:92]    CONWATCH: 0x21d95f8 client_channel: get TRANSIENT_FAILURE
I0711
11:31:07.631251411   15477 init.c:193]                 grpc_init(void)
I0711
11:31:07.631258629   15477 completion_queue.c:139]     grpc_completion_queue_create(reserved=(nil))
I0711
11:31:07.631267808   15477 channel_connectivity.c:196] grpc_channel_watch_connectivity_state(channel=0x21d94b0, last_observed_state=3, deadline=gpr_timespec { tv_sec: 1499797868, tv_nsec: 630269237, clock_type: 1 }, cq=0x7f2c3800be60, tag=0x7f2c00001860)
D0711
11:31:07.631278808   15477 connectivity_state.c:109]   CONWATCH: 0x21d95f8 client_channel: from TRANSIENT_FAILURE [cur=TRANSIENT_FAILURE] notify=0x7f2c000015b8
I0711
11:31:07.631288664   15477 completion_queue.c:333]     grpc_completion_queue_next(cc=0x7f2c3800be60, deadline=gpr_timespec { tv_sec: 9223372036854775807, tv_nsec: 0, clock_type: 1 }, reserved=(nil))


// Here inside grpc_completion_queue_next, it blocked for 1 seconds. and then when destroyed the cq, assertoin failed.
I0711 11:31:08.630851834   15477 completion_queue.c:394]     RETURN_EVENT[0x7f2c3800be60]: OP_COMPLETE: tag:0x7f2c00001860 ERROR
I0711 11:31:08.630867090   15477 completion_queue.c:561]     grpc_completion_queue_destroy(cc=0x7f2c3800be60)
I0711
11:31:08.630871804   15477 completion_queue.c:541]     grpc_completion_queue_shutdown(cc=0x7f2c3800be60)
D0711
11:31:08.630887317   15467 tcp_client_posix.c:305]     CLIENT_CONNECT: ipv6:[::1]:19998: asynchronously connecting
E0711
11:31:08.630888449   15477 ev_epoll_linux.c:1296]      assertion failed: pollset->polling_island == NULL

Hi, all,

The grpc version is v1.0.0. The scenario is like this: I was using a channel in a TRANSIENT_FAILURE state, and calling channel.WaitStateForConnected in the background.
But something error happened in the cq, it returns an ERROR event (I don't know the inside logic), and when destroy the cq, an assertion failed.
I think this may be a bug. Can anyone give me some hint?

Thanks,
Yihao

David Garcia Quintas

unread,
Sep 14, 2017, 5:32:26 PM9/14/17
to grpc.io
Hi Yihao,

1.0.0 is a very old version. Any reason you haven't used a more recent one? 1.6 was released a couple of weeks ago, for example.

Sree Kuchibhotla

unread,
Sep 14, 2017, 5:34:03 PM9/14/17
to grpc.io
Hi Yihao,
Looks like some bug in the completion queue shutdown path. This code has changed quite a bit since v1.0. So I recommend upgrading to the recent version of grpc.

-Sree

yihao yang

unread,
Sep 14, 2017, 9:25:50 PM9/14/17
to grpc.io
Hi, David

I'm actually testing on GRPC 1.4.2. I encountered another assertion in CQ shutdown.
 
https://groups.google.com/forum/#!topic/grpc-io/7m1_HdenE58
May you have a look?

在 2017年9月14日星期四 UTC-7下午2:32:26,David Garcia Quintas写道:

yihao yang

unread,
Sep 14, 2017, 9:49:02 PM9/14/17
to grpc.io
@Sree 
I'm testing grpc 1.4.2. Also found a assertion in CQ shutdown.

Thank,
Yihao

在 2017年9月14日星期四 UTC-7下午6:25:50,yihao yang写道:
Reply all
Reply to author
Forward
0 new messages