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

JEMALLOC_RETAIN defined cause memory allocate failed #110

Open
chenweihao1006 opened this issue Aug 15, 2023 · 3 comments
Open

JEMALLOC_RETAIN defined cause memory allocate failed #110

chenweihao1006 opened this issue Aug 15, 2023 · 3 comments

Comments

@chenweihao1006
Copy link

chenweihao1006 commented Aug 15, 2023

When I tried to run client and server of example, I got a message as follow:
thread 'tokio-runtime-worker' panicked at 'internal error: entered unreachable code: dalloc failed, check if JEMALLOC_RETAIN defined. If so, then please undefined it', src/mr_allocator.rs:485:13

I found that JEMALLOC_RETAIN is defined in C file inside tikv-jemalloc-sys, but there is no feature associated with this, so how could I un define it?

@GTwhy
Copy link
Collaborator

GTwhy commented Aug 16, 2023

Hi @chenweihao1006 , you can try to change JEMALLOC_SYS_WITH_MALLOC_CONF in config.toml to JEMALLOC_SYS_WITH_MALLOC_CONF = "narenas:1,tcache:false,retain:false"

And that might disable retain.
But I can not reproduce this error, so I look forward to your response.

@chenweihao1006
Copy link
Author

@GTwhy Thank you very much for your reply.
I found that if I run the client and server by root, this error doesn't occur.

@GTwhy
Copy link
Collaborator

GTwhy commented Aug 19, 2023

@chenweihao1006 OK, and you can try to change the CONF and build again, then maybe you don't need sudo to run the demos.
I'm not sure why sudo is feasible.

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

2 participants