glassfish
  1. glassfish
  2. GLASSFISH-2117

thread-unsafe code in com.sun.enterprise.server.logging.ServerLogManager

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 9.1pe
    • Fix Version/s: not determined
    • Component/s: logging
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      2,117

      Description

      The variables 'customHandler' and 'customFilter' are not synchronized or volatile, leading to visibility
      and/or race condition issues. With both of them being used, any synchronization has to surround the
      paired usage:

      private static Handler customHandler = null;
      private static Filter customFilter = null;
      ....

      private static Filter getCustomFilter( ) {
      if(( customFilter != null )

      ( customFilterError ) ) { return customFilter; }

      LogService logService = getLogService( );
      if( logService == null )

      { return null; }

      String customFilterClassName = null;
      try

      { customFilterClassName = logService.getLogFilter( ); customFilter = (Filter) getInstance( customFilterClassName ); }

      catch( Exception e )

      { customFilterError = true; new ErrorManager().error( "Error In Instantiating Custom Filter " + customFilterClassName, e, ErrorManager.GENERIC_FAILURE ); }

      return customFilter;
      }

        Activity

          People

          • Assignee:
            jielin
            Reporter:
            llc
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: