async-rdma icon indicating copy to clipboard operation
async-rdma copied to clipboard

JEMALLOC_RETAIN defined cause memory allocate failed

Open chenweihao1006 opened this issue 1 year ago • 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?

chenweihao1006 avatar Aug 15 '23 15:08 chenweihao1006

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 avatar Aug 16 '23 14:08 GTwhy

@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 avatar Aug 19 '23 08:08 chenweihao1006

@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.

GTwhy avatar Aug 19 '23 11:08 GTwhy