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

roachpb: v19.2.1: transaction unexpectedly finalized #42802

Closed
cockroach-teamcity opened this issue Nov 26, 2019 · 1 comment
Closed

roachpb: v19.2.1: transaction unexpectedly finalized #42802

cockroach-teamcity opened this issue Nov 26, 2019 · 1 comment
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-sentry Originated from an in-the-wild panic report.

Comments

@cockroach-teamcity
Copy link
Member

This issue was autofiled by Sentry. It represents a crash or reported error on a live cluster with telemetry enabled.

Sentry link: https://sentry.io/organizations/cockroach-labs/issues/1358597309/?referrer=webhooks_plugin

Panic message:

errors.go:244: transaction unexpectedly finalized in (%T): %v | *roachpb.TransactionRetryError; *roachpb.Error

Stacktrace (expand for inline code snippets):

}
e.checkTxnStatusValid()
}
in pkg/roachpb.(*Error).UpdateTxn
e.UnexposedTxn = nil
e.UpdateTxn(txn)
}
in pkg/roachpb.(*Error).SetTxn
e := NewError(err)
e.SetTxn(txn)
return e
in pkg/roachpb.NewErrorWithTxn
roachpb.RETRY_ASYNC_WRITE_FAILURE, fmt.Sprintf("missing intent on: %s", ime.Key))
retryErr := roachpb.NewErrorWithTxn(err, pErr.GetTxn())
retryErr.Index = pErr.Index
in pkg/kv.(*txnPipeliner).adjustError
if pErr != nil {
return nil, tp.adjustError(ctx, ba, pErr)
}
in pkg/kv.(*txnPipeliner).SendLocked
return s.wrapped.SendLocked(ctx, ba)
}
in pkg/kv.(*txnSeqNumAllocator).SendLocked
// Forward the batch through the wrapped lockedSender.
return h.wrapped.SendLocked(ctx, ba)
}
in pkg/kv.(*txnHeartbeater).SendLocked
// Send the command through the txnInterceptor stack.
br, pErr := tc.interceptorStack[0].SendLocked(ctx, ba)
in pkg/kv.(*TxnCoordSender).Send
tracing.AnnotateTrace()
br, pErr := sender.Send(ctx, ba)
if pErr != nil {
in pkg/internal/client.(*DB).sendUsingSender
txn.mu.Unlock()
br, pErr := txn.db.sendUsingSender(ctx, ba, sender)
if pErr == nil {
in pkg/internal/client.(*Txn).Send
ba.Add(endTxnReq(true /* commit */, txn.deadline(), txn.systemConfigTrigger))
_, pErr := txn.Send(ctx, ba)
if pErr == nil {
in pkg/internal/client.(*Txn).commit
func (txn *Txn) Commit(ctx context.Context) error {
return txn.commit(ctx)
}
in pkg/internal/client.(*Txn).Commit
if err := ex.state.mu.txn.Commit(ctx); err != nil {
return ex.makeErrEvent(err, stmt)
in pkg/sql.(*connExecutor).commitSQLTransaction
// ReleaseSavepoint is executed fully here; there's no plan for it.
ev, payload := ex.commitSQLTransaction(ctx, stmt.AST)
res.ResetStmtType((*tree.CommitTransaction)(nil))
in pkg/sql.(*connExecutor).execStmtInOpenState
} else {
ev, payload, err = ex.execStmtInOpenState(ctx, stmt, res, pinfo)
}
in pkg/sql.(*connExecutor).execStmt
stmtCtx := withStatement(ctx, ex.curStmt)
ev, payload, err = ex.execStmt(stmtCtx, curStmt, stmtRes, nil /* pinfo */)
if err != nil {
in pkg/sql.(*connExecutor).execCmd
var err error
if err = ex.execCmd(ex.Ctx()); err != nil {
if err == io.EOF || err == errDrainingComplete {
in pkg/sql.(*connExecutor).run
}()
return h.ex.run(ctx, s.pool, reserved, cancel)
}
in pkg/sql.(*Server).ServeConn
reservedOwned = false // We're about to pass ownership away.
retErr = sqlServer.ServeConn(ctx, connHandler, reserved, cancelConn)
}()
in pkg/sql/pgwire.(*conn).processCommandsAsync.func1

pkg/roachpb/errors.go in pkg/roachpb.(*Error).UpdateTxn at line 244
pkg/roachpb/errors.go in pkg/roachpb.(*Error).SetTxn at line 226
pkg/roachpb/errors.go in pkg/roachpb.NewErrorWithTxn at line 122
pkg/kv/txn_interceptor_pipeliner.go in pkg/kv.(*txnPipeliner).adjustError at line 563
pkg/kv/txn_interceptor_pipeliner.go in pkg/kv.(*txnPipeliner).SendLocked at line 215
pkg/kv/txn_interceptor_seq_num_allocator.go in pkg/kv.(*txnSeqNumAllocator).SendLocked at line 89
pkg/kv/txn_interceptor_heartbeater.go in pkg/kv.(*txnHeartbeater).SendLocked at line 168
pkg/kv/txn_coord_sender.go in pkg/kv.(*TxnCoordSender).Send at line 800
pkg/internal/client/db.go in pkg/internal/client.(*DB).sendUsingSender at line 754
pkg/internal/client/txn.go in pkg/internal/client.(*Txn).Send at line 803
pkg/internal/client/txn.go in pkg/internal/client.(*Txn).commit at line 502
pkg/internal/client/txn.go in pkg/internal/client.(*Txn).Commit at line 529
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).commitSQLTransaction at line 581
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmtInOpenState at line 242
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmt at line 98
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd at line 1243
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).run at line 1172
pkg/sql/conn_executor.go in pkg/sql.(*Server).ServeConn at line 444
pkg/sql/pgwire/conn.go in pkg/sql/pgwire.(*conn).processCommandsAsync.func1 at line 584
Tag Value
Cockroach Release v19.2.1
Cockroach SHA: 53eef08
Platform linux amd64
Distribution CCL
Environment v19.2.1
Command server
Go Version go1.12.12
# of CPUs 4
# of Goroutines 2186
@cockroach-teamcity cockroach-teamcity added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-sentry Originated from an in-the-wild panic report. labels Nov 26, 2019
@yuzefovich yuzefovich changed the title sentry: errors.go:244: transaction unexpectedly finalized in (%T): %v | *roachpb.TransactionRetryError; *roachpb.Error roachpb: v19.2.1: transaction unexpectedly finalized Mar 14, 2020
@nvanbenschoten
Copy link
Member

Sentry link gone and we haven't seen this since.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-sentry Originated from an in-the-wild panic report.
Projects
None yet
Development

No branches or pull requests

2 participants