mantidproject / mantid

Main repository for Mantid code
https://www.mantidproject.org
GNU General Public License v3.0
207 stars 122 forks source link

Fix deadlock that is maybe causing test to occasionally fail in PythonChannelTest #37525

Closed rosswhitfield closed 2 weeks ago

rosswhitfield commented 2 weeks ago

Description of work

Following on from #36326 I found another place that a deadlock can occur that is most probably the reason for the test failures as related to #37366. The changes in #37427 didn't fully address the issue.

We need to release GIL before doing ConfigService::getString as it will log to debug if the key doesn't exist and this is called in simpleapi.py. You may need to read the description from #36326 to fully understand the issue.

Summary of work

Fixes #xxxx.

Further detail of work

To test:

It is hard to reproduce the failing test, I ran the following for over an hour for it to happen. This will continuously run the command until it fails.

while ./systemtest -R PythonChannel --quiet --output-on-failure ; do :; done

This does not require release notes because this issue hasn't been observed by users and is only to stabilize a test


Reviewer

Please comment on the points listed below (full description). Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.

Code Review

Functional Tests

Does everything look good? Mark the review as Approve. A member of @mantidproject/gatekeepers will take care of it.

Gatekeeper

If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.

rosswhitfield commented 2 weeks ago

Thanks. Hopefully this will fix the problem, time will tell.