ut-osa / assise

GNU General Public License v2.0
57 stars 30 forks source link

Not using Assise's libpmem during runtime. #11

Closed OmSaran closed 3 years ago

OmSaran commented 3 years ago

Looks like we are not using Assise's libpmem library file (libfs/lib/nvml/src/nondebug/libpmem.so) during runtime. https://github.com/ut-osa/assise/blob/1285fa297cb5345e5acb1f12ba445e0bce761e99/libfs/Makefile#L49 (corresponding -Wl,-rpath missing for libpmem). Due to this, during runtime, Assise falls back to using the system's (For e.g., located in /usr/lib/x86_64-linux-gnu/) libpmem instead.

Here's what LDD output:

# ldd build/libmlfs.so
    linux-vdso.so.1 (0x00007ffce1d9e000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f71a300d000)
    libaio.so.1 => /lib/x86_64-linux-gnu/libaio.so.1 (0x00007f71a3008000)
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f71a2e26000)
    ***** **libpmem.so.1 => /lib/x86_64-linux-gnu/libpmem.so.1 (0x00007f71a2de1000)** *****
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f71a2dd6000)
    librdma.so => /home/om/wspace/assise/libfs/lib/rdma/librdma.so (0x00007f71a2dc6000)
    libjemalloc.so.2 => /home/om/wspace/assise/libfs/lib/jemalloc-4.5.0/lib/libjemalloc.so.2 (0x00007f71a2d64000)
    libsyscall_intercept.so.0 => /home/om/wspace/assise/libfs/lib/syscall_intercept/install/lib/libsyscall_intercept.so.0 (0x00007f71a2c3f000)

After adding the -Wl,rpath flags, here's the LDD output:

# ldd build/libmlfs.so
    linux-vdso.so.1 (0x00007fffbb9ff000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb73863c000)
    libaio.so.1 => /lib/x86_64-linux-gnu/libaio.so.1 (0x00007fb738637000)
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb738455000)
    **** libpmem.so.1 => /home/om/wspace/assise/libfs/lib/nvml/src/nondebug/libpmem.so.1 (0x00007fb738421000) ****
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fb738416000)
    librdma.so => /home/om/wspace/assise/libfs/lib/rdma/librdma.so (0x00007fb738406000)
    libjemalloc.so.2 => /home/om/wspace/assise/libfs/lib/jemalloc-4.5.0/lib/libjemalloc.so.2 (0x00007fb7383a4000)
    libsyscall_intercept.so.0 => /home/om/wspace/assise/libfs/lib/syscall_intercept/install/lib/libsyscall_intercept.so.0 (0x00007fb73827f000)

Is this the correct intent? Because we seem to be using Assise's libpmem flag for compiling (in -L flag) which got me thinking.

Thanks

simpeter commented 3 years ago

Youngjin, I believe this is a question for you. Please let us know if not.

On Sat, Oct 16, 2021 at 11:18 AM Om Saran @.***> wrote:

Looks like we are not using Assise's libpmem library file ( libfs/lib/nvml/src/nondebug/libpmem.so) during runtime.

https://github.com/ut-osa/assise/blob/1285fa297cb5345e5acb1f12ba445e0bce761e99/libfs/Makefile#L49 (corresponding -Wl,-rpath missing for libpmem). Due to this, during runtime, Assise falls back to using the system's (For e.g., located in /usr/lib/x86_64-linux-gnu/) libpmem instead.

Is this the correct intent? Because we seem to be using Assise's libpmem flag for compiling (in -L flag) which got me thinking.

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ut-osa/assise/issues/11, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHQBMWNZP6QPMPXKY4PVQ3UHGQUZANCNFSM5GDZLNFQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

wreda commented 3 years ago

This is an oversight. To avoid compatibility issues, Assise should indeed be using its included libpmem during runtime.

I've introduced a small patch to fix this.