You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2021/01/09 19:41:27 UTC

[GitHub] [incubator-brpc] lorinlee commented on issue #1188: bthread::id_create_impl的coredump

lorinlee commented on issue #1188:
URL: https://github.com/apache/incubator-brpc/issues/1188#issuecomment-757357095


   #1325 猜测是ResourcePool返回了一个超过65535的id,原因是看ResourcePool的逻辑是65536个group * 65536个Block * 256个元素,其容量远大于2^32。而bthread_id_t的计算方式是 resource_id << 32 | version,那么resource_id == 0 和 resource_id = 65536生成的bthread_id_t的值是一样的,这俩id在return_resource的时候会把resource_id == 0的元素return两遍,后续get_resouce就会有问题。 #1179 这个也有可能是这个原因,不过1179看起来不光是TimerTask相同,而且还连在一起了,概率感觉比较低,还没有想明白
   
   这个issue另外一个问题是butex是nullptr,感觉可能是创建的时候就失败了,之前没有check,这个PR加了个check,#1326  
   
   @jamesge @acelyc111 辛苦帮忙review下看我的猜测是否合理哈,感谢
   
   


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org