Skip to content

[auto-bump] [no-release-notes] dependency by reltuk#2884

Open
coffeegoddd wants to merge 1 commit into
mainfrom
reltuk-25552a68
Open

[auto-bump] [no-release-notes] dependency by reltuk#2884
coffeegoddd wants to merge 1 commit into
mainfrom
reltuk-25552a68

Conversation

@coffeegoddd

Copy link
Copy Markdown
Contributor

An Automated Dependency Version Bump PR 👑

Initial Changes

The changes contained in this PR were produced by `go get`ing the dependency.

```bash
go get github.com/dolthub/[dependency]/go@[commit]
```

@github-actions

Copy link
Copy Markdown
Contributor
Main PR
covering_index_scan_postgres 1819.62/s 1834.74/s +0.8%
groupby_scan_postgres 130.12/s 134.94/s +3.7%
index_join_postgres 632.36/s 642.84/s +1.6%
index_join_scan_postgres 781.01/s 788.66/s +0.9%
index_scan_postgres 24.23/s 24.49/s +1.0%
oltp_delete_insert_postgres 736.61/s 762.82/s +3.5%
oltp_insert 664.18/s 682.60/s +2.7%
oltp_point_select 2787.68/s 2836.09/s +1.7%
oltp_read_only 2859.76/s 2883.95/s +0.8%
oltp_read_write 2234.43/s 2265.52/s +1.3%
oltp_update_index 703.70/s 689.02/s -2.1%
oltp_update_non_index 727.33/s 721.08/s -0.9%
oltp_write_only 1680.21/s 1684.00/s +0.2%
select_random_points 1811.01/s 1826.46/s +0.8%
select_random_ranges 1068.57/s 1064.12/s -0.5%
table_scan_postgres 22.96/s 22.91/s -0.3%
types_delete_insert_postgres 720.66/s 742.53/s +3.0%
types_table_scan_postgres 7.97/s 7.99/s +0.2%

@itoqa

itoqa Bot commented Jun 26, 2026

Copy link
Copy Markdown

Ito QA test results
Commit: fbed4bc: 10 test cases ran, 2 failed ❌, 8 passed ✅, 0 additional findings ⚠️.

Summary

Coverage spans core database connection and query behavior across normal and adversarial protocol flows, including authentication, simple and prepared statement execution, and bulk data import success and rollback handling. The major gap in health is persistence-on-restart behavior, where schemas using custom data types can fail to come back up after a restart.

Not safe to merge yet — this PR appears to introduce a high-severity regression in startup reliability, where valid persisted data can trigger server crashes and database unavailability after restart. Even with broad pass results on online query and protocol paths, a restart-time crash in a real data scenario is a release-blocking risk in code touched by this change.

Tests run by Ito

View full run

Result Severity Type Description
High severity Storage The process crashes with SIGSEGV during root/table initialization because type deserialization requests a type collection with ctx=nil, and getContextValues dereferences ctx.Session without a nil guard.
High severity Storage During restart, type deserialization for persisted table schemas executes with a nil *sql.Context and dereferences ctx.Session in core.getContextValues, causing a SIGSEGV and process exit.
Copy COPY FROM STDIN accepted five data chunks, returned COPY 50 on CopyDone, and persisted all 50 rows with matching sample payloads.
Copy CopyFail after ingesting 15 rows rolled back the in-progress COPY (row count stayed at 15 with zero fail-chunk rows), and a subsequent CopyDone retry added exactly 6 rows for a final count of 21 without duplication.
Parser SELECT 1 on the simple-query path returned RowDescription, DataRow, and CommandComplete, and a psql check confirmed the expected row output.
Parser INSERT ... RETURNING produced RowDescription and DataRow frames with the returned id/payload values, and the inserted rows were confirmed by follow-up SELECT checks.
Prepared A raw PostgreSQL protocol client successfully executed prepared statements when Parse used empty ParameterOIDs, [0], and text-implied parameters, returning expected DataRows in each sub-test.
Prepared Prepared statements executed with binary, mixed, and schema-changing result formats without decode corruption or protocol framing drift.
Startup Startup authentication completed with SCRAM-SHA-256, the session reached ReadyForQuery, and SELECT 1 returned the expected value.
Startup A malformed SCRAM SASLInitialResponse correctly returned a FATAL auth error and the connection closed before ReadyForQuery.

Tip

Reply with @itoqa to send us feedback on this test run.

Comment thread go.mod
github.com/cockroachdb/apd/v3 v3.2.3
github.com/cockroachdb/errors v1.7.5
github.com/dolthub/dolt/go v0.40.5-0.20260624213831-feba4a825720
github.com/dolthub/dolt/go v0.40.5-0.20260626214637-25552a68b104

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

View All Evidence

High severity Persisted custom type deserialization crashes server on restart

What failed: The process crashes with SIGSEGV during root/table initialization because type deserialization requests a type collection with ctx=nil, and getContextValues dereferences ctx.Session without a nil guard.

Impact · Steps · Stub / mock · Analysis · Why this is likely a bug
  • Severity: High High severity
  • Impact: After creating and persisting ENUM-based schema, restarting the server can crash before it accepts connections, leaving affected databases unavailable until repaired. This blocks normal read/write access for users of those databases.
  • Steps to Reproduce:
    1. Start doltgres with a fresh data directory.
    2. Create an ENUM type and a table that uses that type, then insert rows.
    3. Stop the server and restart using the same data directory.
    4. Observe startup panic before ReadyForQuery with stack through recursiveDeserializeType -> GetTypesCollectionFromContext -> getContextValues.
  • Stub / mock content: No stubs, mocks, or bypasses were applied for this test in the recorded run.
  • Code Analysis: core/context.go assumes ctx is non-nil in getContextValues (line 56), and core/context.go line 421 calls that helper from GetTypesCollectionFromContext without validating ctx. During startup deserialization, server/types/serialization.go line 267 calls GetTypesCollectionFromContext(ctx, "") when ctx may be nil in this dependency path. The PR diff modified go.mod dependency lines (9, 12, 15) and the panic stack shows the new go-mysql-server and dolt versions on this call chain, making this a regression introduced by changed dependency code paths. Smallest practical fix: add explicit nil-context handling in GetTypesCollectionFromContext/getContextValues and/or avoid calling context-dependent type collection lookup from recursiveDeserializeType when ctx is nil during startup deserialization.
  • Why this is likely a bug: This is a production-code startup path and the observed panic is a deterministic nil-pointer dereference in repository code, not a harness artifact. A database containing valid persisted custom-type metadata should not make the server crash before it can accept connections.
Relevant code

go.mod:9-12

github.com/dolthub/dolt/go v0.40.5-0.20260626214637-25552a68b104
github.com/dolthub/go-mysql-server v0.20.1-0.20260626203645-7c333f13eaca

core/context.go:55-57

func getContextValues(ctx *sql.Context) (*contextValues, error) {
	sess := dsess.DSessFromSess(ctx.Session)
	if sess.DoltgresSessObj == nil {

core/context.go:420-422

func GetTypesCollectionFromContext(ctx *sql.Context, database string) (*typecollection.TypeCollection, error) {
	cv, err := getContextValues(ctx)
	if err != nil {

server/types/serialization.go:266-268

if typeColl == nil {
	typeColl, err = GetTypesCollectionFromContext(ctx, "")
	if err != nil {
Evidence Package
Copy prompt for an agent
Ito QA identified the following failure during automated PR testing. Please investigate and propose a fix.

**High severity — Persisted custom type deserialization crashes server on restart**

**What failed:** The process crashes with SIGSEGV during root/table initialization because type deserialization requests a type collection with ctx=nil, and getContextValues dereferences ctx.Session without a nil guard.

- **Impact:** After creating and persisting ENUM-based schema, restarting the server can crash before it accepts connections, leaving affected databases unavailable until repaired. This blocks normal read/write access for users of those databases.
- **Steps to reproduce:**
  1. Start doltgres with a fresh data directory.
  2. Create an ENUM type and a table that uses that type, then insert rows.
  3. Stop the server and restart using the same data directory.
  4. Observe startup panic before ReadyForQuery with stack through recursiveDeserializeType -> GetTypesCollectionFromContext -> getContextValues.
- **Stub / mock content:** No stubs, mocks, or bypasses were applied for this test in the recorded run.
- **Code analysis:** core/context.go assumes ctx is non-nil in getContextValues (line 56), and core/context.go line 421 calls that helper from GetTypesCollectionFromContext without validating ctx. During startup deserialization, server/types/serialization.go line 267 calls GetTypesCollectionFromContext(ctx, "") when ctx may be nil in this dependency path. The PR diff modified go.mod dependency lines (9, 12, 15) and the panic stack shows the new go-mysql-server and dolt versions on this call chain, making this a regression introduced by changed dependency code paths. Smallest practical fix: add explicit nil-context handling in GetTypesCollectionFromContext/getContextValues and/or avoid calling context-dependent type collection lookup from recursiveDeserializeType when ctx is nil during startup deserialization.
- **Why this is likely a bug:** This is a production-code startup path and the observed panic is a deterministic nil-pointer dereference in repository code, not a harness artifact. A database containing valid persisted custom-type metadata should not make the server crash before it can accept connections.

**Relevant code:**

`go.mod:9-12`

~~~go
github.com/dolthub/dolt/go v0.40.5-0.20260626214637-25552a68b104
github.com/dolthub/go-mysql-server v0.20.1-0.20260626203645-7c333f13eaca
~~~

`core/context.go:55-57`

~~~go
func getContextValues(ctx *sql.Context) (*contextValues, error) {
	sess := dsess.DSessFromSess(ctx.Session)
	if sess.DoltgresSessObj == nil {
~~~

`core/context.go:420-422`

~~~go
func GetTypesCollectionFromContext(ctx *sql.Context, database string) (*typecollection.TypeCollection, error) {
	cv, err := getContextValues(ctx)
	if err != nil {
~~~

`server/types/serialization.go:266-268`

~~~go
if typeColl == nil {
	typeColl, err = GetTypesCollectionFromContext(ctx, "")
	if err != nil {
~~~

Comment thread go.mod
github.com/cockroachdb/apd/v3 v3.2.3
github.com/cockroachdb/errors v1.7.5
github.com/dolthub/dolt/go v0.40.5-0.20260624213831-feba4a825720
github.com/dolthub/dolt/go v0.40.5-0.20260626214637-25552a68b104

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

View All Evidence

High severity Persisted schema loads while referenced custom type fails resolution

What failed: During restart, type deserialization for persisted table schemas executes with a nil *sql.Context and dereferences ctx.Session in core.getContextValues, causing a SIGSEGV and process exit.

Impact · Steps · Stub / mock · Analysis · Why this is likely a bug
  • Severity: High High severity
  • Impact: Servers that restart with persisted tables using custom ENUM or COMPOSITE types can crash on startup, making affected databases unavailable. Users cannot reliably bring the service back up for those datasets until the defect is fixed or the data is changed.
  • Steps to Reproduce:
    1. Start doltgres with a fresh DOLTGRES_DATA_DIR and create custom types plus tables that use those types.
    2. Insert rows, stop the server, then restart using the same data directory.
    3. Observe startup panic: stack reaches recursiveDeserializeType -> GetTypesCollectionFromContext(nil) -> getContextValues and crashes before ReadyForQuery.
  • Stub / mock content: No stubs, mocks, or bypasses were applied for this test in the recorded run.
  • Code Analysis: The panic is code-backed in repository paths: core/context.go dereferences ctx.Session without a nil guard, and core/init.go registers GetTypesCollectionFromContext for type resolution used by server/types/serialization.go recursiveDeserializeType. Runtime evidence shows this path is exercised from dependency code during startup table iteration. PR context shows only dependency updates in go.mod/go.sum, with go.mod changed lines bumping github.com/dolthub/dolt/go and github.com/dolthub/go-mysql-server; the stack trace references those bumped module versions and the regression appears when those changed dependency lines are in place.
  • Why this is likely a bug: A persisted data directory that previously operated should not make the server crash during restart. The production startup path dereferences a nil context and aborts the process instead of handling unresolved custom-type loading deterministically.
Relevant code

go.mod:9-12

github.com/dolthub/dolt/go v0.40.5-0.20260626214637-25552a68b104
github.com/dolthub/go-mysql-server v0.20.1-0.20260626203645-7c333f13eaca

core/context.go:55-57

func getContextValues(ctx *sql.Context) (*contextValues, error) {
	sess := dsess.DSessFromSess(ctx.Session)
	if sess.DoltgresSessObj == nil {

server/types/serialization.go:266-268

if typeColl == nil {
	typeColl, err = GetTypesCollectionFromContext(ctx, "")
	if err != nil {

core/init.go:40-42

pgtypes.GetTypesCollectionFromContext = func(ctx *sql.Context, database string) (pgtypes.TypeCollection, error) {
	return GetTypesCollectionFromContext(ctx, database)
}
Evidence Package
Copy prompt for an agent
Ito QA identified the following failure during automated PR testing. Please investigate and propose a fix.

**High severity — Persisted schema loads while referenced custom type fails resolution**

**What failed:** During restart, type deserialization for persisted table schemas executes with a nil *sql.Context and dereferences ctx.Session in core.getContextValues, causing a SIGSEGV and process exit.

- **Impact:** Servers that restart with persisted tables using custom ENUM or COMPOSITE types can crash on startup, making affected databases unavailable. Users cannot reliably bring the service back up for those datasets until the defect is fixed or the data is changed.
- **Steps to reproduce:**
  1. Start doltgres with a fresh DOLTGRES_DATA_DIR and create custom types plus tables that use those types.
  2. Insert rows, stop the server, then restart using the same data directory.
  3. Observe startup panic: stack reaches recursiveDeserializeType -> GetTypesCollectionFromContext(nil) -> getContextValues and crashes before ReadyForQuery.
- **Stub / mock content:** No stubs, mocks, or bypasses were applied for this test in the recorded run.
- **Code analysis:** The panic is code-backed in repository paths: core/context.go dereferences ctx.Session without a nil guard, and core/init.go registers GetTypesCollectionFromContext for type resolution used by server/types/serialization.go recursiveDeserializeType. Runtime evidence shows this path is exercised from dependency code during startup table iteration. PR context shows only dependency updates in go.mod/go.sum, with go.mod changed lines bumping github.com/dolthub/dolt/go and github.com/dolthub/go-mysql-server; the stack trace references those bumped module versions and the regression appears when those changed dependency lines are in place.
- **Why this is likely a bug:** A persisted data directory that previously operated should not make the server crash during restart. The production startup path dereferences a nil context and aborts the process instead of handling unresolved custom-type loading deterministically.

**Relevant code:**

`go.mod:9-12`

~~~gomod
github.com/dolthub/dolt/go v0.40.5-0.20260626214637-25552a68b104
github.com/dolthub/go-mysql-server v0.20.1-0.20260626203645-7c333f13eaca
~~~

`core/context.go:55-57`

~~~go
func getContextValues(ctx *sql.Context) (*contextValues, error) {
	sess := dsess.DSessFromSess(ctx.Session)
	if sess.DoltgresSessObj == nil {
~~~

`server/types/serialization.go:266-268`

~~~go
if typeColl == nil {
	typeColl, err = GetTypesCollectionFromContext(ctx, "")
	if err != nil {
~~~

`core/init.go:40-42`

~~~go
pgtypes.GetTypesCollectionFromContext = func(ctx *sql.Context, database string) (pgtypes.TypeCollection, error) {
	return GetTypesCollectionFromContext(ctx, database)
}
~~~

@github-actions

Copy link
Copy Markdown
Contributor
Main PR
Total 42090 42090
Successful 18270 18270
Failures 23820 23820
Partial Successes1 5334 5334
Main PR
Successful 43.4070% 43.4070%
Failures 56.5930% 56.5930%

Footnotes

  1. These are tests that we're marking as Successful, however they do not match the expected output in some way. This is due to small differences, such as different wording on the error messages, or the column names being incorrect while the data itself is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants