Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

OSGiEventManager should do safe method calls and identify handlers that are blocking #4591

Closed
kaikreuzer opened this issue Nov 20, 2017 · 2 comments · Fixed by #4655
Closed
Labels

Comments

@kaikreuzer
Copy link
Contributor

There are reports where the OSGiEventManager gets blacklisted by the OSGi EventAdmin, which results in an unusable system state. Instead of being blamed, the OSGiEventManager should instead make sure to identify blocking handlers itself and return quickly.

@sjsf
Copy link
Contributor

sjsf commented Nov 21, 2017

Even if it would take such buggers out of the game, I still see two remaining problems:

The default timeout of e.g. felix event admin is 5s, which is exactly the timeout of the safe method caller in this case. So at the point where it identifies a slow event subscriber, it is already to late and the event manager got banned itself.

If the internal timeouts are fixed, then the same would arise if there are multiple slow subscribers because they are informed serially.

The "proper" solution I guess would be to inform the subscribers asynchronously completely (and thereby taking care to ban slow subscribers itself). Wdyt?

@sjsf
Copy link
Contributor

sjsf commented Nov 21, 2017

no major objections so far, so I'll look into making an according PR proposal.

sjsf pushed a commit to sjsf/smarthome that referenced this issue Nov 21, 2017
* remove "hanging" event subscribers from the game
* inform _all_ event subscribers asynchronously

fixes eclipse-archived#4591
Signed-off-by: Simon Kaufmann <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants