You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrea Cosentino (Jira)" <ji...@apache.org> on 2019/11/11 13:26:00 UTC

[jira] [Commented] (CAMEL-14166) Netty is reporting a resource leak

    [ https://issues.apache.org/jira/browse/CAMEL-14166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16971526#comment-16971526 ] 

Andrea Cosentino commented on CAMEL-14166:
------------------------------------------

Fixed on RC3.

 

[https://github.com/apache/camel/commit/ae2719732eb4867ecdb182e969e02a301bddc9f3#diff-e6e9f7220479f25103b607fae7cc9b28]

> Netty is reporting a resource leak
> ----------------------------------
>
>                 Key: CAMEL-14166
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14166
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-netty-http
>    Affects Versions: 3.0.0.RC2
>         Environment: Java 1.8, MacOS Mojave 10.14.6
>            Reporter: Mark Grand
>            Priority: Major
>             Fix For: 3.0.0.RC3
>
>
> I am seeing this stack trace:
> {{[Camel (camel-1) thread #7 - NettyEventExecutorGroup|#7 - NettyEventExecutorGroup] ERROR io.netty.util.ResourceLeakDetector - LEAK: ByteBuf.release() was not called before it's garbage-collected. See [https://netty.io/wiki/reference-counted-objects.html] for more information.[Camel (camel-1) thread #7 - NettyEventExecutorGroup|#7 - NettyEventExecutorGroup] ERROR io.netty.util.ResourceLeakDetector - LEAK: ByteBuf.release() was not called before it's garbage-collected. See [https://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.directBuffer(AbstractByteBufAllocator.java:178) io.netty.buffer.CompositeByteBuf.allocBuffer(CompositeByteBuf.java:1835) io.netty.buffer.CompositeByteBuf.copy(CompositeByteBuf.java:1487) io.netty.buffer.AbstractByteBuf.copy(AbstractByteBuf.java:1209) org.apache.camel.component.netty.http.NettyChannelBufferStreamCache.copy(NettyChannelBufferStreamCache.java:93) org.apache.camel.processor.MulticastProcessor.createProcessorExchangePairs(MulticastProcessor.java:620) org.apache.camel.processor.MulticastProcessor.process(MulticastProcessor.java:221) org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:228) org.apache.camel.processor.Pipeline.doProcess(Pipeline.java:103) org.apache.camel.processor.Pipeline.lambda$null$2(Pipeline.java:104) org.apache.camel.impl.engine.DefaultReactiveExecutor$3.run(DefaultReactiveExecutor.java:116) org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:185) org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:59) org.apache.camel.processor.Pipeline.process(Pipeline.java:87) org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:228) org.apache.camel.component.netty.handlers.ServerChannelHandler.processAsynchronously(ServerChannelHandler.java:141) org.apache.camel.component.netty.handlers.ServerChannelHandler.channelRead0(ServerChannelHandler.java:112) org.apache.camel.component.netty.http.handlers.HttpServerChannelHandler.channelRead0(HttpServerChannelHandler.java:202) io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) org.apache.camel.component.netty.http.handlers.HttpServerMultiplexChannelHandler.channelRead0(HttpServerMultiplexChannelHandler.java:156) io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:56) io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:365) io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66) io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1044) io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) java.base/java.lang.Thread.run(Thread.java:834)}}
>  
>  Here is the rest configuration:
> {{restConfiguration()}}
> {{ .component("netty-http")}}
> {{ .host("0.0.0.0").port(config.getUiaPortNumber())}}
> {{ .bindingMode(RestBindingMode.off)}}
> {{ .apiContextPath("api-doc")}}
> {{ .apiProperty("api.title", "Unified Item API")}}
> {{ .apiProperty("api.version", "0.1.0")}}
> {{ .apiProperty("api.description",}}
> {{ "This API allows callers to get information from multiple sources by sending just one request."}}
> {{ + " A single response is returned that contains all of the requested information in a single JSON object.\n\n"}}
> {{ + "Currently supported sources include\n"}}
> {{ + "* " + PRODUCT_API_HD_CATALOG_HOST + "\n"}}
> {{ + "* " + PRICING_API_HOST + "\n"}}
> {{ + "* " + ASSORTMENT_COMMONS_HOST)}}
> {{ .apiProperty("api.contact.name", "Mark Grand")}}
> {{ .apiProperty("api.contact.email", "mark_grand@homedepot.com")}}
> {{ .apiProperty("api.specification.contentType.json", APPLICATION_JSON)}}
> {{ .scheme("http")}}
> Here is rest endpoint configuration:
> {{rest().path("/uia").bindingMode(RestBindingMode.off)}}
> {{ .get("/admin/health").produces("text/plain")}}
> {{ .description("This returns a static \"Hello world!\\n\" response. It is intended to be used as a health check.")}}
> {{ .to("bean:helloBean")}}
> {{ .responseMessage().code(200).message("Hello world!").endResponseMessage()}}
> {{;}}{{}}
>  
> rest().path("/uia/api/v1").bindingMode(RestBindingMode.off).produces(APPLICATION_JSON)
>  .post("/authorization").consumes("text/plain").type(String.class).produces("text/plain")
>  .description("This should be a client's first request to this API. "
>  + "The request includes the client's credentials for accessing the aggregated services. "
>  + "The response is a JWT that contains the client's credentials.")
>  .param().name(JwtConstants.PRICING_TOKEN_TAG)
>  .type(RestParamType.header)
>  .dataType("string")
>  .required(false)
>  .description("The OAuth2 token to be used for accessing pricing information. This will be included in the JWT returned by this operation.")
>  .endParam()
>  .param().name(JwtConstants.SERVICE_ACCT_TAG)
>  .type(RestParamType.header)
>  .dataType("string")
>  .required(true)
>  .description("This is a service account that identifies the client.")
>  .endParam()
>  .to(DIRECT_AUTHORIZATION)
>  .responseMessage().code(200)
>  .example("credentialJwt", "eyJhbGciOiJub25lIn0.eyJpc3MiOiJ1bmlmaWVkLWl0ZW0tYXBpIiwiWC1wcmljaW5nLXRva2VuIjoiZXlKcmFXUWlPaUl4SWl3aWRIbHdJam9pU2xkVUlpd2lZV3huSWpvaVVsTXlOVFlpZlEuZXlKaFkyTmxjM05mZEc5clpXNGlPaUpVYm05cE1XeEpaVGxIU2xocGJuSnlhMkV4ZHpkelJrdGxUWFkzSWl3aVlYVmtJam9pYldsamNtOW5ZWFJsZDJGNUlpd2lZWEJwWDNCeWIyUjFZM1JmYkdsemRDSTZXeUpTWlhSaGFXd2dSRzl0WVdsdUlGTmxjblpwWTJVZ0xTQk9iMjRnVUhKdlpDSmRMQ0poY0hCc2FXTmhkR2x2Ymw5dVlXMWxJam9pVWtSVElDMGdSVkFnTFNCT2IyNHRVSEp2WkNJc0ltNWlaaUk2TVRVM01ESXdNRFExTXl3aVpHVjJaV3h2Y0dWeVgyVnRZV2xzSWpvaVpXNTBaWEp3Y21selpYQnlhV05wYm1kQWFHOXRaV1JsY0c5MExtTnZiU0lzSW1semN5STZJbWgwZEhBNlhDOWNMMmh2YldWa1pYQnZkQzF3Y21samFXNW5MV1JsZGk1aGNHbG5aV1V1Ym1WMFhDOWxaR2RsYldsamNtOHRZWFYwYUZ3dmRHOXJaVzRpTENKbGVIQWlPakUxTnpBeU1ESXlOVE1zSW1saGRDSTZNVFUzTURJd01EUTFNeXdpWTJ4cFpXNTBYMmxrSWpvaWRHNDBlalJXTTNKV1JWVktRbHBvUm1kUFVVTk1hVWRRZUdKbWQwazBURzRpTENKcWRHa2lPaUkwWm1aak9EVmxOUzFoTnpFNExUUmlaamt0T0dFek5pMHdZek0xWlRBNE9HRmlNbVlpZlEuR3IzSEdNRl9sUk44eF9qM01YbXRMMHRJWGxCeWZxUEpLVWFuX3hYSF80aHB6Q0Q4eDJJSnQyV1gtR3N3Zm1ZT0pWUm8zMDFyWmZBUDBRdTVkUS12TzM0VDVLcDhmX2txZmpkeFRCM1ZtbUdtQ3p2SlN6eEVDbmVqZU56SG5NTk9BUTAzTVRRX3FnYXB0d0taWjNDTjVwLVU1YXdYN2Rya2NiWldsV0lpS0dmTmNVaFhFZjc5bHpJMnVXbXV2TjgxN3lIMDdXUU16cEJteGh5TFpMdUQ3ZW5CRktvMmwwcnNJYXlORnJqbU5ycl9GTWxCMlVMRkRxcUd4UGpmcDJ2N184TlJ6ZS1hcjIzZUlPelpWdGo3YkRBOW5uQzNoWS1jNk8zckpXRXR6ZzVzT3VqUExNZTFYLS1QNXg1NzhmajZ2R3U0WnFGXzFaNDgwVTZWVFpld1B3Iiwic3ZjQWNjdCI6InBsYWNlaG9sZGVyIGZvciBhIHNlcnZpY2UgYWNjb3VudCJ9.")
>  .message("An encoded JWT whose payload contains the service account and credentials provided by the client. "
>  + "This JWT will be needed to authorize requests to other endpoints")
>  .responseModel(String.class)
>  .endResponseMessage()
>  .responseMessage().code(400).message("Bad Request").endResponseMessage()
>  .get("/raw?skus=\{skus}&stores=\{stores}")
>  .description("Queries `" + PRODUCT_API_HD_CATALOG_HOST + "`, `" + PRICING_API_HOST + "` and `"
>  + ASSORTMENT_COMMONS_HOST + "` for data about combinations of the given stores and SKUs. "
>  + "The data from the individual services is returned as-is, without being combined.")
>  .param().name(JwtConstants.SKUS_ITAG).description("A comma-separated list of SKUS").required(true).type(RestParamType.header).endParam()
>  .param().name(JwtConstants.STORES_ITAG).description("A comma-separated list of stores").required(true).type(RestParamType.header).endParam()
>  .clientRequestValidation(true)
>  .responseMessage().code(200)
>  .message("Returns a JSON object whose fields have the values returned by the queried services and "
>  + "also the status codes returned by the queried services.")
>  .example("success", RAW_RESULT_EXAMPLE)
>  .endResponseMessage()
>  .responseMessage().code(400).message("Bad Request").endResponseMessage()
>  .to(DIRECT_RAW)
>  .get("/skus-stores?skus=\{skus}&stores=\{stores}")
>  .description("Queries `" + PRODUCT_API_HD_CATALOG_HOST + "`, `" + PRICING_API_HOST + "` and `"
>  + ASSORTMENT_COMMONS_HOST + "` for data about combinations of the given stores and SKUs. "
>  + "Data from the individual services is reorganized into JSON objects that each refer to a single store-SKU combination.")
>  .param().name(JwtConstants.SKUS_ITAG).description("A comma-separated list of SKUS").required(true).type(RestParamType.header).endParam()
>  .param().name(JwtConstants.STORES_ITAG).description("A comma-separated list of stores").required(true).type(RestParamType.header).endParam()
>  .clientRequestValidation(true)
>  .responseMessage().code(200)
>  .message("Returns a JSON object whose fields describe the request and result. "
>  + "One field is an array of JSON objects that each describe a different store-sku combination")
>  .example("success", SKU_STORE_RESULT_EXAMPLE)
>  .endResponseMessage()
>  .responseMessage().code(400).message("Bad Request").endResponseMessage()
>  .to(DIRECT_SKU_STORES)
> ;



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