Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netty: default grace time for RPCs can leak memory #5443

Merged
merged 2 commits into from
Mar 18, 2019
Merged

netty: default grace time for RPCs can leak memory #5443

merged 2 commits into from
Mar 18, 2019

Commits on Mar 7, 2019

  1. netty: default grace time for RPCs can leak memory

    Using Long.MAX_VALUE as the delay for Netty's NioEventLoop#schedule can
    cause (long) deadlines for scheduled tasks to wrap into negative values,
    which is unspecified behavior. Recent versions of netty are guarding
    against overflows, but not all versions of grpc-java are using a recent
    enough netty.
    
    When connections are gracefully closed, Netty's Http2ConnectionHandler
    sets up a timeout task forcing resources to be freed after a grace
    period. When their deadlines wrap into negative values, a race was
    observed in production systems (with grpc-java <= 1.12.1) causing Netty
    to never properly release buffers associated with active streams in the
    connection being (gracefully) closed.
    fabiokung committed Mar 7, 2019
    Configuration menu
    Copy the full SHA
    fe7e5e7 View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2019

  1. netty: revert to Long.MAX_VALUE for no timeout

    Keep it consistent with other timeout configurations.
    fabiokung committed Mar 8, 2019
    Configuration menu
    Copy the full SHA
    1cc0d27 View commit details
    Browse the repository at this point in the history