Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stack guard might have disabled?

I am trying to run the first example in rootbeer library, which you can find from here.

The issue is, even though I followed all of their instructions, I am getting the following message when I am trying to run the Jar

root@ubuserver3:/home/ubuadmin/JavaJars/HelloWordGPU# java -jar HelloWorldGPU.jar
OpenJDK Client VM warning: You have loaded library /usr/lib/libcuda.so.319.37 which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Exception in thread "main" java.lang.NullPointerException
        at org.trifort.rootbeer.runtime.Rootbeer.run(Rootbeer.java:104)
        at ScalarMult.test(ScalarMult.java:13)
        at Main.main(Main.java:17)

I am not a Linux person, so I do not understand how to execute this command properly. I also don't understand what they mean by that message, because this is the first time I am on GPU programming. But I know messing with GPU with wrong commands would be a problem.

like image 263
PeakGen Avatar asked Mar 12 '14 08:03

PeakGen


4 Answers

Type: execstack --version to check if you already have execstack installed.

If you get command not found type: sudo apt-get install execstack -y --force-yes

Type sudo execstack -c <file> e.g sudo execstack -c /usr/lib/libcuda.so

like image 179
absenthecon Avatar answered Nov 04 '22 06:11

absenthecon


1: Check execstack version using following command to find execstack installed or not

execstack --version

2: If execstack not installed then install using following command

sudo apt-get install execstack -y --force-yes

3: After successful installation execute following command

sudo execstack -c <filepath>

eg: sudo execstack -c /usr/lib/libjpcap.so

like image 4
pvrforpranavvr Avatar answered Nov 04 '22 06:11

pvrforpranavvr


Make sure you are not running 32-bit Java. If you run java -d64, the 32-bit version will print an error.

like image 2
dhuie Avatar answered Nov 04 '22 07:11

dhuie


make sure you are not running 32-bit jar on 64-bit jvm first

like image 1
andrej Avatar answered Nov 04 '22 06:11

andrej