You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by "Sebastian Wiendl (Jira)" <ji...@apache.org> on 2019/11/14 09:16:00 UTC

[jira] [Created] (PLC4X-152) SCHWERWIEGEND: LEAK: ByteBuf.release() was not called before it's garbage-collected.

Sebastian Wiendl created PLC4X-152:
--------------------------------------

             Summary: SCHWERWIEGEND: LEAK: ByteBuf.release() was not called before it's garbage-collected.
                 Key: PLC4X-152
                 URL: https://issues.apache.org/jira/browse/PLC4X-152
             Project: Apache PLC4X
          Issue Type: Bug
         Environment: Siemens S7-1500 PLC
Windows 10 Notebook
PLC4J + S7 Driver 0.4.0
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) Client VM (build 25.231-b11, mixed mode)
            Reporter: Sebastian Wiendl


My PLC4J demo project at https://github.com/sewiendl/plc4j-demo yields the following output at roughly 10000 iterations of the for loop:{code}request i=9000 took PT0.002S
DInt response: OK; value: 3; data type: java.lang.Integer
Int response: OK; value: 2; data type: java.lang.Short
SinusReal response: OK; value: 2.2427056; data type: java.lang.Float

Nov 14, 2019 9:59:00 AM io.netty.util.ResourceLeakDetector reportTracedLeak
SCHWERWIEGEND: LEAK: ByteBuf.release() was not called before it's garbage-collected. See http://netty.io/wiki/reference-counted-objects.html for more information.
Recent access records: 
Created at:
	io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:349)
	io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:187)
	io.netty.buffer.AbstractByteBufAllocator.buffer(AbstractByteBufAllocator.java:123)
	io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:864)
	org.apache.plc4x.java.isoontcp.protocol.IsoOnTcpProtocol.decode(IsoOnTcpProtocol.java:100)
	io.netty.handler.codec.ByteToMessageCodec$1.decode(ByteToMessageCodec.java:42)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:502)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:441)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278)
	io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1408)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:682)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:617)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:534)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:906)
	io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	java.lang.Thread.run(Thread.java:748)
all requests took PT2M6.261S{code}There are no immediate effects, however a potential leak in a long running service should be looked into.




--
This message was sent by Atlassian Jira
(v8.3.4#803005)