[Django] #34903: Parallel test runner failure on Windows

3 views
Skip to first unread message

Django

unread,
Oct 17, 2023, 12:25:15 PM10/17/23
to django-...@googlegroups.com
#34903: Parallel test runner failure on Windows
---------------------------------------------+------------------------
Reporter: David Smith | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 4.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------------+------------------------
2128a73713735fb794ca6565fd5d7792293f5cfa introduced a regression when
running the test suite in parallel mode on Windows.

The traceback is long, here's a snippet.

{{{
Process SpawnPoolWorker-47:
Traceback (most recent call last):
File "C:\Program
Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1520.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\process.py",
line 314, in _bootstrap
self.run()
File "C:\Program
Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1520.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\process.py",
line 108, in run
self._target(*self._args, **self._kwargs)
File "C:\Program
Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1520.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\pool.py",
line 109, in worker
initializer(*initargs)
File "C:\Users\smith\projects\django\django\test\runner.py", line 442,
in _init_worker
connection.creation.setup_worker_connection(_worker_id)
File
"C:\Users\smith\projects\django\django\db\backends\sqlite3\creation.py",
line 145, in setup_worker_connection
source_db = self.connection.Database.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: unable to open database file
Process SpawnPoolWorker-48:
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34903>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 17, 2023, 12:31:20 PM10/17/23
to django-...@googlegroups.com
#34903: Parallel test runner failure on Windows
-----------------------------------+--------------------------------------

Reporter: David Smith | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 4.2
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Simon Charette):

* cc: David, Sanders (removed)
* cc: David Sanders (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/34903#comment:1>

Django

unread,
Oct 17, 2023, 5:07:45 PM10/17/23
to django-...@googlegroups.com
#34903: Parallel test runner failure on Windows
-----------------------------------+------------------------------------
Reporter: David Smith | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: dev
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* version: 4.2 => dev
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted


Comment:

I guess we can revert 2128a73713735fb794ca6565fd5d7792293f5cfa.

--
Ticket URL: <https://code.djangoproject.com/ticket/34903#comment:2>

Django

unread,
Oct 17, 2023, 7:06:45 PM10/17/23
to django-...@googlegroups.com
#34903: Parallel test runner failure on Windows
-----------------------------------+------------------------------------
Reporter: David Smith | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: dev
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------

Comment (by David Sanders):

Yep that is an option but I'd like to investigate why the worker is trying
to open databases that don't exist 🤔 (provided I can setup a Windows VM)

--
Ticket URL: <https://code.djangoproject.com/ticket/34903#comment:3>

Django

unread,
Oct 17, 2023, 10:40:55 PM10/17/23
to django-...@googlegroups.com
#34903: Parallel test runner failure on Windows
-------------------------------------+-------------------------------------
Reporter: David Smith | Owner: David
| Sanders
Type: Bug | Status: assigned

Component: Testing framework | Version: dev
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by David Sanders):

* owner: nobody => David Sanders
* status: new => assigned
* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/34903#comment:4>

Django

unread,
Oct 19, 2023, 11:58:27 PM10/19/23
to django-...@googlegroups.com
#34903: Parallel test runner failure on Windows
-------------------------------------+-------------------------------------
Reporter: David Smith | Owner: David
| Sanders
Type: Bug | Status: assigned
Component: Testing framework | Version: dev
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/34903#comment:5>

Django

unread,
Oct 22, 2023, 11:41:48 PM10/22/23
to django-...@googlegroups.com
#34903: Parallel test runner failure on Windows
-------------------------------------+-------------------------------------
Reporter: David Smith | Owner: David
| Sanders
Type: Bug | Status: closed

Component: Testing framework | Version: dev
Severity: Release blocker | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"68d0159b6dfce07f144045d56639c52066e8b90e" 68d0159b]:
{{{
#!CommitTicketReference repository=""
revision="68d0159b6dfce07f144045d56639c52066e8b90e"
Fixed #34903, Refs #34825 -- Made workers initialization respect empty set
of used connections.

Thanks to David Smith for the investigation & patch.

Regression in 2128a73713735fb794ca6565fd5d7792293f5cfa.
Follow up to a5905b164dbf52e59fa646af9c3d523c0804d86a.

Co-authored-by: David Sanders <shang.xia...@gmail.com>
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34903#comment:6>

Django

unread,
Oct 22, 2023, 11:43:29 PM10/22/23
to django-...@googlegroups.com
#34903: Parallel test runner failure on Windows
-------------------------------------+-------------------------------------
Reporter: David Smith | Owner: David
| Sanders
Type: Bug | Status: closed
Component: Testing framework | Version: dev
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"08aa336af46f30a29577a96588eeb3b440cd6dad" 08aa336a]:
{{{
#!CommitTicketReference repository=""
revision="08aa336af46f30a29577a96588eeb3b440cd6dad"
[5.0.x] Fixed #34903, Refs #34825 -- Made workers initialization respect


empty set of used connections.

Thanks to David Smith for the investigation & patch.

Regression in 2128a73713735fb794ca6565fd5d7792293f5cfa.
Follow up to a5905b164dbf52e59fa646af9c3d523c0804d86a.

Co-authored-by: David Sanders <shang.xia...@gmail.com>
Backport of 68d0159b6dfce07f144045d56639c52066e8b90e from main
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34903#comment:7>

Django

unread,
Oct 22, 2023, 11:44:31 PM10/22/23
to django-...@googlegroups.com
#34903: Parallel test runner failure on Windows
-------------------------------------+-------------------------------------
Reporter: David Smith | Owner: David
| Sanders
Type: Bug | Status: closed
Component: Testing framework | Version: dev
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/34903#comment:8>

Reply all
Reply to author
Forward
0 new messages