Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macos fails rpython tests, performs poorly elsewhere #3784

Open
gitlab-importer opened this issue Jul 21, 2022 · 2 comments
Open

macos fails rpython tests, performs poorly elsewhere #3784

gitlab-importer opened this issue Jul 21, 2022 · 2 comments

Comments

@gitlab-importer
Copy link

In Heptapod by @mattip on Jul 21, 2022, 07:15

There are some strange rpython and own failures on macos. They make me doubt how well PyPy runs on macos, especially given the poor performance of macos wherever I see it used in CI, like in pytest-html (pure python, macos is way slower than windows which is slower than linux), or numpy (c-api, macos and windows are 2x slower than linux).

The failures are obvious when looking at the buildbot results on default, where macos-arm64 still has segfaults on jit/backend/aarch64/test tests and both macos-arm64 fail more rpython tests than windows.

I will note that the buildbot is using pypy2.7 as a host python for running tests, which might be causing some issues, even though windows has been running pypy2.7 as host ever since we migrated to 64-bit windows.

Any thoughts or suggestions how to move the needle on macos support?

@gitlab-importer
Copy link
Author

In Heptapod by @mattip on Jul 21, 2022, 12:52

For a few practical examples:
pypy pytest.py rpython/jit/metainterp/test/test_ajit.py -k time_clock
passes on linux,windows w/both pypy and cpython2, fails on macos w/pypy https://buildbot.pypy.org/summary/longrepr?testname=TestLLtype.'Reference to deleted milestone 28'%29.test_call_time_clock&builder=rpython-macosx-x86-64&build=7&mod=jit.metainterp.test.test_ajit

pypy pytest.py rpython/rlib/test/test_rposix.py -k fdlist fails two test only on macos x86_64, passes everywhere else. The failure is that the ctypes call is returning values in a struct different than the one expected so dirent.fd_name has the wrong offset and cuts one character off the beginning of the string.

@mattip
Copy link
Member

mattip commented Feb 8, 2024

Another data point: I can run the rpython/jit/backend/aarch64 tests with the jit off

% ../pypy2.7-HEAD/bin/pypy --jit off pytest.py rpython/jit/backend/aarch64/test/test_basic.py 
/Users/mattip/oss/pypy2.7-HEAD/site-packages/hypothesis/extra/pytestplugin.py:61: HypothesisWarning: 
        You are using Pytest version 2.9.2.  Hypothesis tests work with any test
        runner, but our Pytest plugin requires Pytest  4.3 or newer.
        Note that the Pytest developers no longer support this version either!
        Disabling the Hypothesis pytest plugin...
    
  warnings.warn(PYTEST_TOO_OLD_MESSAGE % (pytest.__version__,), HypothesisWarning)
[platform:msg] Set platform with 'host' cc=None, using cc='clang', version='Unknown'
========================================================================== test session starts ===========================================================================
platform darwin -- Python 2.7.18[pypy-7.3.13-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
pytest-2.9.2 from /Users/mattip/oss/pypy/pytest.pyc
rootdir: /Users/mattip/oss/pypy/rpython, inifile: pytest.ini
plugins: hypothesis-4.57.1
collected 194 items 

rpython/jit/backend/aarch64/test/test_basic.py .ss..........................................................................................................................................s................s..............s...........s........

but running the same thing with the jit on crashes. Running it under a debugger does not give much information to my eye:

% lldb -- ../pypy2.7-HEAD/bin/pypy pytest.py rpython/jit/backend/aarch64/test/test_basic.py
(lldb) target create "../pypy2.7-HEAD/bin/pypy"
Current executable set to '/Users/mattip/oss/pypy2.7-HEAD/bin/pypy' (arm64).
(lldb) settings set -- target.run-args  "pytest.py" "rpython/jit/backend/aarch64/test/test_basic.py"
(lldb) r
Process 33662 launched: '/Users/mattip/oss/pypy2.7-HEAD/bin/pypy' (arm64)
/Users/mattip/oss/pypy2.7-HEAD/site-packages/hypothesis/extra/pytestplugin.py:61: HypothesisWarning: 
        You are using Pytest version 2.9.2.  Hypothesis tests work with any test
        runner, but our Pytest plugin requires Pytest  4.3 or newer.
        Note that the Pytest developers no longer support this version either!
        Disabling the Hypothesis pytest plugin...
    
  warnings.warn(PYTEST_TOO_OLD_MESSAGE % (pytest.__version__,), HypothesisWarning)
[platform:msg] Set platform with 'host' cc=None, using cc='clang', version='Unknown'
============================= test session starts ==============================
platform darwin -- Python 2.7.18[pypy-7.3.13-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
pytest-2.9.2 from /Users/mattip/oss/pypy/pytest.pyc
rootdir: /Users/mattip/oss/pypy/rpython, inifile: pytest.ini
plugins: hypothesis-4.57.1
collected 194 items 

Process 33662 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x1000a7c20)
    frame #0: 0x00000001000a7c20
->  0x1000a7c20: stp    x30, x29, [sp, #-0x50]!
    0x1000a7c24: stp    x19, x20, [sp, #0x40]
    0x1000a7c28: ldr    x16, [x1, #0x48]
    0x1000a7c2c: str    x16, [sp, #0x20]
Target 0: (pypy) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x1000a7c20)
  * frame #0: 0x00000001000a7c20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants