vsomeip icon indicating copy to clipboard operation
vsomeip copied to clipboard

Why 'async_connect() return network_unreachable? - TCP Tx stuck issue

Open hanul0505 opened this issue 3 years ago • 3 comments

Hello, I'm using vsomeip 3.1.20.3 now, but I have an issue, 'TCP Tx block'.

When DUT is connected to other device via TCP client port, if other device reboot by Power reset,(or other reason) then vsomeip try to re-connect by async_connect(). But sometimes, the UDP connect is succeed, but the TCP connect returns 'boost::asio::error::network_unreachable'. Then, vsomeip consider 'ON_AVAILABLE' because of UDP connect, even though TCP is not connected.

In this situation, if the application trying to send method call via TCP, then the condition, 'socket_->is_open()' in 'tcei::send_queued()' returns FALSE, so the 'async_write()' cannot be called, then the data is remained in TCP queue forever. After this, all of next TCP tx attampt are blocked, because 'client_endpoint_impl::queue_train()' cannot call 'send_queued()' since queue_.size() != 0. => TCP Tx block

So, I want to ask 2 questions,

  1. When 'async_connect() retuern boost::asio::error::network_unreachable?

  2. Do you have any correct solution or workaround for this issue? : I already tested, when socket_->is_open() of tcei::send_queued() return FALSE, I just call queue_.clear() then the TCP queue works well, but I want to correct fix from official way.(=without any side effect)

Thank you very much in advance.

hanul0505 avatar Sep 08 '21 05:09 hanul0505

not care . because has been solved before

ByteXiaoTang avatar Sep 09 '21 05:09 ByteXiaoTang

not care . because has been solved before

What do you mean 'has been solved before'? Do you have any information for fixed issue? I'm using v3.1.20.3, the latest version, and the other device is using v3.1.15.1.

hanul0505 avatar Sep 09 '21 05:09 hanul0505

not care . because has been solved before

What do you mean 'has been solved before'? Do you have any information for fixed issue? I'm using v3.1.20.3, the latest version, and the other device is using v3.1.15.1.

sorry , i may miss something.

ByteXiaoTang avatar Sep 13 '21 10:09 ByteXiaoTang

This problem occurs in the latest version 3.3.0? Thanks

goncaloalmeida avatar May 19 '23 10:05 goncaloalmeida