Skip to content

FELIX-6882: Component stop() blocks forever when registerService fails - #601

Open
pderop wants to merge 1 commit into
apache:masterfrom
pderop:FELIX-6882
Open

pderop wants to merge 1 commit into
apache:masterfrom
pderop:FELIX-6882

Conversation

@pderop

@pderop pderop commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Motivation:

If registerService() fails with an exception other than IllegalArgumentException (e.g. a failing propagate callback), the ServiceRegistrationImpl wrapper is never filled in. Stopping the component then blocks forever in ServiceRegistrationImpl.unregister(), which freezes the bundle stop.

Modification:

Compute the service properties inside the try block and catch RuntimeException, so the wrapper is set to the illegal state. Add FELIX6882_RegisterServiceFailureTest to reproduce the hang.

Result:

A failed service registration is logged and the component can be stopped normally.

Motivation:

If registerService() fails with an exception other than
IllegalArgumentException (e.g. a failing propagate callback), the
ServiceRegistrationImpl wrapper is never filled in. Stopping the
component then blocks forever in ServiceRegistrationImpl.unregister(),
which freezes the bundle stop.

Modification:

Compute the service properties inside the try block and catch
RuntimeException, so the wrapper is set to the illegal state. Add
FELIX6882_RegisterServiceFailureTest to reproduce the hang.

Result:

A failed service registration is logged and the component can be
stopped normally.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@pderop pderop self-assigned this Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants