Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-1012

SSLFilter does not work in combination with ExecutorFilter

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 2.0.9
    • Fix Version/s: None
    • Component/s: Filter, SSL
    • Labels:
      None
    • Environment:
      Windows 7 x32
      Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
      Java HotSpot(TM) Client VM (build 25.45-b02, mixed mode, sharing)
    • Flags:
      Important

      Description

      If i include SslFilter after the ExecutorFilter in acceptor filter chain, than SslFilter works unstable. It works sometimes and sometimes it doesn't work. It is likely because of multithreaded environment.
      If I move it on top of the filter chain, it works fine.
      Here is buggy filter chain:

              final IoAcceptor acceptor = new NioSocketAcceptor(executor/*Some outer thread pool*/, new NioProcessor(ioProcessorExecutor/*thread pool with only one thread (nio events waiter)*/));
              acceptor.getFilterChain().addLast("executor", new ExecutorFilter(executor, IoEventType.EXCEPTION_CAUGHT,
                      IoEventType.MESSAGE_RECEIVED, IoEventType.MESSAGE_SENT, IoEventType.SESSION_CLOSED));
              acceptor.getFilterChain().addLast("encryption", sslFilter);
              acceptor.getFilterChain().addLast("platypusCodec", new ProtocolCodecFilter(new ResponseEncoder(), new RequestDecoder()));
              PlatypusRequestsHandler handler = new PlatypusRequestsHandler(this);
              acceptor.setHandler(handler);
      

      I think that SslFilter have to work properly in multithreaded environment, but it doesn't.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mgainullin Marat Gainullin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: