Exception in router makes Wisdom a Zombie #544

Closed
magnet opened this Issue Dec 2, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@magnet
Contributor

magnet commented Dec 2, 2015

The following exception sometimes happens when we run Wisdom, and it leaves the router in an unhealthy state in which all requests return 503 or close the socket early.

02/12/15 17:18:02 (G) LoggerService.log : [ERROR]  : The method bindFilter in the implementation class org.wisdom.router.RequestRouter throws an exception : null
java.util.ConcurrentModificationException
        at java.util.ArrayList.sort(ArrayList.java:1456)
        at java.util.Collections.sort(Collections.java:175)
        at org.wisdom.router.RequestRouter$FilterSet.__M_add(RequestRouter.java:481)
        at org.wisdom.router.RequestRouter$FilterSet.add(RequestRouter.java)
        at org.wisdom.router.RequestRouter$FilterSet.__M_add(RequestRouter.java:475)
        at org.wisdom.router.RequestRouter$FilterSet.add(RequestRouter.java)
        at org.wisdom.router.RequestRouter.__M_bindFilter(RequestRouter.java:429)
        at org.wisdom.router.RequestRouter.bindFilter(RequestRouter.java)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
@magnet

This comment has been minimized.

Show comment
Hide comment
@magnet

magnet Dec 3, 2015

Contributor

Another similar one, same effect:

03/12/15 11:52:30 (G) LoggerService.log : [ERROR]  : The method unbindFilter in the implementation class org.wisdom.router.RequestRouter throws an exception : null
java.lang.NullPointerException
        at org.wisdom.router.RequestRouter$FilterSet.__M_indexOf(RequestRouter.java:501)
        at org.wisdom.router.RequestRouter$FilterSet.indexOf(RequestRouter.java)
        at org.wisdom.router.RequestRouter$FilterSet.__M_remove(RequestRouter.java:510)
        at org.wisdom.router.RequestRouter$FilterSet.remove(RequestRouter.java)
        at org.wisdom.router.RequestRouter.__M_unbindFilter(RequestRouter.java:439)
        at org.wisdom.router.RequestRouter.unbindFilter(RequestRouter.java)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.felix.ipojo.util.Callback.call(Callback.java:237)
        at org.apache.felix.ipojo.handlers.dependency.DependencyCallback.call(DependencyCallback.java:232)
        at org.apache.felix.ipojo.handlers.dependency.Dependency.invokeCallback(Dependency.java:338)
        at org.apache.felix.ipojo.handlers.dependency.Dependency.callUnbindMethod(Dependency.java:321)
        at org.apache.felix.ipojo.handlers.dependency.Dependency.onServiceDeparture(Dependency.java:569)
        at org.apache.felix.ipojo.util.DependencyModel.onChange(DependencyModel.java:1094)
        at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.fireUpdate(ServiceReferenceManager.java:561)
        at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.onDepartureOfAMatchingService(ServiceReferenceManager.java:672)
        at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.removedService(ServiceReferenceManager.java:687)
Contributor

magnet commented Dec 3, 2015

Another similar one, same effect:

03/12/15 11:52:30 (G) LoggerService.log : [ERROR]  : The method unbindFilter in the implementation class org.wisdom.router.RequestRouter throws an exception : null
java.lang.NullPointerException
        at org.wisdom.router.RequestRouter$FilterSet.__M_indexOf(RequestRouter.java:501)
        at org.wisdom.router.RequestRouter$FilterSet.indexOf(RequestRouter.java)
        at org.wisdom.router.RequestRouter$FilterSet.__M_remove(RequestRouter.java:510)
        at org.wisdom.router.RequestRouter$FilterSet.remove(RequestRouter.java)
        at org.wisdom.router.RequestRouter.__M_unbindFilter(RequestRouter.java:439)
        at org.wisdom.router.RequestRouter.unbindFilter(RequestRouter.java)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.felix.ipojo.util.Callback.call(Callback.java:237)
        at org.apache.felix.ipojo.handlers.dependency.DependencyCallback.call(DependencyCallback.java:232)
        at org.apache.felix.ipojo.handlers.dependency.Dependency.invokeCallback(Dependency.java:338)
        at org.apache.felix.ipojo.handlers.dependency.Dependency.callUnbindMethod(Dependency.java:321)
        at org.apache.felix.ipojo.handlers.dependency.Dependency.onServiceDeparture(Dependency.java:569)
        at org.apache.felix.ipojo.util.DependencyModel.onChange(DependencyModel.java:1094)
        at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.fireUpdate(ServiceReferenceManager.java:561)
        at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.onDepartureOfAMatchingService(ServiceReferenceManager.java:672)
        at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.removedService(ServiceReferenceManager.java:687)
@cescoffier

This comment has been minimized.

Show comment
Hide comment
@cescoffier

cescoffier Dec 4, 2015

Member

Hi,

Definitely a rece condition in the router. Which version are you using ?

On 3 déc. 2015, at 14:18, Simon Chemouil notifications@github.com wrote:

Another similar one, same effect:

03/12/15 11:52:30 (G) LoggerService.log : [ERROR] : The method unbindFilter in the implementation class org.wisdom.router.RequestRouter throws an exception : null
java.lang.NullPointerException
at org.wisdom.router.RequestRouter$FilterSet.__M_indexOf(RequestRouter.java:501)
at org.wisdom.router.RequestRouter$FilterSet.indexOf(RequestRouter.java)
at org.wisdom.router.RequestRouter$FilterSet.__M_remove(RequestRouter.java:510)
at org.wisdom.router.RequestRouter$FilterSet.remove(RequestRouter.java)
at org.wisdom.router.RequestRouter.__M_unbindFilter(RequestRouter.java:439)
at org.wisdom.router.RequestRouter.unbindFilter(RequestRouter.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.felix.ipojo.util.Callback.call(Callback.java:237)
at org.apache.felix.ipojo.handlers.dependency.DependencyCallback.call(DependencyCallback.java:232)
at org.apache.felix.ipojo.handlers.dependency.Dependency.invokeCallback(Dependency.java:338)
at org.apache.felix.ipojo.handlers.dependency.Dependency.callUnbindMethod(Dependency.java:321)
at org.apache.felix.ipojo.handlers.dependency.Dependency.onServiceDeparture(Dependency.java:569)
at org.apache.felix.ipojo.util.DependencyModel.onChange(DependencyModel.java:1094)
at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.fireUpdate(ServiceReferenceManager.java:561)
at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.onDepartureOfAMatchingService(ServiceReferenceManager.java:672)
at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.removedService(ServiceReferenceManager.java:687)

Reply to this email directly or view it on GitHub #544 (comment).

Member

cescoffier commented Dec 4, 2015

Hi,

Definitely a rece condition in the router. Which version are you using ?

On 3 déc. 2015, at 14:18, Simon Chemouil notifications@github.com wrote:

Another similar one, same effect:

03/12/15 11:52:30 (G) LoggerService.log : [ERROR] : The method unbindFilter in the implementation class org.wisdom.router.RequestRouter throws an exception : null
java.lang.NullPointerException
at org.wisdom.router.RequestRouter$FilterSet.__M_indexOf(RequestRouter.java:501)
at org.wisdom.router.RequestRouter$FilterSet.indexOf(RequestRouter.java)
at org.wisdom.router.RequestRouter$FilterSet.__M_remove(RequestRouter.java:510)
at org.wisdom.router.RequestRouter$FilterSet.remove(RequestRouter.java)
at org.wisdom.router.RequestRouter.__M_unbindFilter(RequestRouter.java:439)
at org.wisdom.router.RequestRouter.unbindFilter(RequestRouter.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.felix.ipojo.util.Callback.call(Callback.java:237)
at org.apache.felix.ipojo.handlers.dependency.DependencyCallback.call(DependencyCallback.java:232)
at org.apache.felix.ipojo.handlers.dependency.Dependency.invokeCallback(Dependency.java:338)
at org.apache.felix.ipojo.handlers.dependency.Dependency.callUnbindMethod(Dependency.java:321)
at org.apache.felix.ipojo.handlers.dependency.Dependency.onServiceDeparture(Dependency.java:569)
at org.apache.felix.ipojo.util.DependencyModel.onChange(DependencyModel.java:1094)
at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.fireUpdate(ServiceReferenceManager.java:561)
at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.onDepartureOfAMatchingService(ServiceReferenceManager.java:672)
at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.removedService(ServiceReferenceManager.java:687)

Reply to this email directly or view it on GitHub #544 (comment).

@magnet

This comment has been minimized.

Show comment
Hide comment
@magnet

magnet Dec 10, 2015

Contributor

I'm on 0.9.1

Contributor

magnet commented Dec 10, 2015

I'm on 0.9.1

@cescoffier

This comment has been minimized.

Show comment
Hide comment
@cescoffier

cescoffier Dec 12, 2015

Member

It's all related to filters (I was afraid it was the routes).

Member

cescoffier commented Dec 12, 2015

It's all related to filters (I was afraid it was the routes).

@cescoffier cescoffier modified the milestones: 0.9.2, 0.10.0 Dec 12, 2015

@cescoffier cescoffier self-assigned this Dec 12, 2015

@cescoffier cescoffier added the bug label Dec 12, 2015

cescoffier added a commit that referenced this issue Dec 12, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment