irods / irods_docs

iRODS Documentation
3 stars 17 forks source link

Developer documentation: DT_FLAGS_1 #207

Open SwooshyCueb opened 1 year ago

SwooshyCueb commented 1 year ago

Related: irods/irods#7158

When loading plugins, we look at the DT_FLAGS_1 dynamic entry to determine what flags to pass to dlopen(). This is used in the python rule engine plugin, for example, to specify that dlopen() is to be called with RTLD_GLOBAL. This should be documented, as well as how one might set these flags at plugin link-time.

luijs commented 9 months ago

Just ran into this issue when importing the boto3 library on ubuntu 20.04. I noticed that the 4.3.1 servers did not have this issue, but the 4.3.0 did have it, then I found this issue via the release notes.

If there is a simple workaround to set these flags differently in 4.3.0 then I'd be much obliged! I tried checking the flags via sys.getdlopenflags(), but that only yielded [MsParam*] not supported, so I didn't really know how to continue from there.

SwooshyCueb commented 9 months ago

Even if you were to set the flag, nothing would happen as support for it was not added until 4.3.1.

Until you can upgrade to 4.3.1, you can work around this issue by LD_PRELOADing libpython.

luijs commented 9 months ago

Thanks, that does seem to work indeed. For future reference:

sudo su - irods
export LD_PRELOAD="/usr/lib/python3.8/config-3.8-x86_64-linux-gnu/libpython3.8.so"
/var/lib/irods//irodsctl restart
alanking commented 9 months ago

See also: https://github.com/irods/irods/issues/7056#issuecomment-1519169773