Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-4565

Occasional ArrayIndexOutOfBoundException in iPOJO's ProvidedServiceHandler

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • ipojo-runtime-1.11.2
    • ipojo-runtime-1.12.1
    • iPOJO
    • None
    • Karaf 2.3.3 / Windows 7 64 bit

    Description

      I have an iPOJO (1.11.2) component using the @ServiceController annotation to control the service publishing. Most of the time this works perfectly fine, but occasionally I get an ArrayIndexOutOfBoundsException.

      java.lang.ArrayIndexOutOfBoundsException: 4
                     at org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler.__M_onSet(ProvidedServiceHandler.java:416)[83:org.apache.felix.ipojo:1.11.2]
                     at org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler.onSet(ProvidedServiceHandler.java)[83:org.apache.felix.ipojo:1.11.2]
                     at org.apache.felix.ipojo.InstanceManager.onSet(InstanceManager.java:1401)[83:org.apache.felix.ipojo:1.11.2]
                     [..] (My own code following, where the service controller boolean is manipulated)
      

      Unfortunately I cannot share the consumer code nor reproduce the problem. I looked into iPOJOs code to see what's going on, and there we have:

      for (int j = 0; j < svc.getProperties().length; j++) { Property prop = svc.getProperties()[j];
                     [...]
      }
      

      Which looks like a proper race condition to me, if svc.getProperties() changes its value in the meantime because of missing synchronizations. I don't see any synchronizations there, but I also don't know if they would be appropriate in the first place.

      Attachments

        Activity

          People

            clement.escoffier Clement Escoffier
            benjamindebeerst Benjamin Debeerst
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: