19 Feb 2024 07:09 PM - last edited on 11 Jul 2024 07:36 AM by AgataWlodarczyk
I've noticed that the location of liboneagentproc.so on linux installation seems to have moved at some point/update?
In the past sysadmins added the library path to LD_PRELOAD (per process) to allow injection into specific processes only. Back then the way to do this was by pointing to
/opt/dynatrace/oneagent/agent/lib64/liboneagentproc.so
Now this seems to have silently moved to:
/lib/x86_64-linux-gnu/liboneagentproc.so
and thus this way of injection doesn't work anymore?
Does anyone. have any information on this?
KR
19 Feb 2024 07:49 PM
First one I checked just introduced more variation:
# find . -name liboneagentproc.so
/usr/lib/x86_64-linux-gnu/liboneagentproc.so
/opt/dynatrace/oneagent/agent/bin/1.283.132.20240205-143805/linux-x86-64/liboneagentproc.so
/opt/dynatrace/oneagent/agent/bin/1.283.132.20240205-143805/linux-x86-32/liboneagentproc.so
Tried looking inside the installation script, but couldn't find immediate references.
I imagine it may vary by distribution. In the case I checked, Ubuntu 20.04.3 LTS.
21 Feb 2024 09:46 AM
Something definitely has changed...
Even the documentation for manual application level injection still states to use the library at /opt/dynatrace/oneagent/agent/lib64/liboneagentproc.so but it doesn't exist anymore.
I agree with @Julius_Loman on having it at a system path makes more sense and creates less room for error, but for existing installations simply removing the "old" path without a fallback can cause some nasty surprises!
Nothing in the release notes either ...
21 Feb 2024 11:06 AM
@r_weber one needs to distinguish manual injection (where it is correct to use the file path to the oneagent installation directory).
I believe the path is changed on OneAgent upgrades where the liboneagentproc is redeployed each time correctly. For example - if you install 32bit support, the installer will also add 32bit liboneagentproc to system libraries.
19 Feb 2024 08:56 PM - edited 19 Feb 2024 08:56 PM
Yes and no 😁
The path depends on the Linux distribution and bitness. And it does not reference to /opt anymore but to the /lib (main system libraries or how is this called) - I mainly to ensure it is accessible every time the system boots. Inaccessible library specified in preload can be a pain.
20 Feb 2024 02:45 AM
This was surprising, i had same issue and tried to figure out what went wrong, later on found directory structure has been changed from /opt to /lib in few cases...
10 Jul 2024 05:09 PM
Not good at all... Changing paths without notice.