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

APR transport on FreeBSD throwing Exceptions

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Abandoned
    • Affects Version/s: 2.0.0-M3
    • Fix Version/s: 2.0.14
    • Component/s: Transport
    • Labels:
      None
    • Environment:
      FreeBSD 7.1, JDK 1.6, APR 1.3.3, Tomcat Native APR 1.1.16, Tomcat 5.5.27

      Description

      When running our MINA-based application on the specified configuration, we see the following errors in our logs and the application does not properly service network requests:

      2009-04-07 09:42:15,020 [AprIoProcessor-33] ERROR <removed> - Unexpected Exception:
      java.io.IOException: Unknown error: -70015 (code: 70015)
      at org.apache.mina.transport.socket.apr.AprIoProcessor.throwException(AprIoProcessor.java:408)
      at org.apache.mina.transport.socket.apr.AprIoProcessor.setInterestedInWrite(AprIoProcessor.java:318)
      at org.apache.mina.transport.socket.apr.AprIoProcessor.setInterestedInWrite(AprIoProcessor.java:1)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.flushNow(AbstractPollingIoProcessor.java:692)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.flush(AbstractPollingIoProcessor.java:621)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$8(AbstractPollingIoProcessor.java:608)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor$Worker.run(AbstractPollingIoProcessor.java:861)
      at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java.lang.Thread.run(Thread.java:619)
      2009-04-07 09:42:15,119 [AprIoProcessor-33] ERROR <removed> onException called: originUrl= <removed> notifiedOfResponse= false session= 448974723
      2009-04-07 09:42:15,123 [AprIoProcessor-33] ERROR <removed> - Exception thrown from downloader
      <removed>.DownloadException: An exception occurred while attempting to download <removed>
      at <removed>
      at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.exceptionCaught(DefaultIoFilterChain.java:733)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextExceptionCaught(DefaultIoFilterChain.java:455)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$4(DefaultIoFilterChain.java:449)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.exceptionCaught(DefaultIoFilterChain.java:827)
      at org.apache.mina.core.filterchain.IoFilterAdapter.exceptionCaught(IoFilterAdapter.java:80)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextExceptionCaught(DefaultIoFilterChain.java:455)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$4(DefaultIoFilterChain.java:449)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.exceptionCaught(DefaultIoFilterChain.java:827)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain$HeadFilter.exceptionCaught(DefaultIoFilterChain.java:610)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextExceptionCaught(DefaultIoFilterChain.java:455)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireExceptionCaught(DefaultIoFilterChain.java:446)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.flushNow(AbstractPollingIoProcessor.java:728)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.flush(AbstractPollingIoProcessor.java:621)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$8(AbstractPollingIoProcessor.java:608)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor$Worker.run(AbstractPollingIoProcessor.java:861)
      at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.io.IOException: Unknown error: -70015 (code: 70015)
      at org.apache.mina.transport.socket.apr.AprIoProcessor.throwException(AprIoProcessor.java:408)
      at org.apache.mina.transport.socket.apr.AprIoProcessor.setInterestedInWrite(AprIoProcessor.java:318)
      at org.apache.mina.transport.socket.apr.AprIoProcessor.setInterestedInWrite(AprIoProcessor.java:1)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.flushNow(AbstractPollingIoProcessor.java:692)
      ... 7 more
      2009-04-07 09:42:15,228 [AprIoProcessor-33] ERROR <removed> - Unexpected Exception:
      org.apache.mina.core.write.WriteToClosedSessionException
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.clearWriteRequestQueue(AbstractPollingIoProcessor.java:521)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.removeNow(AbstractPollingIoProcessor.java:476)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.remove(AbstractPollingIoProcessor.java:455)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$9(AbstractPollingIoProcessor.java:443)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor$Worker.run(AbstractPollingIoProcessor.java:862)
      at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java.lang.Thread.run(Thread.java:619)
      2009-04-07 09:42:15,229 [AprIoProcessor-33] ERROR <removed> - Unexpected Exception:
      java.io.IOException: Unknown error: -70015 (code: 70015)
      at org.apache.mina.transport.socket.apr.AprIoProcessor.throwException(AprIoProcessor.java:408)
      at org.apache.mina.transport.socket.apr.AprIoProcessor.destroy(AprIoProcessor.java:240)
      at org.apache.mina.transport.socket.apr.AprIoProcessor.destroy(AprIoProcessor.java:1)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.removeNow(AbstractPollingIoProcessor.java:479)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.remove(AbstractPollingIoProcessor.java:455)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$9(AbstractPollingIoProcessor.java:443)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor$Worker.run(AbstractPollingIoProcessor.java:862)
      at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java.lang.Thread.run(Thread.java:619)

      The error code -70015 corresponds to APR_NOTFOUND. I've also tracked it down into the APR code, and it looks like the problem comes from the kevent syscall returning ENOENT when MINA is doing the Poll.remove() call.

      I should note that the same code functions "normally" on Linux using the APR Transport, so I'm not sure if the problem is MINA's use of APR or APR's use of kqueue/kevent on FreeBSD.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              acbatwork Adam Brown
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: