Giter Club home page Giter Club logo

Comments (2)

98oi98 avatar 98oi98 commented on June 11, 2024

the same problem

[2018-10-23 17:31:47.436]-[192.168.1.231]-[ERROR]-[nioEventLoopGroup-2-1]-[io.netty.util.ResourceLeakDetector]-[12456]-[Slf4JLogger.java:171]-[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: #1: io.netty.buffer.AdvancedLeakAwareByteBuf.readByte(AdvancedLeakAwareByteBuf.java:400) org.freeswitch.esl.client.transport.message.EslFrameDecoder.readLine(EslFrameDecoder.java:184) org.freeswitch.esl.client.transport.message.EslFrameDecoder.decode(EslFrameDecoder.java:143) io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489) io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:367) io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265) io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434) io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965) io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645) io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580) io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497) io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886) io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) java.lang.Thread.run(Thread.java:748)#2: io.netty.buffer.AdvancedLeakAwareByteBuf.writeBytes(AdvancedLeakAwareByteBuf.java:604) io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:849) io.netty.buffer.WrappedByteBuf.readBytes(WrappedByteBuf.java:616) io.netty.buffer.AdvancedLeakAwareByteBuf.readBytes(AdvancedLeakAwareByteBuf.java:473) io.netty.handler.codec.ReplayingDecoderByteBuf.readBytes(ReplayingDecoderByteBuf.java:577) org.freeswitch.esl.client.transport.message.EslFrameDecoder.decode(EslFrameDecoder.java:139) io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489) io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:367) io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265) io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434) io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965) io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645) io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580) io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497) io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886) io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) java.lang.Thread.run(Thread.java:748)Created at: io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:331) io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:185) io.netty.buffer.AbstractByteBufAllocator.buffer(AbstractByteBufAllocator.java:121) io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:848) io.netty.buffer.WrappedByteBuf.readBytes(WrappedByteBuf.java:616) io.netty.buffer.AdvancedLeakAwareByteBuf.readBytes(AdvancedLeakAwareByteBuf.java:473) io.netty.handler.codec.ReplayingDecoderByteBuf.readBytes(ReplayingDecoderByteBuf.java:577) org.freeswitch.esl.client.transport.message.EslFrameDecoder.decode(EslFrameDecoder.java:139) io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489) io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:367) io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265) io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434) io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965) io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645) io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580) io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497) io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886) io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) java.lang.Thread.run(Thread.java:748): 44 leak records were discarded because they were duplicates: 44 leak records were discarded because the leak record count is targeted to 4. Use system property io.netty.leakDetection.targetRecords to increase the limit.]

from esl-client.

BadDeveloper2022 avatar BadDeveloper2022 commented on June 11, 2024

EslFrameDecoder.java

`

case READ_BODY:
/*
* read the content-length specified
*/
int contentLength = currentMessage.getContentLength();
ByteBuf bodyBytes = buffer.readBytes(contentLength);
// log.debug("read [{}] body bytes", bodyBytes.writerIndex());
// most bodies are line based, so split on LF
while (bodyBytes.isReadable()) {
String bodyLine = readLine(bodyBytes, contentLength);
// log.debug("read body line [{}]", bodyLine);
currentMessage.addBodyLine(bodyLine);

            }
            try {
                if (bodyBytes.refCnt() == 1) {
                    //  StaticLog.info("----------------------------------------");
                    bodyBytes.release();
                    bodyBytes = null;
                }
            } catch (Exception ex) {
                ex.printStackTrace();
            }`

from esl-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.