COVESA / vsomeip

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

When testing a cycle event, calling application_impl::stop_offer_event is invalid. #666

Open hjkcst opened 1 month ago

hjkcst commented 1 month ago

vSomeip Version

v3.4

Boost Version

1.7

Environment

Embedded linux,ubuntu1808

Describe the bug

When testing a cycle event, calling application_impl::stop_offer_event is invalid. The reference count for the event was not actually cleared, causing the cycle event to still notify.

The root cause is here. file path:implementation\routing\src\event.cpp cycle_event

This problem can be solved with a few modifications. cycle_event_change

Reproduction Steps

server: 0.Register handler(state、message) 1.offer_service 2.offer_event (set sycle event) 3.notify 4.stop_offer_event result: The server is still notifying, and the client can still receive the notification message.

client: 0.Register handler(state、massage、availability) 1.request_service 2.request_event 3.subscribe(sycle event) result: It can receive a notification and continue to receive notifications after stop_offer_event on the server.

Expected behaviour

server: cycle event can stop notify. client: stopped receiving notifications

Logs and Screenshots

No response

hjkcst commented 1 month ago

I believe that the root cause of the problem is that sycle event incorrectly increments the reference count of the event by 1 when start_cycle is used. I hope it can provide ideas for the community to investigate this issue and look forward to the community's reply.

zhaoxin39913 commented 1 month ago

Yes, I come across the same issue, even after stopping service the cyclical event still can not be stopped.

hjkcst commented 3 weeks ago

Hello, everyone

Does anyone know how to promote the modification of this problem?

thanks, hjkcst

zhaoxin39913 commented 2 weeks ago

Hi @hjkcst ,

I think you can follow the community process to contribute your change to related git branch.

hjkcst commented 1 week ago

HI, everyone

Has you known this problem? image

BrunoLSilvaCTW commented 1 week ago

Hi @hjkcst,

You need to create a fork first. See this page for instructions on how to do it.