Skip to content

Misc improvements for distributed tests#22687

Merged
vepadulano merged 8 commits into
root-project:masterfrom
vepadulano:rdf-roottest-distributed-failures
Jun 25, 2026
Merged

Misc improvements for distributed tests#22687
vepadulano merged 8 commits into
root-project:masterfrom
vepadulano:rdf-roottest-distributed-failures

Conversation

@vepadulano

Copy link
Copy Markdown
Member

See each commit for details

The connection object (i.e. a Dask Client wrapping a LocalCluster) created for
running the distributed RDataFrame test suite is now better managed at the end
of the test run.

Sporadically, the following Python error was seen at the end of a perfectly fine
test suite run:
```
Traceback (most recent call last):
  File "/usr/lib64/python3.14/logging/__init__.py", line 1154, in emit
    stream.write(msg + self.terminator)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
ValueError: I/O operation on closed file.
```

The cause for the error may be due to the fact that pytest is shutting down the
Python process, thus also closing the streams, but some Dask workers may still
be trying to write logging outputs to them.

In general, closing a Client connection but not closing also the attached
cluster can lead to inconsistencies in the target application, as highlighted
e.g. by dask/distributed#1042.

Unfortunately, the interaction between Client, cluster and garbage collection
seems to be neither straightforward nor completely understood even by the Dask
community itself, see for example
https://dask.discourse.group/t/best-practice-for-shutting-down-a-cluster/.
Moving to ROOT_ADD_PYUNITTEST simplifies how the suite of distributed tests is run, i.e. it simply runs it as `python test_all.py`. This shows the output from the pytest suite as if it were run manually, as desired, without interference from the roottest machinery around it introduced with the previous ROOTTEST_ADD_TEST.
@vepadulano vepadulano force-pushed the rdf-roottest-distributed-failures branch from 4534119 to dfc41da Compare June 23, 2026 22:20
@vepadulano vepadulano requested a review from bellenot as a code owner June 23, 2026 22:20
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown

Test Results

    22 files      22 suites   2d 14h 52m 26s ⏱️
 3 874 tests  3 859 ✅   0 💤 15 ❌
76 282 runs  76 159 ✅ 108 💤 15 ❌

For more details on these failures, see this check.

Results for commit dfc41da.

♻️ This comment has been updated with latest results.

@vepadulano vepadulano closed this Jun 24, 2026
@vepadulano vepadulano reopened this Jun 24, 2026
@vepadulano vepadulano closed this Jun 25, 2026
@vepadulano vepadulano reopened this Jun 25, 2026
@vepadulano vepadulano closed this Jun 25, 2026
@vepadulano vepadulano reopened this Jun 25, 2026

@hageboeck hageboeck left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like useful cleanups to me. The nightlies will tell if this also affects the failures.

@vepadulano vepadulano merged commit acc1203 into root-project:master Jun 25, 2026
144 of 155 checks passed
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