Skip to content

Windows CI: test_chatgpt_search_pagination_default hangs in an aiosqlite call #1430

Description

@phernandez

Summary

test-int/mcp/test_chatgpt_tools_integration.py::test_chatgpt_search_pagination_default intermittently hangs on windows-latest until pytest-timeout kills the run. It is not a slow test or an assertion failure — the run produces no pytest failure summary, just a timeout thread dump and exit code 1.

Observed on PR #1421, which touches none of this code (project routing).

Evidence

Run 33546084734 attempt 1, job 99983869051. The suite advanced normally to 5%, then stopped dead for ~2 minutes:

18:58:27  test_chatgpt_fetch_with_empty_title[asyncio] PASSED [  5%]
19:00:29  test_chatgpt_search_pagination_default[asyncio] ++++++++ Timeout ++++++++

Two stacks matter. The aiosqlite worker thread is inside a blocking SQLite call:

File ".venv\Lib\site-packages\aiosqlite\core.py", line 63, in _connection_worker_thread
    result = function()

…while the main thread is parked in the event loop with no basic_memory frames on the stack at all:

File "...\Lib\asyncio\base_events.py", line 2019, in _run_once

So the loop is idle, waiting forever on a SQLite call that never returns. That is a block (lock contention or a lost wakeup), not slowness — nothing is making progress to time out against.

Why this test

It is the heaviest writer in the file: it creates 15 notes in a loop through the MCP client, each one a write plus an index pass, before searching. If the cause is write-lock contention on Windows, this is the test most likely to hit it.

Note on the Python version

The thread dump shows C:\hostedtoolcache\windows\Python\3.14.7\x64\ — this job is named "Python 3.12" but ran 3.14.7, because every uv venv call was bare and resolved from .python-version. Fixed separately in #1429. Once that lands, this job will run genuine 3.12 for the first time, which may change whether the hang reproduces. Worth re-checking after #1429 merges before investing in a fix.

Not yet known

  • Whether it reproduces on real 3.12, or is specific to 3.14 on Windows
  • Which statement the worker thread is blocked in (the dump does not name it)
  • Frequency — the rerun of this job was still in flight when this was filed

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions