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

Python Polars Import Fail on Aarch64 Linux #15549

Closed
2 tasks done
valemanji opened this issue Apr 8, 2024 · 10 comments
Closed
2 tasks done

Python Polars Import Fail on Aarch64 Linux #15549

valemanji opened this issue Apr 8, 2024 · 10 comments
Labels
bug Something isn't working build Changes that affect the build system or external dependencies python Related to Python Polars

Comments

@valemanji
Copy link

valemanji commented Apr 8, 2024

Checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of Polars.

Reproducible example

import polars

Log output

<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
memory allocation of 8 bytes failed
Aborted

Issue description

Hi yall, I tried importing polars but it fails with a jemalloc unsupported page size issue. I also attempted using polars-lts-cpu in my requirements.txt but that failed too.

Expected behavior

import polars throws no errors

Installed versions

0.20.18
@valemanji valemanji added bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars labels Apr 8, 2024
@valemanji
Copy link
Author

I noticed that a past user has had jemalloc issues that were closed namely: #5654. But using a new version has not helped me. Based on other github pages, it appears there are a lot of discussions about jemalloc on aarch64. In case you all are not already familiar, here are some links: facebook/buck2#91 and swc-project/swc#5967)

@valemanji valemanji changed the title Polars Import Fail on Aarch64 Linux Python Polars Import Fail on Aarch64 Linux Apr 9, 2024
@reswqa
Copy link
Collaborator

reswqa commented Apr 9, 2024

Maybe related: #15542.

@messense
Copy link
Contributor

Looks like JEMALLOC_SYS_WITH_LG_PAGE=16 isn't working:

- name: Set jemalloc for aarch64 Linux
if: matrix.architecture == 'aarch64' && matrix.os == 'ubuntu-latest'
run: |
echo "JEMALLOC_SYS_WITH_LG_PAGE=16" >> $GITHUB_ENV
- name: Build wheel
uses: PyO3/maturin-action@v1
with:
command: build
target: ${{ steps.target.outputs.target }}
args: >
--release
--manifest-path py-polars/Cargo.toml
--out dist
manylinux: ${{ matrix.architecture == 'aarch64' && '2_24' || 'auto' }}
, need to pass it to maturin-action because of Docker, for working example, see

@valemanji
Copy link
Author

valemanji commented Apr 13, 2024

@messense thanks for the links. Is this change one that can only be made at build time or is there an os environ variable that can be used to update it in the mean time.

@uuip
Copy link

uuip commented Apr 15, 2024

Looks like JEMALLOC_SYS_WITH_LG_PAGE=16 isn't working:

so I compile polars by myself.

@uuip
Copy link

uuip commented Apr 15, 2024

@stinodego Excuse me, do
you have time verify this problem?

@stinodego stinodego added the build Changes that affect the build system or external dependencies label Apr 15, 2024
@messense
Copy link
Contributor

need to pass it to maturin-action because of Docker

This is no longer required after PyO3/maturin-action@92c5bc6.

Can you try installing the latest polars release from PyPI?

@stinodego
Copy link
Member

Thanks for the fix @messense !

I'll close this issue for now as I assume it has been resolved. If you're still running into issues with Polars 0.20.22-rc.1 or later, please let me know, and I can re-open this issue.

@stinodego stinodego removed the needs triage Awaiting prioritization by a maintainer label Apr 17, 2024
@valemanji
Copy link
Author

@stinodego it works for me too. Thanks for the fix @messense

@shenquanle
Copy link

I encountered this problem too,my polars version is 0.18.4, and I solved this problem by upgrading the version of Polars to 0.20.31. hope my answer would help u.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build Changes that affect the build system or external dependencies python Related to Python Polars
Projects
None yet
Development

No branches or pull requests

6 participants