Uploaded image for project: 'River (Retired)'
  1. River (Retired)
  2. RIVER-220

LookupLocatorDiscovery catch Throwable blocks should also catch Throwable

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • jtsk_2.1
    • River_2.1.2
    • net_jini_discovery
    • None
    • 6306579

    Description

      Bugtraq ID 6306579

      LD and LLD each have one place where they catch Throwable and log the exception. To guard against possible failures in logging, the logging should itself be done in a try block with a catch and do-nothing of Throwable.

      Evaluation

      It does not appear that this is really required in the case of LookupDiscovery. The specific case is in the UnicastDiscoveryTask, where discovery fails. However even if logging fails, the finally block takes care of doing the appropriate cleanup (TaskManager will attempt to log the logging exception itself, which seems undesireable, but should otherwise cause no other adverse effects).

      In the case of LookupLocatorDiscovery, the failure in the LocatorReg.tryGetProxy logging, would ultimately cause the DiscoveryTask for that registrar to terminate - leaving the registrar in an 'undiscovered' state, but having no future task scheduled to attempt to discover it. This is an inconsistent state of affairs and will lead to future discard, addLocators, setLocators for this specific registrar to essentially be ignored. Seems worthwile to protect LookupLocatorDiscovery in this case.

      Attachments

        Activity

          People

            vinodjohnson Thomas Vinod Johnson
            rscheifler Robert Scheifler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: