tcp_server_posix.c:395] Failed accept4: Invalid argument

310 views
Skip to first unread message

Okke Hendriks

unread,
Nov 30, 2016, 3:37:00 AM11/30/16
to grpc.io

Hello,

I am using gRPC C++ 1.0.0 and running multiple nightly tests.
One of these tests is qualifying if on/multiple client can connect to a server.
Sporadically i am getting the following error in the output of my tests:

tcp_server_posix.c:395]     Failed accept4: Invalid argument

When this happens, client are also unable to connect:

connection.test.h:71: Failure
Value of: mClient->Connected()
 
Actual: false
Expected: true
connection
.test.h:72: Failure
Value of: mClient->WaitForConnected(std::chrono::milliseconds(TEST_CONNECTION_WAIT))
 
Actual: false
Expected: true

So it seems that the server never starts running or at least does not accept connections.

When checking linux manual I am seeing the following:
EINVAL (accept4()) invalid value in flags.

The server and client(s) are both created in the same gtest process, running on a port on localhost.

I am not yet able to reproduce this consistently, but I am asking anyway in the hope this is known to someone here, or if somebody has an idea to reproduce this more consistently.

David Garcia Quintas

unread,
Feb 16, 2017, 3:24:22 PM2/16/17
to grpc.io, okkehe...@gmail.com
Hi Okke,

Not really answering what the cause of that error was, but, would it be possible for you to upgrade to a more recent version? Lots of bug fixes have happened around that part of the codebase.

okkehe...@gmail.com

unread,
Feb 20, 2017, 3:22:16 AM2/20/17
to grpc.io, okkehe...@gmail.com
Hi David,

Thank you for the answer, unfortunately the project that I was using GRPC for is currently on hold so upgrading will have to wait :)
Reply all
Reply to author
Forward
0 new messages