RFR: Only use dlvsym for libnuma lookups if it's available
david.holmes at oracle.com
Wed Apr 12 02:31:56 UTC 2017
On 12/04/2017 11:58 AM, Mikael Vidstedt wrote:
> In os_linux.cpp/os::Linux::libnuma_dlsym dlvsym(3) is used to do versioned lookup of various libnuma symbols. According to the JBS issue  corresponding to the change which introduced it, the reason seems to be that the NUMA API changed between versions, and that dlsym in some cases found the newest version of the libnuma symbols where the VM expects to get the older version. This all seems messy at best..
> dlvsym is not available in musl. Just to work around the problem, I use dlsym to look up dlvsym, and only use it if it is available. While it does solve the immediate problem, I have to wonder if there isn’t a better way to do this.
That seems a reasonable workaround - and consistent with how we deal
with functions that may be version specific.
A bit of googling indicates that symbol versioning in DSOs is pretty
much a complete disaster :( But I wonder if this problem still exists
on the versions of linux we support?
>  https://bugs.openjdk.java.net/browse/JDK-6840196
More information about the portola-dev