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

arm64: mremap size mismatch #32

Open
vielmetti opened this issue Dec 9, 2021 · 6 comments
Open

arm64: mremap size mismatch #32

vielmetti opened this issue Dec 9, 2021 · 6 comments

Comments

@vielmetti
Copy link

"charm kv" is not working right on an arm64 system (Raspberry Pi, Debian Buster).

> charm kv list
foo     bar
~ ......................................................................................................................
> charm kv set foo baz
Error: while opening memtables error: while opening fid: 3 error: while updating skiplist error: mremap size mismatch: r
Usage:
  charm kv set KEY[@DB] VALUE [flags]

Flags:
  -h, --help   help for set

Error: while opening memtables error: while opening fid: 5 error: while updating skiplist error: mremap size mismatch: requested: 72 got: 134217728

Not really sure what's going on, but it has a strong smell of being this:

https://discuss.dgraph.io/t/error-mremap-size-mismatch-on-arm64/15333

for which a similar issue has this patch:

dgraph-io/ristretto#281

@gera
Copy link

gera commented Apr 2, 2022

I can confirm the same issue on and Android phone (arm64) on Termux.

@enkeyz
Copy link
Contributor

enkeyz commented May 5, 2022

Charm KV uses BadgerDB under the hood, I'd take this issue there: https://github.com/dgraph-io/badger

@idevcde
Copy link

idevcde commented May 30, 2022

Hi, same here, self-hosting attempt, charm version v0.12.1 and skate version v0.2.0, ARM64 (Neoverse-N1), Oracle Linux 8.6:

$ skate set key value
$ skate list
Error: while opening memtables error: while opening fid: 1 error: while updating skiplist error: mremap size mismatch: requested: 89 got: 134217728

EDIT:
I did some additional tests. It seems that the first call to the database is ok, however, next calls result in above mentioned Error. The situation is the same, no matter if self-hosted or if accessing charm.cloud.sh. I have to admit that I do not know much about BadgerDB, thus I will allow to ask, @enkeyz would you pls consider coordinating the efforts that could lead to the solution and to full operation of charm / skate ... on Arm platforms?

@dezren39
Copy link
Contributor

can someone confirm this is not a charm issue? I will open a badger issue, but would prefer someone who knows the code to confirm. maybe they can update the badger db minor or something and that will help? i thought badger supported arm64.

@dezren39
Copy link
Contributor

dezren39 commented Oct 29, 2023

nevermind i'm not waiting another year and a half :-)

confirmed charm is using the latest version of v3, i'm not sure i'm prepared to try a major version upgrade and even if it worked locally i don't know if that's in the cards for the cloud backend. at this point, i've traced through charm/kv until it's calling db.open etc inside badger. it's likely in there, and they haven't fixed it in any v3 version. maybe v4 has a fix, or it's unpatched altogether-- despite similarities to dgraph-io/ristretto#281
and that fix got patched into badger in https://github.com/dgraph-io/badger/releases/tag/v3.2103.3

@dezren39
Copy link
Contributor

dezren39 commented Feb 6, 2024

in the interim since last update, this merged into ristretto:

there isn't a tag for it yet, here is a ticket for the tag:

and then also the ristretto update needs to make it into badger:

this change could resolve both these issues:

i don't have time today, but if one wanted to manually update their fork of badger to use latest main branch of ristretto-- they could test whether this resolves right now.

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

5 participants