pmemfile
pmemfile copied to clipboard
preload: reentrancy issue
When libc, while holding a global lock, invokes some syscall and in response to this syscall we are calling back into the same function in libc, libc tries to take the same lock, which leads to deadlock.
This can happen when pmemobj wants to format an error message (strerror, which requires opening translation file) while we service opening any translation file.
One possible solution to this problem is substituting libc functions we use in pmemfile and pmemobj by simpler variant that do not call file related syscalls when called FROM pmemfile or pmemobj.
We are careful to not call libc functions in libpmemfile.so, so probably we can use some of this code.
We can make it a separate library (libpmemfile-c.so?), which libpmemfile.so can depend on.