foundationdb icon indicating copy to clipboard operation
foundationdb copied to clipboard

fdb symbols not seen on client

Open dlambrig opened this issue 3 years ago • 0 comments

When taking 'perf' traces on the client, fdb symbols are not visible.

example line in perf report output

+ 7.53% 0.00% fdb-7.1.14-0 fdb-c-7.1.14.so-25Oen2 (deleted) [.] 0x00007f32f8ded389

Inspecting the process, libfdb_c.so is "deleted".

sudo sh -c 'cat /proc/30689/maps'|grep fdb|grep deleted'
7f1210cb2000-7f1211da3000 r-xp 00000000 fc:00 3286497                    /tmp/fdb-c-7.1.14.so-S3Llr6 (deleted)
7fc9ad6a8000-7fc9ae799000 r-xp 00000000 fc:00 3286352                    /tmp/libfdb_c.so-E0yJV8 (deleted)

It appear that in JNIUtil.java, shared libraries are loaded to a temp file and then deleted. Validated experimentally.

I'd like to introduce a property that turns off "eager deletion" optionally, so the *.so libraries will not be deleted in /tmp. We would turn it on when we want traces with symbols, keep it as default otherwise.

dlambrig avatar Sep 23 '22 16:09 dlambrig