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 17:58:58 UTC

[GitHub] [incubator-brpc] lorinlee opened a new pull request #1325: butil/ResourcePool: add max items limit (uint32_max), to avoid id overflow

lorinlee opened a new pull request #1325:
URL: https://github.com/apache/incubator-brpc/pull/1325


   TimerTask or bthread uses butil::ResourcePool to allocate an id, and this id is usually combined with a version to build a versioned id, whose format is like this: [version(uint32_t)| resource_id(uint32) ]. However, the ResourcePool can allocate a resource_id large than UINT32_MAX, which makes the id overflowed and make the version wrong.
   
   Here is a log from our online service:  F1222 13:58:58.281154 2536404 timer_thread.cpp:302] Check failed: version.load(butil::memory_order_relaxed) == id_version + 2 (2 vs. 5)


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


[GitHub] [incubator-brpc] lorinlee closed pull request #1325: butil/ResourcePool: add max items limit (uint32_max), to avoid id overflow

Posted by GitBox <gi...@apache.org>.
lorinlee closed pull request #1325:
URL: https://github.com/apache/incubator-brpc/pull/1325


   


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


[GitHub] [incubator-brpc] lorinlee closed pull request #1325: butil/ResourcePool: add max items limit (uint32_max), to avoid id overflow

Posted by GitBox <gi...@apache.org>.
lorinlee closed pull request #1325:
URL: https://github.com/apache/incubator-brpc/pull/1325


   


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


[GitHub] [incubator-brpc] lorinlee closed pull request #1325: butil/ResourcePool: add max items limit (uint32_max), to avoid id overflow

Posted by GitBox <gi...@apache.org>.
lorinlee closed pull request #1325:
URL: https://github.com/apache/incubator-brpc/pull/1325






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


[GitHub] [incubator-brpc] lorinlee closed pull request #1325: butil/ResourcePool: add max items limit (uint32_max), to avoid id overflow

Posted by GitBox <gi...@apache.org>.
lorinlee closed pull request #1325:
URL: https://github.com/apache/incubator-brpc/pull/1325


   


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