Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-7141

blueprint property-placeholder randomly fails (race conditions)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • fuse-6.x-GA
    • jboss-fuse-6.3
    • Fabric8 v1
    • None
    • % %

      With Fuse 6.3 R1, R2 and R3 we observe random failures of blueprint property-placeholder. The same blueprint contexts sometimes start properly but sometimes there is no placeholder
      substitution. The failure quote is about 30% for our production environment.

      1) Observations during container start

      In some cases, the failures are visible immediately after container start. Assume a very simple fabric profile

      • with configuration PID "test.properties" containing prop1=12345
      • with a set of blueprint bundles using placeholders to access the "prop1" from PID "test", e.g.:
          <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" … >
            <cm:property-placeholder persistent-id="test"/>
            <bean id="dummyPropertyConsumer" class="java.lang.Integer">
              <argument type="java.lang.String" value="${prop1}" />
            </bean>
          </blueprint>
        

        In more than 30% of container starts, the "${prop1}" is not substituted with "12345". As the result, we can observe exceptions in the logs:

          java.lang.NumberFormatException: For input string: "${prop1}"
          at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
          at java.lang.Integer.parseInt(Integer.java:569)
          at java.lang.Integer.(Integer.java:867)
        

      2) Silent and random corruption of application configuration

      In many other cases, the placeholder substitution failures remain undetected for many days in our system, e.g. if the particular bean property was of type String and didn't cause any type conversion exceptions during container start.

      3) Reproducer

      Please find attached a minimal reproducer of the issue.

      Please follow instructions in README.TXT in order to

      • create several dummy bundles with Maven, all containing the same blueprint.xml as above,
      • create fabric profile containing a list of dummy bundles and Configuration Admin PID,
      • create a set of child containers, all assigned to the same profile,
      • observe exceptions in the log after every re-start of the container group.

              ggrzybek Grzegorz Grzybek
              rhn-support-qluo Joe Luo
              Votes:
              1 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated:
                Resolved: