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

The ARM binary does not run on RHEL based ARM platform #1410

Closed
kappa-wingman opened this issue Jun 19, 2021 · 8 comments · Fixed by #1666
Closed

The ARM binary does not run on RHEL based ARM platform #1410

kappa-wingman opened this issue Jun 19, 2021 · 8 comments · Fixed by #1666
Labels
bug Something isn't working as expected
Projects
Milestone

Comments

@kappa-wingman
Copy link
Contributor

~/meilisearch-linux-armv8
: Unsupported system page size
: Unsupported system page size
memory allocation of 4 bytes failed
Aborted (core dumped)

For ARM platform, the page size for Ubuntu is 4KB.
The page szie for RHEL based Linux is 64KB.

Related info:
jemalloc/jemalloc#467
fluent/fluent-package-builder#176

@kappa-wingman
Copy link
Contributor Author

I compile it from source and I could run it but found another problem. Track it on #1411.

@curquiza curquiza added the bug Something isn't working as expected label Jun 20, 2021
@curquiza
Copy link
Member

Hello @kappa-wingman!! 🙂
Make the binary work for RHEL is not planned at the moment. You will need to compile from the source.

However we have a public roadmap where our users can share their ideas and their needs. It would be awesome if you can add your need so that other users will upvote it if they need it as well.
https://roadmap.meilisearch.com/tabs/5-ideas

I close this issue!

@kappa-wingman
Copy link
Contributor Author

Hello Clémentine 🙂

It should be simple to make ARM binary to be 'universal' that could run on all ARM OS.
I have been using Caddy and Goat Counter from the release in GitHub without the need of compiling them.

From what I understand from this issue, using '--with-lg-page=16' when compiling jemalloc could solve the problem.

@curquiza
Copy link
Member

curquiza commented Jul 1, 2021

@MarinPostma or @irevoire, WDYT?

@curquiza curquiza reopened this Jul 1, 2021
@kappa-wingman
Copy link
Contributor Author

kappa-wingman commented Jul 1, 2021

Hello all

Since it use jemalloc-sys, it could use the environment variable "JEMALLOC_SYS_WITH_LG_PAGE=16" (https://docs.rs/crate/jemalloc-sys/0.3.2), which is similar to '--with-lg-page=16 for jemalloc).

I had forked the Meiliesearch and tried some GitHub Actions. The resulting binary could be run on AWS AMI 2 (4KB pagsize) and another ARM platform with RHEL (64KB pagesize). But I did not done any testing or know any performance implications.

Below is the GitHub actions for reference
I also updated the uraimo/run-on-arch-action version, the old version can't take the 'env' parameter)
Finally, for the updated version, it also complained about architecture and distribution parameters are not valid. Also, I am not familiar with a GitHub actions, so it save the binary to as artifact and won't upload the resulting binary to the package release.

on:
  release:
    types: [published]

name: Publish binaries to release

jobs:
  publish-armv8:
    name: Publish for ARMv8
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@v1.0.0
      - uses: uraimo/run-on-arch-action@v2.0.10
        id: runcmd
        with:
          architecture: aarch64 # aka ARMv8
          distribution: ubuntu18.04
          env: |
            JEMALLOC_SYS_WITH_LG_PAGE: 16
          run: |
            apt update
            apt install -y curl gcc make
            curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable
            source $HOME/.cargo/env
            cargo build --release --locked
      - name: Upload the binary to release
        uses: actions/upload-artifact@v1
        with:
          name: meilisearch-linux-armv8
          path: target/release/meilisearch

@kappa-wingman
Copy link
Contributor Author

BTW, as a side note, the GitHub actions took about two hours to build the ARMv8 binary.

@curquiza curquiza added this to Candidate in Bug triage via automation Aug 10, 2021
@curquiza curquiza moved this from Candidate to Bugs - severity 4 in Bug triage Aug 10, 2021
@curquiza
Copy link
Member

curquiza commented Sep 1, 2021

Hello @kappa-wingman, so sorry for the delay on this issue!

Is it possible you submit a PR so that we can test? :)

kappa-wingman added a commit to kappa-wingman/MeiliSearch that referenced this issue Sep 2, 2021
@kappa-wingman
Copy link
Contributor Author

kappa-wingman commented Sep 2, 2021

@curquiza , PR #1666 is created for the fix, please review :)
Please note I can't fully run the GH actions because I don't have the (same setup) for releasing binary for Meilisearch. As I have said before (on 1 July), I use the save artifact to test the proposed fix.

@curquiza curquiza linked a pull request Sep 14, 2021 that will close this issue
@curquiza curquiza added this to the v0.23.0 milestone Sep 14, 2021
bors bot added a commit that referenced this issue Sep 15, 2021
1666: Proposed fix for ARM binary on RHEL r=irevoire a=kappa-wingman

#1410

Co-authored-by: Kappa Wingman <64772920+kappa-wingman@users.noreply.github.com>
@bors bors bot closed this as completed in #1666 Sep 15, 2021
Bug triage automation moved this from Bugs - severity 4 to Done Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants