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:1047: cannot set fixed timestamp, txn "sql txn" meta={id=2e2c6e5b pri=0.00246419 epo=0 ts=1646672419.172919000,0 min=1646672419.172919000,0 seq=0} lock=false stat=PENDING rts=1646672419.172919000,0 wto=false gul=1646672419.672919000,0 already performed reads -- *errutil.leafError: cannot set fixed timestamp, txn "sql txn" meta={id=2e2c6e5b pri=0.00246419 epo=0 ts=1646672419.172919000,0 min=1646672419.172919000,0 seq=0} lock=false stat=PENDING rts=1646672419.172919000,0 wto=false gul=1646672419.672919000,0 already performed reads (1) txn_coord_sender.go:1047: *withstack.withStack (top exception) *assert.withAssertionFailure *contexttags.withContext: n1 (2) (check the extra data payloads) #77441

Closed
cockroach-teamcity opened this issue Mar 7, 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

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

Panic message:

txn_coord_sender.go:1047: cannot set fixed timestamp, txn "sql txn" meta={id=2e2c6e5b pri=0.00246419 epo=0 ts=1646672419.172919000,0 min=1646672419.172919000,0 seq=0} lock=false stat=PENDING rts=1646672419.172919000,0 wto=false gul=1646672419.672919000,0 already performed reads
--
*errutil.leafError: cannot set fixed timestamp, txn "sql txn" meta={id=2e2c6e5b pri=0.00246419 epo=0 ts=1646672419.172919000,0 min=1646672419.172919000,0 seq=0} lock=false stat=PENDING rts=1646672419.172919000,0 wto=false gul=1646672419.672919000,0 already performed reads (1)
txn_coord_sender.go:1047: *withstack.withStack (top exception)
*assert.withAssertionFailure
*contexttags.withContext: n1 (2)
(check the extra data payloads)

Stacktrace (expand for inline code snippets):

if !tc.interceptorAlloc.txnSpanRefresher.refreshFootprint.empty() {
return errors.WithContextTags(errors.AssertionFailedf(
"cannot set fixed timestamp, txn %s already performed reads", tc.mu.txn), ctx)
in pkg/kv/kvclient/kvcoord.(*TxnCoordSender).SetFixedTimestamp

cockroach/pkg/kv/txn.go

Lines 1390 to 1392 in c7cfac5

defer txn.mu.Unlock()
return txn.mu.sender.SetFixedTimestamp(ctx, ts)
}
in pkg/kv.(*Txn).SetFixedTimestamp
defer ts.mu.Unlock()
if err := ts.mu.txn.SetFixedTimestamp(ctx, historicalTimestamp); err != nil {
return err
in pkg/sql.(*txnState).setHistoricalTimestamp
if !asOfTs.IsEmpty() {
if err := ex.state.setHistoricalTimestamp(ex.Ctx(), asOfTs); err != nil {
return err
in pkg/sql.(*connExecutor).setTransactionModes
if err := p.extendedEvalCtx.TxnModesSetter.setTransactionModes(n.Modes, asOfTs); err != nil {
return nil, err
in pkg/sql.(*planner).SetTransaction

cockroach/pkg/sql/opaque.go

Lines 191 to 193 in c7cfac5

case *tree.SetTransaction:
return p.SetTransaction(ctx, n)
case *tree.SetSessionAuthorizationDefault:
in pkg/sql.planOpaque
var err error
plan, err = planOpaque(ctx, p, stmt)
if err != nil {
in pkg/sql.buildOpaque
}
obj, err := info.buildFn(b.ctx, b.semaCtx, b.evalCtx, stmt)
if err != nil {
in pkg/sql/opt/optbuilder.(*Builder).tryBuildOpaque
// See if we have an opaque handler registered for this statement type.
if outScope := b.tryBuildOpaque(stmt, inScope); outScope != nil {
// The opaque handler may resolve objects; we don't care about caching
in pkg/sql/opt/optbuilder.(*Builder).buildStmt
b.ctes = nil
outScope = b.buildStmt(stmt, desiredTypes, inScope)
// Build With operators for any CTEs hoisted to the top level.
in pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot
// and physical properties.
outScope := b.buildStmtAtRoot(b.stmt, nil /* desiredTypes */)
in pkg/sql/opt/optbuilder.(*Builder).Build
bld := optbuilder.New(ctx, &p.semaCtx, p.EvalContext(), &opc.catalog, f, opc.p.stmt.AST)
if err := bld.Build(); err != nil {
return nil, err
in pkg/sql.(*optPlanningCtx).buildExecMemo
execMemo, err := opc.buildExecMemo(ctx)
if err != nil {
in pkg/sql.(*planner).makeOptimizerPlan
func (ex *connExecutor) makeExecPlan(ctx context.Context, planner *planner) error {
if err := planner.makeOptimizerPlan(ctx); err != nil {
log.VEventf(ctx, 1, "optimizer plan failed: %v", err)
in pkg/sql.(*connExecutor).makeExecPlan
// between here and there needs to happen even if there's an error.
err := ex.makeExecPlan(ctx, planner)
// We'll be closing the plan manually below after execution; this
in pkg/sql.(*connExecutor).dispatchToExecutionEngine
if err := ex.dispatchToExecutionEngine(ctx, p, res); err != nil {
stmtThresholdSpan.Finish()
in pkg/sql.(*connExecutor).execStmtInOpenState
} else {
ev, payload, err = ex.execStmtInOpenState(ctx, parserStmt, prepared, pinfo, res)
}
in pkg/sql.(*connExecutor).execStmt
ev, payload, err = ex.execStmt(ctx, tcmd.Statement, nil /* prepared */, nil /* pinfo */, stmtRes)
return err
in pkg/sql.(*connExecutor).execCmd.func1
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(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 1047
pkg/kv/txn.go in pkg/kv.(*Txn).SetFixedTimestamp at line 1391
pkg/sql/txn_state.go in pkg/sql.(*txnState).setHistoricalTimestamp at line 272
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).setTransactionModes at line 2333
pkg/sql/set_transaction.go in pkg/sql.(*planner).SetTransaction at line 37
pkg/sql/opaque.go in pkg/sql.planOpaque at line 192
pkg/sql/opaque.go in pkg/sql.buildOpaque at line 61
pkg/sql/opt/optbuilder/opaque.go in pkg/sql/opt/optbuilder.(*Builder).tryBuildOpaque at line 69
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmt at line 374
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot at line 241
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).Build at line 215
pkg/sql/plan_opt.go in pkg/sql.(*optPlanningCtx).buildExecMemo at line 521
pkg/sql/plan_opt.go in pkg/sql.(*planner).makeOptimizerPlan at line 194
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).makeExecPlan at line 1260
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).dispatchToExecutionEngine at line 972
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmtInOpenState at line 709
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmt at line 129
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd.func1 at line 1705
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd at line 1707
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).run at line 1629
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.6
Cockroach SHA: c7cfac5
Platform darwin amd64
Distribution CCL
Environment v21.2.6
Command start-single-node
Go Version ``
# of CPUs
# of Goroutines
@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 Mar 7, 2022
@yuzefovich
Copy link
Member

dup of #77265

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