Skip to content

flake: TestUserList/SessionAuthErrorHasHelperText (windows) - dbtestutil create database wsarecv aborted #1278

Closed

Description

@flake-investigator

CI run: https://github.com/coder/coder/actions/runs/21133032582
Commit: d176714f90f2c4dffa4c182722f6b16deface38a (Cian Johnston)
Job: test-go-pg (windows-2022)

What failed

Go test failures in the cli package:

  • TestUserList/SessionAuthErrorHasHelperText (and the parent TestUserList)

Key log excerpt:

Received unexpected error:
create database:
  - create db with template:
    github.com/coder/coder/v2/coderd/database/dbtestutil.createDatabaseFromTemplate
        coderd/database/dbtestutil/postgres.go:204
  - read tcp 127.0.0.1:50677->127.0.0.1:5432: wsarecv: The I/O operation has been aborted because of either a thread exit or an application request.

Initial assessment

This looks like an infrastructure / embedded-postgres stability issue on Windows during test database creation (connection abruptly aborted). It may be intermittent and environment-dependent.

Files implicated by stack trace:

  • coderd/database/dbtestutil/broker.go
  • coderd/database/dbtestutil/postgres.go (createDatabaseFromTemplate)
  • cli/userlist_test.go

Ownership / assignment rationale

Recent substantive work in coderd/database/dbtestutil/postgres.go and related dbtestutil plumbing was done by Spike Curtis (e.g. commits 596fdcba817e, e2076beb9f7a).

Assigning to: @spikecurtis

Activity

  1. spikecurtis commented on Jan 20, 2026

    @spikecurtis

    There is also an issue reading and writing to the pseudoconsole in a different test:

        clitest.go:283: command "coder rename" exited with error: running command "coder rename": read |0: The handle is invalid.
        ptytest.go:132: 2026-01-19 10:03:41.431: cmd: "See: https://coder.com/docs/templates/resource-persistence#%EF%B8%8F-persistence-pitfalls"
        ptytest.go:132: 2026-01-19 10:03:41.431: cmd: ""
        clitest.go:194: 
            	Error Trace:	C:/actions-runner/coder/coder/cli/clitest/clitest.go:194
            	            				C:/hostedtoolcache/windows/go/1.24.11/x64/src/runtime/asm_amd64.s:1700
            	Error:      	Received unexpected error:
            	            	running command "coder rename": read |0: The handle is invalid.
            	Test:       	TestRename
        ptytest.go:169: 2026-01-19 10:03:41.431: cmd: matched "confirm rename:" = "WARNING: A rename can result in data loss if a resource references the workspace\nname in the template (e.g volumes). Please backup any data before proceeding.\n\nSee: https://coder.com/docs/templates/resource-persistence#%EF%B8%8F-persistence-pitfalls\n\n> Type \"splendid-wright346\" to confirm rename:"
        rename_test.go:38: 2026-01-19 10:03:41.431: cmd: stdin: "splendid-wright346\r\n"
        rename_test.go:38: 
            	Error Trace:	C:/actions-runner/coder/coder/pty/ptytest/ptytest.go:430
            	            				C:/actions-runner/coder/coder/cli/rename_test.go:38
            	Error:      	Received unexpected error:
            	            	write |1: The parameter is incorrect.
            	Test:       	TestRename
            	Messages:   	write line failed
    

    These seem like very fundamental Windows, or at least Go-on-Windows errors. If reading and writing to TCP sockets or pseudoconsoles starts failing then we really are in a bad way.

    I'm going to close this one, but if we see it again we might need to start digging really deep.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions