Ubuntu – OpenJDK – Installing JDK Debug Symbols manually

javajdkopenjdkpackage-management

i have all OpenJDK8 files and its debugging symbols, i can get OpenJDK working but when i try to use something that is used to debug, i'm still getting errors related to the dbg files, i don't know which configurations are needed to get everything working. Basically i have the files from the command:
sudo apt-get install openjdk-8-jdk openjdk-8-dbg
but i didn't get them working yet, i need install them manually. I've tried just putting the files on /usr/lib/… directory, also running the commands directly from the path (Jinfo is one of these and i've tried running it from the binary file directly) I'm using Ubuntu 18.04. Is there any documentation for installing all this packages from scratch? Any help is appreciated.

Best Answer

I recently had a similar issue while I was running tests with CPU Profiler. I had openjdk-8-dbg installed correctly. Thanks to IntelliJIDEA IDE the solution below was recommended after my first attempt. You need to change some settings in your kernel.

Utilize the commands below to get you started.

sudo sh -c 'echo 1 > /proc/sys/kernel/perf_event_paranoid'

sudo sh -c 'echo 0 > /proc/sys/kernel/kptr_restrict'

The above commands will permanently be effected in your system kernel and can be changed later if you need to.