You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/10/25 13:57:53 UTC

[GitHub] [dubbo] saleson opened a new issue, #10827: dubbo protocol: provider 侧没有及时释放FutureContext.future引起的OOM

saleson opened a new issue, #10827:
URL: https://github.com/apache/dubbo/issues/10827

   原issue: https://github.com/apache/dubbo/issues/7271
   
   
   ### Environment
   
   * Dubbo version: 3.0.11
   * Java version: 11
   
   ### Steps to reproduce this issue
   
   1、使用dubbo protocol
   2、provider侧返回大对象(20M)
   3、循环调用150次左右,出现OOM
   
   Pls. provide [GitHub address] to reproduce this issue.
   
   原因是由于AsyncRpcResult.whenCompleteWithContext()方法中将responseFuturema赋值给FutureContext.future,而FutureContext使用InternalThreadLocal放在ThreadLocal中,没有被及时释放, 导致其中引入的Result和Invocation对象无法被GC回收,出现OOM。
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on issue #10827: dubbo protocol: provider 侧没有及时释放FutureContext.future引起的OOM

Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on issue #10827:
URL: https://github.com/apache/dubbo/issues/10827#issuecomment-1291409395

   See #9560
   
   Use `-Dfuture.sync.set` to prevent set future context.
   
   FutureContext is set when invocation finished. Using to return data to users. In thus, Dubbo have no chance to remove it. Because there is impossible for Dubbo to know when users no longer to use it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] chickenlj closed issue #10827: dubbo protocol: provider 侧没有及时释放FutureContext.future引起的OOM

Posted by GitBox <gi...@apache.org>.
chickenlj closed issue #10827: dubbo protocol: provider 侧没有及时释放FutureContext.future引起的OOM
URL: https://github.com/apache/dubbo/issues/10827


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] dubbo protocol: provider 侧没有及时释放FutureContext.future引起的OOM [dubbo]

Posted by "Tiki-77 (via GitHub)" <gi...@apache.org>.
Tiki-77 commented on issue #10827:
URL: https://github.com/apache/dubbo/issues/10827#issuecomment-2566068460

   > 理论上来说,如果线程被不同的调用重用,则返回值会被持续覆盖,并不会一直增长下去。
   
   我也遇到了这个问题,因为FutureContext没有被及时回收,导致它及它引用的对象没有在年轻代被gc出去,被晋升到了老年代,导致老年代内存持续增长


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] xlq20080808 commented on issue #10827: dubbo protocol: provider 侧没有及时释放FutureContext.future引起的OOM

Posted by "xlq20080808 (via GitHub)" <gi...@apache.org>.
xlq20080808 commented on issue #10827:
URL: https://github.com/apache/dubbo/issues/10827#issuecomment-1579853122

   dubbo版本3.0.12,也遇到了类似的问题,provider的同步请求返回报文过大,存放在FutureContext中没有及时释放,会出现频繁GC的情况。在#9560 中找到了两个配置future.sync.set / future.clear.once,有两个问题想请教下
   1、设置future.sync.set=false   future.clear.once=true 理论上是否能解决这个问题
   2、future.sync.set参数的默认值仍然是true,是出于什么考量呢,设置成false是会带来什么其他的影响吗
   期待大佬解答~


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] chickenlj commented on issue #10827: dubbo protocol: provider 侧没有及时释放FutureContext.future引起的OOM

Posted by GitBox <gi...@apache.org>.
chickenlj commented on issue #10827:
URL: https://github.com/apache/dubbo/issues/10827#issuecomment-1311183389

   理论上来说,如果线程被不同的调用重用,则返回值会被持续覆盖,并不会一直增长下去。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org