Uploaded image for project: 'Apache PLC4X'
  1. Apache PLC4X
  2. PLC4X-205

Incorrect shutdown sequence on error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Core
    • None

    Description

      In the testcase below, there is a permission problem and I think because of that the closing of channel and buffers are out of order/state.

      [code]
      11:59:51.855 [pool-1-thread-1] WARN i.n.c.AbstractChannelHandlerContext - Failed to mark a promise as failure because it has succeeded already: DefaultChannelPromise@63ab80ee(success)
      java.lang.IllegalStateException: close() must be invoked after the channel is closed.
      at io.netty.channel.ChannelOutboundBuffer.close(ChannelOutboundBuffer.java:683)
      at io.netty.channel.ChannelOutboundBuffer.close(ChannelOutboundBuffer.java:711)
      at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:741)
      at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:607)
      at io.netty.channel.DefaultChannelPipeline$HeadContext.close(DefaultChannelPipeline.java:1352)
      at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:622)
      at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:606)
      at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:472)
      at io.netty.channel.DefaultChannelPipeline.close(DefaultChannelPipeline.java:957)
      at io.netty.channel.AbstractChannel.close(AbstractChannel.java:232)
      at io.netty.channel.ChannelFutureListener$2.operationComplete(ChannelFutureListener.java:56)
      at io.netty.channel.ChannelFutureListener$2.operationComplete(ChannelFutureListener.java:52)
      at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:577)
      at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:551)
      at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:490)
      at io.netty.util.concurrent.DefaultPromise.addListener(DefaultPromise.java:183)
      at io.netty.channel.DefaultChannelPromise.addListener(DefaultChannelPromise.java:95)
      at io.netty.bootstrap.Bootstrap$3.run(Bootstrap.java:248)
      at io.netty.channel.ThreadPerChannelEventLoop.run(ThreadPerChannelEventLoop.java:69)
      at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
      at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
      at java.lang.Thread.run(Thread.java:748)
      [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.26 s <<< FAILURE! - in org.apache.plc4x.java.utils.rawsockets.netty.RawSocketChannelTest
      [ERROR] doConnect Time elapsed: 2.478 s <<< ERROR!
      org.pcap4j.core.PcapNativeException: lo: You don't have permission to capture on that device (socket: Operation not permitted)
      [code]

      Attachments

        Activity

          People

            Unassigned Unassigned
            niclas Niclas Hedhman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: