You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When tcp client endpoint gets a broken socket during normal operation:
receive_cbk() should get Connection reset by peer(104)
send_cbk() should get Broken pipe (32)
but there's still a 10 second delay until communication gets re-established. This is because inside receive_cbk() while the state is ESTABLISHED it calls wait_until_sent():
where instead we probably wanted to go down the if-path for an immediate restart, knowing the socket is broken -- noting that multiple code paths doing restart is going to exaggerate issues like #690
vSomeip Version
v3.4.10
Boost Version
1.82
Environment
QNX and Android
Describe the bug
When tcp client endpoint gets a broken socket during normal operation:
receive_cbk()
should get Connection reset by peer(104)send_cbk()
should get Broken pipe (32)but there's still a 10 second delay until communication gets re-established. This is because inside
receive_cbk()
while the state is ESTABLISHED it callswait_until_sent()
:vsomeip/implementation/endpoints/src/tcp_client_endpoint_impl.cpp
Lines 789 to 800 in cf49723
And at the top of that function it checks
is_sending_
which was the subject of [BUG]: tcp_client_endpoint must unset is_sending_ during restart #668 and may be set at this point; likely if the system is under heavy load_error
which is definitely set by the callervsomeip/implementation/endpoints/src/tcp_client_endpoint_impl.cpp
Lines 1020 to 1023 in cf49723
sending us down the else-path to wait hardcoded 10s:
vsomeip/implementation/endpoints/src/tcp_client_endpoint_impl.cpp
Lines 1032 to 1039 in cf49723
where instead we probably wanted to go down the if-path for an immediate restart, knowing the socket is broken -- noting that multiple code paths doing restart is going to exaggerate issues like #690
Reproduction Steps
Same repro like issue #668 with:
is_sending_
being either true or false at time of break)Repeat in a loop. Maybe 1-in-10 chance of hitting this code path
Expected behaviour
vsomeip should recover more quickly from tce socket break
Logs and Screenshots
After the socket break we see:
then after the 10 second delay it's finally unblocked to continue:
The text was updated successfully, but these errors were encountered: