You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When starting vttablet, we create a *topo.Serverwe have a defer to close this server but we also close the server when we return errors here and here. Which means we call ts.Close() twice, now if we look at the content of that function as seen below, we can see we call a method on both globalCell and globalReadOnlyCell which are set to nil soon after. Obviously this does not play out well when we call ts.Close() twice.
I can track down the apparition of the issue to #15928, in this PR we are changing the code from closing the *topo.Server in a servenv.OnClose(func() {}) function, to closing now it in a defer.
Reproduction Steps
This issue can be reproduced by running the upgrade test of vitess-operator locally, the Vitess image must be one that was built before this issue gets fixed.
Overview of the Issue
When starting
vttablet
, we create a*topo.Server
we have a defer to close this server but we also close the server when we return errors here and here. Which means we callts.Close()
twice, now if we look at the content of that function as seen below, we can see we call a method on bothglobalCell
andglobalReadOnlyCell
which are set tonil
soon after. Obviously this does not play out well when we callts.Close()
twice.vitess/go/vt/topo/server.go
Lines 345 to 358 in 16b05c1
This issue can lead to the following panic, which was first observed in an upgrade-test of the vitess-operator:
I can track down the apparition of the issue to #15928, in this PR we are changing the code from closing the
*topo.Server
in aservenv.OnClose(func() {})
function, to closing now it in adefer
.Reproduction Steps
This issue can be reproduced by running the
upgrade
test of vitess-operator locally, the Vitess image must be one that was built before this issue gets fixed.Binary Version
>= v21.0.0-rc1
Operating System and Environment details
Log Fragments
No response
The text was updated successfully, but these errors were encountered: