Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: <title>The server closing the TCP connection when stopping all services. #825

Open
AGN-2022 opened this issue Dec 17, 2024 · 4 comments
Labels

Comments

@AGN-2022
Copy link

AGN-2022 commented Dec 17, 2024

vSomeip Version

v3.4.10

Boost Version

1.59

Environment

Ubuntu 20.04

Describe the bug

  1. Server Offering services.
  2. Client initiates TCP connection by sending [SYN]. [by 3-way handshake connection established]
  3. Client subscribes to a particular Event group offered by Server.
  4. Server sends ACK to client.
  5. Client calls method "SuspendInterface" to Server. [Intended to trigger Stop Offer from Server]
  6. Server sends Stop Offer Service Entry.
  7. Server initiates TCP connection close request by sending [FIN, ACK] to Client.

The TCP connection close request should not get triggered by Server, in this case this is the issue from VSOME/IP stack.

I observed the same behavior in 3.1.20.3 and 3.4.10.

Attached pcap log and Routing manager terminal log: TCP_close_issue_pcap_RM_logs.zip

Reproduction Steps

Steps 3 to 5 can reproduce the issue.

Expected behaviour

The server shall not stop the TCP connection when stopping all services.
Let the client to process control data & shutdown the connection by itself.

Logs and Screenshots

No response

@AGN-2022 AGN-2022 added the bug label Dec 17, 2024
@zhaoxin39913
Copy link

Can you point out which requirement in the SOME/IP Spec defines such behaivor ?

@AGN-2022
Copy link
Author

Can you point out which requirement in the SOME/IP Spec defines such behaivor ?

Dear @zhaoxin39913 , please check the below Spec.

[PRS_SOMEIP_00709]
Upstream requirements: RS_SOMEIP_00010
The TCP connection shall be closed by the client, when the TCP connection is not
required anymore.

[PRS_SOMEIP_00710]
Upstream requirements: RS_SOMEIP_00010
The TCP connection shall be closed by the client, when all Services using the TCP
connections are not available anymore (stopped or timed out).

[PRS_SOMEIP_00711]
Upstream requirements: RS_SOMEIP_00010
The server shall not stop the TCP connection when stopping all services. Give the
client enough time to process the control data to shutdown the TCP connection itself.

Rational:
When the server closes the TCP connection before the client recognized that the TCP
is not needed anymore, the client will try to reestablish the TCP connection.

@zhaoxin39913
Copy link

Hi @AGN-2022 ,

So the expected behavior is the server only closes the listen socket but keeps established connection sockets after stopping the service, right ?

Do you need this only for TC8 certificate ? To my understanding there is no function impact from application PoV. And the Spec also does not define how the server reacts subsequent requests from client after stopping the service but the connection socket is not closed by client.

@AGN-2022
Copy link
Author

Hi @zhaoxin39913 ,

If you observe pcap log, soon after Frame# 28 (which is Stop-Offer), Frame# 30 is triggering TCP-connection close which is not intended behavior as per Spec.

Image

I'm not sure about TC8 certificate.

I believe tcp_server_endpoint_impl::connection APIs can be analyzed and updated in such a way that specific connection established sockets shouldn't be closed from Server point of view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants