Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-4949

java.nio.channels.ClosedChannelException with slower devices and NIO journal

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.35.0
    • 2.36.0
    • None
    • None

    Description

      It is possible to get the following exception, with NIO and on a NFS file system.

      java.nio.channels.ClosedChannelException: null
      	at java.base/sun.nio.ch.FileChannelImpl.ensureOpen(FileChannelImpl.java:159) ~[?:?]
      	at java.base/sun.nio.ch.FileChannelImpl.force(FileChannelImpl.java:459) ~[?:?]
      	at org.apache.activemq.artemis.core.io.nio.NIOSequentialFile.syncChannel(NIOSequentialFile.java:340) ~[classes/:?]
      	at org.apache.activemq.artemis.tests.unit.core.journal.impl.TimedBufferTest$3$1.syncChannel(TimedBufferTest.java:238) ~[test-classes/:?]
      	at org.apache.activemq.artemis.core.io.nio.NIOSequentialFile.sync(NIOSequentialFile.java:323) ~[classes/:?]
      	at org.apache.activemq.artemis.core.io.AbstractSequentialFile$LocalBufferObserver.checkSync(AbstractSequentialFile.java:304) [classes/:?]
      	at org.apache.activemq.artemis.core.io.buffer.TimedBuffer.flushBatch(TimedBuffer.java:362) [classes/:?]
      	at org.apache.activemq.artemis.core.io.buffer.TimedBuffer$CheckTimer.run(TimedBuffer.java:466) [classes/:?]
      	at java.base/java.lang.Thread.run(Thread.java:833) [?:?
      

      although I can see in the code inspection this could happen on a local file system as well, but I could not reproduce this easily on a local file system. (although it seems possible).

      Attachments

        Issue Links

          Activity

            People

              clebertsuconic Clebert Suconic
              clebertsuconic Clebert Suconic
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h