Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-22153

[GSS](7.3.z) EJBCLIENT-408 - Racecondition in RemotingEJBDiscoveryProvider is causing a NullPointerException

XMLWordPrintable

      A race condition in RemotingEJBDiscoveryProvider is causing a NullPointerException in line 126 during autoboxing the Long value.

      This can happen in the case that Thread A is executing line 123 with the containsKey and a return value of true, then Thread B is removing that entry from the Map, while Thread A is calling get in line 126, which will result in a return value of null, leading to a NullPointerException during autoboxing, see:

      122     private boolean haveNotExpiredFailedDestination(URI uri) {
      123         if(!failedDestinations.containsKey(uri))
      124             return false;
      125         else {
      126             long failureTimestamp = failedDestinations.get(uri);
      127             long delta = System.nanoTime() - failureTimestamp;
      128             return delta < DESTINATION_RECHECK_INTERVAL;
      129         }
      130     }
      

              tadamski@redhat.com Tomasz Adamski
              rhn-support-jbaesner Joerg Baesner
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: