Uploaded image for project: 'EJB Client Library (AS7+)'
  1. EJB Client Library (AS7+)
  2. EJBCLIENT-408

Racecondition in RemotingEJBDiscoveryProvider is causing a NullPointerException

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 4.0.41.Final
    • None

    Description

      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     }
      

      Attachments

        Issue Links

          Activity

            People

              rhn-support-jbaesner Joerg Baesner
              rhn-support-jbaesner Joerg Baesner
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: