oxidecomputer / oxidecomputer/omicron

versions_have_idempotent_up test fails with "Failed to ROLLBACK failed transaction...there is no transaction in progress"

Open
#4,409 6 comments 0 reactions 1 assignee View on GitHub

@smklein is already working on this.

Since Dec 7, 2023.

Test Flake
Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

Test omicron-nexus::test_all integration_tests::schema::versions_have_idempotent_up failed with

thread 'integration_tests::schema::versions_have_idempotent_up' panicked at 'Failed to ROLLBACK failed transaction: Error { kind: Db, cause: Some(DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState(Other("XXUUU")), message: "there is no transaction in progress", detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("exec_util.go"), line: Some(741), routine: Some("init") }) }', nexus/tests/integration_tests/schema.rs:96:22

Buildomat log

From @davepacheco:

  • looks like we executed BEGIN; and the update SQL, then COMMIT;
  • the first two succeeded (or we would have panicked)
  • the COMMIT; failed and CockroachDB reports restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE)
  • apply_update_as_transaction then issues a ROLLBACK; but that fails because the transaction is no longer in progress
  • so we panic

It's not clear to me why we'd ever expect to get a serializeable error here or what the logic here is trying to do in terms of retrying (or why it's issuing a rollback, since the only that can have failed here is the commit

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.