JEMALLOC_RETAIN defined cause memory allocate failed
Opened this issue · 3 comments
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?
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.
@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.
@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.