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

sentry: txn.go:798: deadline below read timestamp is nonsensical; txn has would have no chance to commit. Deadline: 1655338229.272404513,0. Read timestamp: 1655338563.222098880,3 Previous Deadline: 1655337824... #82968

Closed
cockroach-teamcity opened this issue Jun 16, 2022 · 1 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.

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Jun 16, 2022

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/3352784697/?referrer=webhooks_plugin

Panic message:

txn.go:798: deadline below read timestamp is nonsensical; txn has would have no chance to commit. Deadline: 1655338229.272404513,0. Read timestamp: 1655338563.222098880,3 Previous Deadline: 1655337824.697269702,0.
(1) assertion failure
Wraps: (2) attached stack trace
-- stack trace:
| github.com/cockroachdb/cockroach/pkg/kv.(*Txn).UpdateDeadline
| github.com/cockroachdb/cockroach/pkg/kv/txn.go:798
| github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*leasedDescriptors).maybeUpdateDeadline
| github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/leased_descriptors.go:220
| github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).MaybeUpdateDeadline
| github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/collection.go:144
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState
| github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:287
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt
| github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:143
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execPortal
| github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:231
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func2
| github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:1952
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd
| github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:1954
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run
| github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:1800
| github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn
| github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:748
| github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).processCommandsAsync.func1
| github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go:724
| runtime.goexit
| GOROOT/src/runtime/asm_amd64.s:1581
Wraps: (3) deadline below read timestamp is nonsensical; txn has would have no chance to commit. Deadline: 1655338229.272404513,0. Read timestamp: 1655338563.222098880,3 Previous Deadline: 1655337824.697269702,0.
Error types: (1) *assert.withAssertionFailure (2) *withstack.withStack (3) *errutil.leafError
-- report composition:
*errutil.leafError: deadline below read timestamp is nonsensical; txn has would have no chance to commit. Deadline: 1655338229.272404513,0. Read timestamp: 1655338563.222098880,3 Previous Deadline: 1655337824.697269702,0.
txn.go:798: *withstack.withStack (top exception)
*assert.withAssertionFailure

Stacktrace (expand for inline code snippets):

cockroach/pkg/kv/txn.go

Lines 797 to 799 in 242d13b

if deadline.Less(readTimestamp) {
return errors.AssertionFailedf("deadline below read timestamp is nonsensical; "+
"txn has would have no chance to commit. Deadline: %s. Read timestamp: %s Previous Deadline: %s.",
in pkg/kv.(*Txn).UpdateDeadline
if !deadline.IsEmpty() {
return txn.UpdateDeadline(ctx, deadline)
}
in pkg/sql/catalog/descs.(*leasedDescriptors).maybeUpdateDeadline
func (tc *Collection) MaybeUpdateDeadline(ctx context.Context, txn *kv.Txn) (err error) {
return tc.leased.maybeUpdateDeadline(ctx, txn, tc.sqlLivenessSession)
}
in pkg/sql/catalog/descs.(*Collection).MaybeUpdateDeadline
// Update the deadline on the transaction based on the collections.
err := ex.extraTxnState.descCollection.MaybeUpdateDeadline(ctx, ex.state.mu.txn)
if err != nil {
in pkg/sql.(*connExecutor).execStmtInOpenState
} else {
ev, payload, err = ex.execStmtInOpenState(ctx, parserStmt, prepared, pinfo, res, canAutoCommit)
}
in pkg/sql.(*connExecutor).execStmt
}
ev, payload, err = ex.execStmt(ctx, portal.Stmt.Statement, portal.Stmt, pinfo, stmtRes, canAutoCommit)
// Portal suspension is supported via a "side" state machine
in pkg/sql.(*connExecutor).execPortal
canAutoCommit := ex.implicitTxn() && tcmd.FollowedBySync
ev, payload, err = ex.execPortal(ctx, portal, portalName, stmtRes, pinfo, canAutoCommit)
return err
in pkg/sql.(*connExecutor).execCmd.func2
return err
}()
// Note: we write to ex.statsCollector.phaseTimes, instead of ex.phaseTimes,
in pkg/sql.(*connExecutor).execCmd
var err error
if err = ex.execCmd(); err != nil {
if errors.IsAny(err, io.EOF, 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
GOROOT/src/runtime/asm_amd64.s#L1580-L1582 in runtime.goexit

pkg/kv/txn.go in pkg/kv.(*Txn).UpdateDeadline at line 798
pkg/sql/catalog/descs/leased_descriptors.go in pkg/sql/catalog/descs.(*leasedDescriptors).maybeUpdateDeadline at line 220
pkg/sql/catalog/descs/collection.go in pkg/sql/catalog/descs.(*Collection).MaybeUpdateDeadline at line 144
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmtInOpenState at line 287
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmt at line 143
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execPortal at line 231
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd.func2 at line 1952
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd at line 1954
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).run at line 1800
pkg/sql/conn_executor.go in pkg/sql.(*Server).ServeConn at line 748
pkg/sql/pgwire/conn.go in pkg/sql/pgwire.(*conn).processCommandsAsync.func1 at line 724
GOROOT/src/runtime/asm_amd64.s in runtime.goexit at line 1581
Tag Value
Cockroach Release v22.1.1
Cockroach SHA: 242d13b
Platform linux amd64
Distribution CCL
Environment v22.1.1
Command server
Go Version ``
# of CPUs
# of Goroutines

Jira issue: CRDB-16761

@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 Jun 16, 2022
@yuzefovich
Copy link
Member

dup of #76727

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