parasail-python icon indicating copy to clipboard operation
parasail-python copied to clipboard

Test failures on arm64

Open nileshpatra opened this issue 5 years ago • 7 comments

Hi, currently the tests for parasail-python segfault on arm64. I've no clue for the reason behind it. Please consider fixing it at the earliest.

Log:

I: pybuild base:232: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9/build; python3.9 -m pytest tests
============================= test session starts ==============================
platform linux -- Python 3.9.1rc1, pytest-4.6.11, py-1.9.0, pluggy-0.13.0
rootdir: /<<PKGBUILDDIR>>
collected 16 items

tests/test_basic.py ...Segmentation fault
E: pybuild pybuild:353: test: plugin distutils failed with: exit code=139: cd /

nileshpatra avatar Dec 06 '20 18:12 nileshpatra

cc: @iiSeymour @jeffdaily

nileshpatra avatar Dec 06 '20 19:12 nileshpatra

Can you confirm whether any vector ISA was found during the build process? When I tried adding more manylinux builds, I started seeing this seg fault as well. My initial hunch is that no vectorized instructions were detected during configuration of the C library, and the test_basic.py tries to make use of a vectorized routine that doesn't exist. It's just a hunch at the moment.

jeffdaily avatar Feb 07 '21 01:02 jeffdaily

Hi,

Can you confirm whether any vector ISA was found during the build process?

How do I check that exactly? (I didn't see anything unusual in the build log)

You can find complete logs here:

http://qa-logs.debian.net/2020/12/05/python-parasail_1.2.1-1_unstable.log

When I tried adding more manylinux builds, I started seeing this seg fault as well. My initial hunch is that no vectorized instructions were detected during configuration of the C library, and the test_basic.py tries to make use of a vectorized routine that doesn't exist. It's just a hunch at the moment.

Does it use SIMD intrinsics specific to only amd64 at some places?

nileshpatra avatar Feb 07 '21 04:02 nileshpatra

Hi @jeffdaily,

Any update about this issue? :)

Thanks!

eamanu avatar Mar 26 '21 13:03 eamanu

Though this issue is filed under the python bindings, it's really an issue with the C library. It seems that on some platforms parasail is failing to find a vector ISA that it can compile for. This is a build-time check. Then there's a bug in parasail's ISA dispatcher where it doesn't have a graceful fallback when no vector ISA is available, and seg faults.

I think I've got a fix to add the graceful fallback in the C library. But I'm just as concerned that the fallback would hide the fact a vector ISA wasn't found. That would be hiding a performance bug. I don't have a solution for that one yet.

jeffdaily avatar Mar 29 '21 05:03 jeffdaily

@jeffdaily,

I was looking to add linux aarch64 wheels to the CI. Should this be trivially possible now?

cjw85 avatar Sep 28 '23 17:09 cjw85

Should be? I would just double-check the logs and make sure it's still picking up neon as the vector ISA. Contributions welcome.

jeffdaily avatar Sep 28 '23 21:09 jeffdaily