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

MINA: Exception thrown at the client side - ProtocolDecoderException:BufferDataException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 2.0.19
    • None
    • Handler
    • None

    Description

      Mina version:

      mina-core-2.0.19.jar

      Server code snippet:
              IoAcceptor acceptor = new NioSocketAcceptor();
              DefaultIoFilterChainBuilder chain = acceptor.getFilterChain();

              LoggingFilter loggingFilter = new LoggingFilter();
              loggingFilter.setMessageSentLogLevel(LogLevel.DEBUG);
              loggingFilter.setMessageReceivedLogLevel(LogLevel.DEBUG);
              loggingFilter.setSessionClosedLogLevel(LogLevel.DEBUG);
              loggingFilter.setSessionCreatedLogLevel(LogLevel.DEBUG);
              loggingFilter.setSessionIdleLogLevel(LogLevel.DEBUG);
              loggingFilter.setSessionOpenedLogLevel(LogLevel.DEBUG);
              chain.addLast("logger", loggingFilter);

              MdcInjectionFilter mdcInjectionFilter = new MdcInjectionFilter();
              chain.addLast("mdc", mdcInjectionFilter);
              chain.addLast("codec", new ProtocolCodecFilter(new ObjectSerializationCodecFactory()));

      Client code snippet:
              NioSocketConnector connector = new NioSocketConnector();
              LoggingFilter LOGGING_FILTER = new LoggingFilter("MinaLogging");
              LOGGING_FILTER.setMessageSentLogLevel(LogLevel.DEBUG);
              LOGGING_FILTER.setMessageReceivedLogLevel(LogLevel.DEBUG);
              
              IoFilter CODEC_FILTER = new ProtocolCodecFilter(new ObjectSerializationCodecFactory());

              connector.getFilterChain().addLast("mdc", new MdcInjectionFilter());
              connector.getFilterChain().addLast("codec", CODEC_FILTER);
              connector.getFilterChain().addLast("logger", LOGGING_FILTER);

      Exception:
      org.apache.mina.filter.codec.ProtocolDecoderException: org.apache.mina.core.buffer.BufferDataException: dataLength: 1048985 (Hexdump: XX...)
      at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:262) [mina-core-2.0.19.jar:?]
      at org.apache.mina.filter.codec.CumulativeProtocolDecoder.decode(CumulativeProtocolDecoder.java:180) ~[mina-core-2.0.19.jar:?]
      at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:253) ~[mina-core-2.0.19.jar:?]

      Points:

      • There is no synchronization while writing...
      • There are multiple threads parallely wirting into the tcp connection (around 100-200)
      • The problem is observed only when the load is high...

      I have seen similar tickets here and not sure about the RCA.
      https://issues.apache.org/jira/browse/DIRMINA-653

      Need help...

      Attachments

        Activity

          People

            johnnyv Jonathan Valliere
            saravanan.s Saravanan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: