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

WriteFuture.awaitUninterruptibly() or .join() hangs if write() throws Exceptions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.10, 1.1.7, 2.0.0-M3
    • 2.0.0-RC1
    • Core
    • None

    Description

      This is best shown with UDP since TCP will cause a close session to occur.

      If channel.write() throws an exception, e.g. the host becomes unreachable because of network connection is removed, then WriteFuture.awaitUninterruptibly() will hang - as it will never have setWritten(false) or setException() called.

      I have modified the MemoryMonitor example to show this happening.
      You must manually pull your network cable (or disable your Network Adapter) while the client is running to see this happen.

      Attachments

        1. mina-2.0-memory_monitor.txt
          4 kB
          Barrie Treloar
        2. mina-2.0-memory_monitor-withExceptionNotifier.txt
          8 kB
          Barrie Treloar
        3. mina-2.0-handle-write-exceptions.txt
          1 kB
          Barrie Treloar
        4. mina-2.0-handle-write-exceptions-test.txt
          9 kB
          Barrie Treloar
        5. mina-1.1-handle-write-exceptions-with-test.txt
          11 kB
          Barrie Treloar

        Activity

          People

            ted_kods Edouard De Oliveira
            barrie Barrie Treloar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: