File Access Failure in bin32/drrun on NFS
Description and Workaround
When the DynamoRIO root (unpacked release) is located on an NFS share, the bin32 version of drrun
will warn about libdynamorio.so
missing, then error out trying to access the DynamoRIO root directory. The bin64 version works as expected.
Specifically, dynamorio/drdeploy.c:545
raises the error which originates from a stat
failure in dynamorio/dr_frontend_unix.c:81
.
I believe the root cause is that my NFS mount is using 64b inodes but the 32b version of stat
expects a 32b value and errors. My solution to the problem was to add add_definitions(-D_FILE_OFFSET_BITS=64)
in the CMakeLists.txt
and rebuild.
The following link https://www.mjr19.org.uk/sw/inodes64.html was helpful for me understanding the suspected problem.
To Reproduce
Running ./bin32/drrun -- myapplication args
in an NFS will terminate with a cannot access DynamoRIO root directory
error message. This occurs without a client and on all 32b ELF's tried. I don't know a way to artificially assign high inode numbers to DynamoRIO root files but I suspect this is the real method to reproduce the issue.
Versions This occurs on the latest 8.0.18687 and was also tested on an old 8.0.18439 release. I am running on Ubuntu 18.04.5. My application is 32 bit.