[
https://issues.apache.org/jira/browse/ZOOKEEPER-5122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated ZOOKEEPER-5122:
--------------------------------------
Labels: pull-request-available (was: )
> (C client) xid counter is unnecessarily likely to wrap
> ------------------------------------------------------
>
> Key: ZOOKEEPER-5122
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-5122
> Project: ZooKeeper
> Issue Type: Bug
> Components: c client
> Reporter: Andrew Kyle Purtell
> Assignee: Andrew Kyle Purtell
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The C client allocates xids using a global signed integer initialized at
> process startup with {{{}time(0){}}}. This is unnecessary and today leaves
> only about 350 million xids before the wrap, so busy clients reach it in
> production. It then wraps into negative values, causing collisions with
> reserved negative IDs used by internal protocol frames. The client misroutes
> incoming server replies to internal protocol handlers rather than the
> application's completion callbacks. Depending on which reserved ID is hit,
> this desynchronizes the in-flight request queue, triggers false
> authentication failures ({{{}ZOO_AUTH_FAILED_STATE{}}}), or abruptly drops
> the connection with a {{ZRUNTIMEINCONSISTENCY}} error.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)