Bug 1212264 - Segmentation fault in some python packages using numba
Summary: Segmentation fault in some python packages using numba
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Python (show other bugs)
Version: Current
Hardware: aarch64 openSUSE Tumbleweed
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Python maintainers (group account)
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-13 07:53 UTC by Guillaume GARDET
Modified: 2023-06-21 09:03 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume GARDET 2023-06-13 07:53:16 UTC
Lately, we had lots of segmentation faults in some python packages in openSUSE Tumbleweed aarch64. It seems they are all using numba.
Few occurrences: python-quimb python-awkward

Error log:
[  351s] tests/test_accel.py::TestDot::test_par_dot_csr_matvec Fatal Python error: /var/tmp/rpm-tmp.mOlv8y: line 152:  2030 Segmentation fault      PYTHONPATH=${PYTHONPATH:+$PYTHONPATH:}/home/abuild/rpmbuild/BUILDROOT/python-quimb-1.4.2-4.1.aarch64/usr/lib/python3.9/site-packages PYTHONDONTWRITEBYTECODE=1 pytest-3.9 --ignore=_build.python39 --ignore=_build.python311 --ignore=_build.python310 -v -k "not (test_subtract_update and float32)"
[  351s] error: Bad exit status from /var/tmp/rpm-tmp.mOlv8y (%check)

Latest status:
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:ARM/python-quimb/standard/aarch64
Comment 1 Guillaume GARDET 2023-06-13 07:57:36 UTC
It seems to be caused by an llvm issue: 
https://github.com/llvm/llvm-project/issues/61402
https://reviews.llvm.org/rG2e1b838a889f9793d4bcd5dbfe10db9796b77143

The commit is only in the main branch and not part of any release yet: https://github.com/llvm/llvm-project/commit/2e1b838a889f9793d4bcd5dbfe10db9796b77143

So, this would need to be backported to llvm14 (version currently used by python-llvmlite) and later (currently 15 and 16).
Comment 2 Markéta Machová 2023-06-13 12:22:20 UTC
Adding the maintainer of LLVM.
Comment 3 Guillaume GARDET 2023-06-14 07:02:57 UTC
(In reply to Guillaume GARDET from comment #1)
> It seems to be caused by an llvm issue: 
> https://github.com/llvm/llvm-project/issues/61402
> https://reviews.llvm.org/rG2e1b838a889f9793d4bcd5dbfe10db9796b77143
> 
> The commit is only in the main branch and not part of any release yet:
> https://github.com/llvm/llvm-project/commit/
> 2e1b838a889f9793d4bcd5dbfe10db9796b77143
> 
> So, this would need to be backported to llvm14 (version currently used by
> python-llvmlite) and later (currently 15 and 16).

I confirm this patch in llvm14 fixes python-numba:test-py3* and python-quimb (and likely few others)

SR for llvm14: https://build.opensuse.org/request/show/1093062
Comment 4 Aaron Puchert 2023-06-14 19:56:12 UTC
(In reply to Guillaume GARDET from comment #1)
> So, this would need to be backported to llvm14 (version currently used by
> python-llvmlite) and later (currently 15 and 16).

Perhaps llvmlite will switch to ORC JIT before they switch to LLVM 15/16. Maybe we can get an upstream backport to LLVM 16, but I've heard that today's release is going to be the last one for LLVM 16.

(In reply to Guillaume GARDET from comment #3)
> SR for llvm14: https://build.opensuse.org/request/show/1093062

Forwarded to Factory: https://build.opensuse.org/request/show/1093168. Thanks!
Comment 5 OBSbugzilla Bot 2023-06-16 02:05:02 UTC
This is an autogenerated message for OBS integration:
This bug (1212264) was mentioned in
https://build.opensuse.org/request/show/1093400 Factory / llvm14
Comment 6 Guillaume GARDET 2023-06-20 06:22:31 UTC
Fix merged in Factory project and rebuilds triggered.