COVESA / vsomeip

An implementation of Scalable service-Oriented MiddlewarE over IP
Mozilla Public License 2.0
1.12k stars 697 forks source link

[BUG]: Client does not go back to initial Wait Phase when offer service TTL expires. #803

Open chw-eng opened 6 days ago

chw-eng commented 6 days ago

vSomeip Version

v3.4.10

Boost Version

1.74

Environment

Embedded Linux

Describe the bug

According to SOMEIP/SD Protocol Spec, Client should go to "Initial Wait Phase" when TTL expires and start to send "find service". See the following Client State Machine transitions:

FROM Service Ready TO Searching for Service WITH Timer expired (TTL)

FROM entry point Searching for Service TO Initial Wait Phase

FROM entry point Initial Wait Phase TO Timer Set OF Initial Wait Phase WITH /setTimerInRange(INITIAL_DELAY_MIN, INITIAL_DELAY_MAX)

FROM Timer Set OF Initial Wait Phase TO Repetition Phase WITH TimerExpired /send(FindService)

However when I quit server, the client seems to go to "Stopped" state instead and no "find service" is sent out

Reproduction Steps

Both service app and client app have the following Service Discovery Config:

    "initial_delay_min" : "10",
    "initial_delay_max" : "50",
    "repetitions_base_delay" : "100",
    "repetitions_max" : "4",
    "ttl" : "3",
    "cyclic_offer_delay" : "1000",
    "request_response_delay" : "10"

Both service and client applications are running, and then kill service application

Expected behaviour

After service application stops and TTL expires, client should send "find service"

Logs and Screenshots

wireshark_log

chw-eng commented 6 days ago

I submitted a potential fix https://github.com/COVESA/vsomeip/pull/804 Would you please review to see if it makes sense? Now I can see "find service" with the fix. wireshark_log2