cairocffi icon indicating copy to clipboard operation
cairocffi copied to clipboard

test_xcb tests are considered too unstable

Open mcepl opened this issue 1 year ago • 5 comments

While packaging this packaging for openSUSE, we have repeated problems with stability of tests, particularly tests in the module test_xcb.

See build log pro erorr messages, and list of all packages used.

mcepl avatar Aug 20 '22 21:08 mcepl

Related to this issue: test_xcb_window sometimes crashes on Python 3.10 64 bit (the failure wasn't observed on 32 bit neither on older pythons):

[   67s] ============================= test session starts ==============================
[   67s] platform linux -- Python 3.10.7, pytest-7.1.2, pluggy-1.0.0
[   67s] rootdir: /home/abuild/rpmbuild/BUILD/cairocffi-1.4.0, configfile: setup.cfg
[   67s] collected 54 items
[   67s] 
[   67s] test_cairo.py ...........XXXX.X.XX..........................             [ 85%]
[   67s] test_numpy.py .                                                          [ 87%]
[   67s] test_pixbuf.py .x...                                                     [ 96%]
[   67s] test_xcb.py .Fatal Python error: Segmentation fault
[   67s] 
[   67s] Current thread 0x00007fffae373c40 (most recent call first):
[   67s]   File "/home/abuild/rpmbuild/BUILDROOT/python-cairocffi-1.4.0-62.1.ppc64le/usr/lib/python3.10/site-packages/cairocffi/xcb.py", line 37 in __init__
[   67s]   File "/home/abuild/rpmbuild/BUILD/cairocffi-1.4.0/tests/test_xcb.py", line 181 in test_xcb_window
[   67s]   File "/usr/lib/python3.10/site-packages/_pytest/python.py", line 192 in pytest_pyfunc_call
[   67s]   File "/usr/lib/python3.10/site-packages/pluggy/_callers.py", line 39 in _multicall
[   67s]   File "/usr/lib/python3.10/site-packages/pluggy/_manager.py", line 80 in _hookexec
[   67s]   File "/usr/lib/python3.10/site-packages/pluggy/_hooks.py", line 265 in __call__
[   67s]   File "/usr/lib/python3.10/site-packages/_pytest/python.py", line 1761 in runtest
[   67s]   File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 166 in pytest_runtest_call
[   67s]   File "/usr/lib/python3.10/site-packages/pluggy/_callers.py", line 39 in _multicall
[   67s]   File "/usr/lib/python3.10/site-packages/pluggy/_manager.py", line 80 in _hookexec
[   67s]   File "/usr/lib/python3.10/site-packages/pluggy/_hooks.py", line 265 in __call__
[   67s]   File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 259 in <lambda>
[   67s]   File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 338 in from_call
[   67s]   File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 258 in call_runtest_hook
[   67s]   File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 219 in call_and_report
[   67s]   File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 130 in runtestprotocol
[   67s]   File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 111 in pytest_runtest_protocol
[   67s]   File "/usr/lib/python3.10/site-packages/pluggy/_callers.py", line 39 in _multicall
[   67s]   File "/usr/lib/python3.10/site-packages/pluggy/_manager.py", line 80 in _hookexec
[   67s]   File "/usr/lib/python3.10/site-packages/pluggy/_hooks.py", line 265 in __call__
[   67s]   File "/usr/lib/python3.10/site-packages/_pytest/main.py", line 347 in pytest_runtestloop
[   67s]   File "/usr/lib/python3.10/site-packages/pluggy/_callers.py", line 39 in _multicall
[   67s]   File "/usr/lib/python3.10/site-packages/pluggy/_manager.py", line 80 in _hookexec
[   67s]   File "/usr/lib/python3.10/site-packages/pluggy/_hooks.py", line 265 in __call__
[   67s]   File "/usr/lib/python3.10/site-packages/_pytest/main.py", line 322 in _main
[   67s]   File "/usr/lib/python3.10/site-packages/_pytest/main.py", line 268 in wrap_session
[   67s]   File "/usr/lib/python3.10/site-packages/_pytest/main.py", line 315 in pytest_cmdline_main
[   67s]   File "/usr/lib/python3.10/site-packages/pluggy/_callers.py", line 39 in _multicall
[   67s]   File "/usr/lib/python3.10/site-packages/pluggy/_manager.py", line 80 in _hookexec
[   67s]   File "/usr/lib/python3.10/site-packages/pluggy/_hooks.py", line 265 in __call__
[   67s]   File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 164 in main
[   67s]   File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 187 in console_main
[   67s]   File "/usr/lib/python3.10/site-packages/pytest/__main__.py", line 5 in <module>
[   67s]   File "/usr/lib64/python3.10/runpy.py", line 86 in _run_code
[   67s]   File "/usr/lib64/python3.10/runpy.py", line 196 in _run_module_as_main
[   67s] 
[   67s] Extension modules: _cffi_backend, PIL._imaging, PIL._imagingcms, lxml._elementpath, lxml.etree, numpy.core._multiarray_umath, numpy.core._multiarray_tests, numpy.linalg.lapack_lite, 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 (total: 19)
[   67s] /usr/bin/xvfb-run: line 168:  1947 Segmentation fault      DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1

MeggyCal avatar Sep 27 '22 16:09 MeggyCal

... now it crashed on Python 3.9. It is just unstable.

MeggyCal avatar Sep 27 '22 17:09 MeggyCal

We already tried to fix this problem in https://github.com/Kozea/cairocffi/issues/85, but it looks like it’s back.

We sometimes have the problem on GitHub Actions, but only on Windows. If it fails elsewhere, then it’s probably a problem in our code. If someone is motivated to use a debugger to see where the problem comes from, it would be very useful.

liZe avatar Sep 27 '22 20:09 liZe

@MeggyCal is my colleague at SUSE, so obviously this has nothing to do with Windows.

mcepl avatar Sep 27 '22 21:09 mcepl

@MeggyCal is my colleague at SUSE, so obviously this has nothing to do with Windows.

Yes, I’ve seen the tracebacks, and that’s really sad because I didn’t see this problem happen on Linux since #85 😢️.

liZe avatar Sep 27 '22 21:09 liZe