1 Reply Latest reply on May 7, 2009 4:51 AM by timfox

    ClientSessionFactoryImpl eventually NPE under multi-thread l

    clebert.suconic

      just saw this failure:

      http://hudson.qa.jboss.com/hudson/job/JBM2-stress/lastBuild/testReport/org.jboss.messaging.tests.stress.remote/PingStressTest/testMultiThreadOpenAndCloses/

      java.lang.Exception: Test Failed
       at org.jboss.messaging.tests.stress.remote.PingStressTest.internalTest(PingStressTest.java:227)
       at org.jboss.messaging.tests.stress.remote.PingStressTest.testMultiThreadOpenAndCloses(PingStressTest.java:101)
      Caused by: java.lang.NullPointerException
       at org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:915)
       at org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:715)
       at org.jboss.messaging.tests.stress.remote.PingStressTest$1LocalThread.run(PingStressTest.java:184)
      


      connectionManagerArray is set outside of the synchornized block, while (ClientSessionFactoryImpl.java:915) is inside a synchronized block.

      I've tried to write a multi-thread test. and I didn't have any success. I will spend more time on it tomorrow.

      Maybe connectionManagerArray and readOnly attributes should be volatile?