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_coord_sender.go:1051: cannot set fixed timestamp, txn "sql txn" meta={id=75f81920 pri=0.00356082 epo=0 ts=1664905835.817999559,0 min=1664905835.817999559,0 seq=2} lock=true stat=PENDING rts=166490... #89309

Closed
cockroach-teamcity opened this issue Oct 4, 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 Oct 4, 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/3644689209/?referrer=webhooks_plugin

Panic message:

txn_coord_sender.go:1051: cannot set fixed timestamp, txn "sql txn" meta={id=75f81920 pri=0.00356082 epo=0 ts=1664905835.817999559,0 min=1664905835.817999559,0 seq=2} lock=true stat=PENDING rts=1664905835.817999559,0 wto=false gul=1664905836.317999559,0 already performed writes
(1) tags: [n73,client=10.20.185.95:49280,hostssl,user=×]
Wraps: (2) assertion failure
Wraps: (3) attached stack trace
-- stack trace:
| github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*TxnCoordSender).SetFixedTimestamp
| /go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/txn_coord_sender.go:1051
| github.com/cockroachdb/cockroach/pkg/kv.(*Txn).SetFixedTimestamp
| /go/src/github.com/cockroachdb/cockroach/pkg/kv/txn.go:1399
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).populatePrepared
| /go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor_prepare.go:273
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).prepare.func1
| /go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor_prepare.go:220
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).prepare
| /go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor_prepare.go:226
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).addPreparedStmt
| /go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor_prepare.go:111
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execPrepare
| /go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor_prepare.go:53
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd
| /go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:1805
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run
| /go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:1637
| github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn
| /go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:668
| github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).processCommandsAsync.func1
| /go/src/github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go:648
| runtime.goexit
| /usr/local/go/src/runtime/asm_amd64.s:1371
Wraps: (4) cannot set fixed timestamp, txn "sql txn" meta={id=75f81920 pri=0.00356082 epo=0 ts=1664905835.817999559,0 min=1664905835.817999559,0 seq=2} lock=true stat=PENDING rts=1664905835.817999559,0 wto=false gul=1664905836.317999559,0 already performed writes
Error types: (1) *contexttags.withContext (2) *assert.withAssertionFailure (3) *withstack.withStack (4) *errutil.leafError
-- report composition:
*errutil.leafError: cannot set fixed timestamp, txn "sql txn" meta={id=75f81920 pri=0.00356082 epo=0 ts=1664905835.817999559,0 min=1664905835.817999559,0 seq=2} lock=true stat=PENDING rts=1664905835.817999559,0 wto=false gul=1664905836.317999559,0 already performed writes
txn_coord_sender.go:1051: *withstack.withStack (top exception)
*assert.withAssertionFailure
*contexttags.withContext: n73

Stacktrace (expand for inline code snippets):

if tc.mu.txn.Sequence != 0 {
return errors.WithContextTags(errors.AssertionFailedf(
"cannot set fixed timestamp, txn %s already performed writes", tc.mu.txn), ctx)
in pkg/kv/kvclient/kvcoord.(*TxnCoordSender).SetFixedTimestamp

cockroach/pkg/kv/txn.go

Lines 1398 to 1400 in 39511c6

defer txn.mu.Unlock()
return txn.mu.sender.SetFixedTimestamp(ctx, ts)
}
in pkg/kv.(*Txn).SetFixedTimestamp
if !asOf.BoundedStaleness {
if err := txn.SetFixedTimestamp(ctx, asOf.Timestamp); err != nil {
return 0, err
in pkg/sql.(*connExecutor).populatePrepared
p.semaCtx.Annotations = tree.MakeAnnotations(stmt.NumAnnotations)
flags, err = ex.populatePrepared(ctx, txn, placeholderHints, p)
return err
in pkg/sql.(*connExecutor).prepare.func1
// Use the existing transaction.
if err := prepare(ctx, txn); err != nil {
return nil, err
in pkg/sql.(*connExecutor).prepare
// Prepare the query. This completes the typing of placeholders.
prepared, err := ex.prepare(ctx, stmt, placeholderHints, rawTypeHints, origin)
if err != nil {
in pkg/sql.(*connExecutor).addPreparedStmt
stmt := makeStatement(parseCmd.Statement, ex.generateID())
ps, err := ex.addPreparedStmt(
ctx,
in pkg/sql.(*connExecutor).execPrepare
stmtCtx := withStatement(ctx, ex.curStmtAST)
ev, payload = ex.execPrepare(stmtCtx, tcmd)
case DescribeStmt:
in pkg/sql.(*connExecutor).execCmd
var err error
if err = ex.execCmd(ex.Ctx()); 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
/usr/local/go/src/runtime/asm_amd64.s#L1370-L1372 in runtime.goexit

pkg/kv/kvclient/kvcoord/txn_coord_sender.go in pkg/kv/kvclient/kvcoord.(*TxnCoordSender).SetFixedTimestamp at line 1051
pkg/kv/txn.go in pkg/kv.(*Txn).SetFixedTimestamp at line 1399
pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).populatePrepared at line 273
pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).prepare.func1 at line 220
pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).prepare at line 226
pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).addPreparedStmt at line 111
pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).execPrepare at line 53
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd at line 1805
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).run at line 1637
pkg/sql/conn_executor.go in pkg/sql.(*Server).ServeConn at line 668
pkg/sql/pgwire/conn.go in pkg/sql/pgwire.(*conn).processCommandsAsync.func1 at line 648
/usr/local/go/src/runtime/asm_amd64.s in runtime.goexit at line 1371
Tag Value
Cockroach Release v21.2.10
Cockroach SHA: 39511c6
Platform linux amd64
Distribution CCL
Environment v21.2.10
Command server
Go Version ``
# of CPUs
# of Goroutines

Jira issue: CRDB-20200

@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 Oct 4, 2022
@yuzefovich
Copy link
Member

dup of #85066

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