Title: [Bug]: test_other_signal_before_sigint fails with Qt on macOS CI · Issue #27984 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: test_other_signal_before_sigint fails with Qt on macOS CI · Issue #27984 · matplotlib/matplotlib
X Title: [Bug]: test_other_signal_before_sigint fails with Qt on macOS CI · Issue #27984 · matplotlib/matplotlib
Description: Bug summary We've previously not been installing Qt wrappers such as PyQt6 or PySide. #27723 adds those back, but we have discovered that test_other_signal_before_sigint fails on CI. The subprocess appears to segfault somewhere in the Qt...
Open Graph Description: Bug summary We've previously not been installing Qt wrappers such as PyQt6 or PySide. #27723 adds those back, but we have discovered that test_other_signal_before_sigint fails on CI. The subprocess...
X Description: Bug summary We've previously not been installing Qt wrappers such as PyQt6 or PySide. #27723 adds those back, but we have discovered that test_other_signal_before_sigint fails on CI. The subpro...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/27984
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: test_other_signal_before_sigint fails with Qt on macOS CI","articleBody":"### Bug summary\n\nWe've previously not been installing Qt wrappers such as PyQt6 or PySide. #27723 adds those back, but we have discovered that `test_other_signal_before_sigint` fails on CI. The subprocess appears to segfault somewhere in the Qt event loop.\r\n\r\nI had tried to debug it with https://github.com/matplotlib/matplotlib/commit/c1afbac74d6b64ced2954cb3d68b1ed79c0af6bd, but then it stopped failing. Reverting that change then failed again, though one time it passed. So this seems to be fairly flaky.\r\n\r\nI went through all CI runs, and found that this is not particularly limited to any parametrization:\r\n```\r\n 4 _ test_other_signal_before_sigint[show-kwargs0-MPLBACKEND=qtcairo-QT_API=PyQt6-BACKEND_DEPS=PyQt6,cairocffi] _\r\n 3 _ test_other_signal_before_sigint[show-kwargs0-MPLBACKEND=qtcairo-QT_API=PySide6-BACKEND_DEPS=PySide6,cairocffi] _\r\n 3 _ test_other_signal_before_sigint[show-kwargs0-MPLBACKEND=qtcairo-QT_API=PyQt5-BACKEND_DEPS=PyQt5,cairocffi] _\r\n 3 _ test_other_signal_before_sigint[show-kwargs0-MPLBACKEND=qtagg-QT_API=PyQt6-BACKEND_DEPS=PyQt6] _\r\n 2 _ test_other_signal_before_sigint[show-kwargs0-MPLBACKEND=qtcairo-QT_API=PySide2-BACKEND_DEPS=PySide2,cairocffi] _\r\n 2 _ test_other_signal_before_sigint[show-kwargs0-MPLBACKEND=qtagg-QT_API=PySide6-BACKEND_DEPS=PySide6] _\r\n 1 _ test_other_signal_before_sigint[show-kwargs0-MPLBACKEND=qtagg-QT_API=PySide2-BACKEND_DEPS=PySide2] _\r\n```\r\n\r\nUnfortunately, I don't think @tacaswell was able to reproduce the crash, and @ksunden was only able to reproduce once, but only as part of a full test suite, and never again later in a smaller run.\r\n\r\nSo as part of #27723, I've marked these as `xfail`, but if we can figure out a way to reproduce, we should be able to fix this.\n\n### Code for reproduction\n\n```Python\npytest -k test_other_signal_before_sigint lib/matplotlib/tests/test_backends_interactive.py\n```\n\n\n### Actual outcome\n\n```\r\n_ test_other_signal_before_sigint[show-kwargs0-MPLBACKEND=qtagg-QT_API=PySide6-BACKEND_DEPS=PySide6] _\r\n[gw1] darwin -- Python 3.12.2 /Library/Frameworks/Python.framework/Versions/3.12/bin/python\r\n\r\nenv = {'BACKEND_DEPS': 'PySide6', 'MPLBACKEND': 'qtagg', 'QT_API': 'PySide6'}\r\ntarget = 'show', kwargs = {'block': True}\r\nrequest = \u003cFixtureRequest for \u003cFunction test_other_signal_before_sigint[show-kwargs0-MPLBACKEND=qtagg-QT_API=PySide6-BACKEND_DEPS=PySide6]\u003e\u003e\r\n\r\n @pytest.mark.skipif(sys.platform == 'win32',\r\n reason='No other signal available to send on Windows')\r\n @pytest.mark.parametrize(\"env\", _get_testable_interactive_backends())\r\n @pytest.mark.parametrize(\"target, kwargs\", [\r\n ('show', {'block': True}),\r\n ('pause', {'interval': 10})\r\n ])\r\n def test_other_signal_before_sigint(env, target, kwargs, request):\r\n backend = env.get(\"MPLBACKEND\")\r\n if not backend.startswith((\"qt\", \"macosx\")):\r\n pytest.skip(\"SIGINT currently only tested on qt and macosx\")\r\n if backend == \"macosx\":\r\n request.node.add_marker(pytest.mark.xfail(reason=\"macosx backend is buggy\"))\r\n proc = _WaitForStringPopen(\r\n [sys.executable, \"-c\",\r\n inspect.getsource(_test_other_signal_before_sigint_impl) +\r\n \"\\n_test_other_signal_before_sigint_impl(\"\r\n f\"{backend!r}, {target!r}, {kwargs!r})\"])\r\n try:\r\n proc.wait_for('DRAW')\r\n os.kill(proc.pid, signal.SIGUSR1)\r\n proc.wait_for('SIGUSR1')\r\n os.kill(proc.pid, signal.SIGINT)\r\n stdout, _ = proc.communicate(timeout=_test_timeout)\r\n except Exception:\r\n proc.kill()\r\n stdout, _ = proc.communicate()\r\n raise\r\n print(stdout)\r\n\u003e assert 'SUCCESS' in stdout\r\nE AssertionError\r\n\r\n/Users/runner/work/matplotlib/matplotlib/lib/matplotlib/tests/test_backends_interactive.py:790: AssertionError\r\n----------------------------- Captured stdout call -----------------------------\r\n\r\n----------------------------- Captured stderr call -----------------------------\r\nFatal Python error: Segmentation fault\r\n\r\nCurrent thread 0x00000001d88a9c40 (most recent call first):\r\n File \"/Users/runner/work/matplotlib/matplotlib/lib/matplotlib/backends/qt_compat.py\", line 159 in _exec\r\n File \"/Users/runner/work/matplotlib/matplotlib/lib/matplotlib/backends/backend_qt.py\", line 633 in start_main_loop\r\n File \"/Users/runner/work/matplotlib/matplotlib/lib/matplotlib/backend_bases.py\", line 3536 in show\r\n File \"/Users/runner/work/matplotlib/matplotlib/lib/matplotlib/pyplot.py\", line 590 in show\r\n File \"\u003cstring\u003e\", line 21 in _test_other_signal_before_sigint_impl\r\n File \"\u003cstring\u003e\", line 25 in \u003cmodule\u003e\r\n\r\nExtension modules: numpy.core._multiarray_umath, numpy.core._multiarray_tests, numpy.linalg._umath_linalg, numpy.fft._pocketfft_internal, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, PIL._imaging, kiwisolver._cext, PyQt6.QtCore, PyQt6.QtGui, PyQt6.QtWidgets (total: 18)\r\n```\n\n### Expected outcome\n\nTests pass\n\n### Additional information\n\n_No response_\n\n### Operating system\n\nmacOS\n\n### Matplotlib Version\n\nmain\n\n### Matplotlib Backend\n\nQtAgg\n\n### Python version\n\n3.10 or 3.12\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\ngit checkout","author":{"url":"https://github.com/QuLogic","@type":"Person","name":"QuLogic"},"datePublished":"2024-03-28T00:46:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/27984/matplotlib/issues/27984"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cc76a7dd-d235-7373-fd62-d5fe8c9a5b5a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9FC6:2FB9D6:97CA64:CC8B9F:6A5292D5 |
| html-safe-nonce | 7b18b24e9f5b868ba22d836629ea2546387b5c92c4ee80dce2d89508b3ccea8d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkM2OjJGQjlENjo5N0NBNjQ6Q0M4QjlGOjZBNTI5MkQ1IiwidmlzaXRvcl9pZCI6IjM1NjI0MDExMDU3OTQyMDg0NjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e536a4570356f5a616fcf8fa36b99ae098fd5b606616b6524e9fac896fd7a843 |
| hovercard-subject-tag | issue:2212134450 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/27984/issue_layout |
| twitter:image | https://opengraph.githubassets.com/803d83f669990a7ed0896448a12297cb4663bee0d47a8296fae1fe3b8b89082c/matplotlib/matplotlib/issues/27984 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/803d83f669990a7ed0896448a12297cb4663bee0d47a8296fae1fe3b8b89082c/matplotlib/matplotlib/issues/27984 |
| og:image:alt | Bug summary We've previously not been installing Qt wrappers such as PyQt6 or PySide. #27723 adds those back, but we have discovered that test_other_signal_before_sigint fails on CI. The subprocess... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | QuLogic |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width