Agent for Linux ARM v5 compatible with CXXABI_ARM_1.3.2

Questions about YourKit Java Profiler
Post Reply
manuelito
Posts: 4
Joined: Fri Sep 18, 2015 2:21 pm

Agent for Linux ARM v5 compatible with CXXABI_ARM_1.3.2

Post by manuelito »

I try to profile an Oracle JVM 6 running in a pretty old installation of PTXdist Linux which I can not upgrade, but can make small changes like replacing certain .so file etc. I'm not a Linux or C expert though so sorry if I mix some things up.

When I try to run my Java application I get the error:

Code: Select all

Could not find agent library /home/data/libyjpagent.so in absolute path, with error: /home/data/libstdc++.so.6: version `CXXABI_ARM_1.3.3' not found (required by /home/data/libyjpagent.so)
The file libstdc++.so.6 is not installed on the emebedded device but I managed to get and install it as well as adapting the LD_LIBRARY_PATH. Obviously there are different versions of it and I have only access to versions libstdc++.so.6.0.10 and libstdc++.so.6.0.20.

Version 10 does only support CXXABI_ARM_1.3.2, so the agent will not work with it.

Using Version 20 lead to more outdated libs like libc.so etc.

Code: Select all

Could not find agent library /home/data/libyjpagent.so in absolute path, with error: /lib/libc.so.6: version `GLIBC_2.17' not found (required by /home/data/libstdc++.so.6)
After even updating these .so files a kernel panic occurred since it was not compatible with these files anymore. Since I can't compile a new kernel that's a dead end.

So my question is: Can you provide the agent file libyjpagent.so which uses CXXABI_ARM_1.3.2 instead of CXXABI_ARM_1.3.3? The PTXdist Linux installed has CXXABI_ARM_1.3.2 so there's a good chance that it would work.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Agent for Linux ARM v5 compatible with CXXABI_ARM_1.3.2

Post by Anton Katilin »

Hi,

Just to clarify: do you use bin/linux-armv5-sf/libyjpagent.so from the latest build 15074?

It is already compiled with a very old compiler to ensure compatibility with older systems, but your system is even older.

In order to support it we need to downgrade the compiler for ARM v5. We could try doing so, but I cannot promise any dates.

This change involves the build environment, and is theoretically dangerous, because an older compiler may bring bugs. ARM v5 is a not a mainstream platform nowadays, I believe that only few users use it, and it will be difficult to find out whether the change breaks anything.

Best regards,
Anton
manuelito
Posts: 4
Joined: Fri Sep 18, 2015 2:21 pm

Re: Agent for Linux ARM v5 compatible with CXXABI_ARM_1.3.2

Post by manuelito »

Hi Anton

Yes, I am using bin/linux-armv5-sf/libyjpagent.so from yjp-2015-build-15074-linux.tar.bz2 downloaded a few days ago.

I would very appreciate it if you could try to recompile the agent with an older compiler.

I don't know if it is of any importance for your support, but the company I'm working for bought a "5-user floating license with 1 year basic support (updates)" of YourKit.

Manuel
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Agent for Linux ARM v5 compatible with CXXABI_ARM_1.3.2

Post by Anton Katilin »

Hi Manuel

It seems that Sourcery G++ Lite package, the cross compiler we use for ARM v5, is no longer available. We currently use version 2008q3. To target your platform we need an older one.

At the moment I see the following options:

1. Try to find the cross compiler version older than 2008q3 such that produces code depending on CXXABI_ARM_1.3.2 or older.

As I wrote, this is no longer available at the official web site. Downloading software from unknown sources is not a good idea.

Does your company use a C++ cross compiler targeting that platform? If yes, which one? Can/may you share it?

2. Build a cross compiler. To do this we need at least the target system root files (core libraries and headers) as well the gcc configuration settings for the target platform.

3. Try to find and test libstdc++.so.6 versions between libstdc++.so.6.0.10 and libstdc++.so.6.0.20. I'm not sure they exist at all and whether it is possible to get them.

Best regards,
Anton
manuelito
Posts: 4
Joined: Fri Sep 18, 2015 2:21 pm

Re: Agent for Linux ARM v5 compatible with CXXABI_ARM_1.3.2

Post by manuelito »

Hi Anton

Thank you for your help.

I could not manage to find a cross compiler version older than 2008q3 from a trustworthy source. The crosscompiler used back then was Pengutronix OSELAS Toolchain version 1.99.3.4.
I tried different things and could compile libstdc++.so.6 in version 14 (libstdc++.so.6.0.14) which was accepted by the YourKit agent file. After starting my Java application a get an error that getconf was not found. I don't know whether that's important or not, but the application seems to start.

Code: Select all

Starting Application ABC ...[YourKit Java Profiler 2015 build 15074] Log file: /home/.yjp/log/MainConsole-197.log
sh: /usr/bin/getconf: not found
sh: /usr/bin/getconf: not found
Unfortunately the embedded device reboots after a few minutes. Probably because its memory, which is only 64 MB, no swapping to flash, is full. I noticed that the size of the agent .so file is 2 MB and the libstdc++.so.6 is about 1 MB. I now assume that the device runs out of memory.

Is there any way to reduce the memory footprint of the YourKit agent (e.g. parameters)? If not I'm afraid it won't be possible to get it running on this particular device.

Manuel
manuelito
Posts: 4
Joined: Fri Sep 18, 2015 2:21 pm

Re: Agent for Linux ARM v5 compatible with CXXABI_ARM_1.3.2

Post by manuelito »

Hi Anton

I could finally manage to get the YourKit agent run on my ARM v5 device. It turned out that the 64MB of RAM were simply not enough for the agent plus the java application. I found the same embedded device with 128MB RAM and was able to start the agent and my application on it.

So there were basically two things which solved my problem:
1. I could compile the .so file libstdc++.so.6 in Version 14 which is compatible with the latest YourKit agent AND my toolchain.
2. Increased the RAM on my device from 64MB to 128MB

If it is any help for you I could send you the libstdc++.so.6 file in Version 14 in case somebody else ever needs it.

Thanks a lot for your help.

Manuel
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Agent for Linux ARM v5 compatible with CXXABI_ARM_1.3.2

Post by Anton Katilin »

Hello Manuel

Sorry for late reply and thank you for sharing the workarounds you've found.

To reduce the agent's memory footprint please try using the agent startup option "disablestacktelemetry":
https://www.yourkit.com/docs/java/help/ ... ptions.jsp

If you don't use profiling modes relying on bytecode instrumentation, you may also use:
"disabletracing" for no CPU tracing (CPU sampling will be available), "disablealloc" for no object allocation recording. You may consider other options with "disable" in their name.

Best regards,
Anton
Post Reply