New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java Visualizer not working #6

Closed
nileshtakale opened this Issue Sep 26, 2015 · 75 comments

Comments

Projects
None yet
3 participants
@nileshtakale

nileshtakale commented Sep 26, 2015

Hi,
I followed all the steps on my RHEL 7 64 bit OS to install Java Visualizer, but still it is not working.
safeexec is working properly.
In Java jail when I execute below command ,

./java/bin/java -cp .:cp:cp/javax.json-1.0.jar:java/lib/tools.jar traceprinter.InMemory < cp/traceprinter/test-input.txt
it gives me below output.

{"code":"public class Test { public static void main(String[] args) { int x = 3; x += x; } }","stdin":"","trace":[{"stdout":"","event":"call","line":1,"stack_to_render":[{"func_name":"main:1","encoded_locals":{},"ordered_varnames":[],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"1","frame_id":1}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}},{"stdout":"","event":"step_line","line":1,"stack_to_render":[{"func_name":"main:1","encoded_locals":{},"ordered_varnames":[],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"2","frame_id":2}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}},{"stdout":"","event":"step_line","line":1,"stack_to_render":[{"func_name":"main:1","encoded_locals":{"x":3},"ordered_varnames":["x"],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"4","frame_id":4}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}},{"stdout":"","event":"step_line","line":1,"stack_to_render":[{"func_name":"main:1","encoded_locals":{"x":6},"ordered_varnames":["x"],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"8","frame_id":8}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}},{"stdout":"","event":"return","line":1,"stack_to_render":[{"func_name":"main:1","encoded_locals":{"x":6,"return":["VOID"]},"ordered_varnames":["x","return"],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"9","frame_id":9}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}}],"userlog":"Debugger VM maxMemory: 3513M\n"}

everything is blank inside {}.

I also tried accessing Java Visualizer by http://localhost/java_visualize. but its not working.

Please help.

Thanks.

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Sep 27, 2015

Owner

Hi,

I'm copying from your email:
"""
When I access Java Visualizer from browser it is not showing default program which is ClassNameHere

When I click on Visualize Execution button, it says please wait..processing your code and does not processes anything.

I can not see frames on the left side of the screen.
"""
First, you should just get the command-line test working. Until that works, nothing else can work. When you say "everything is blank inside {}." what do you mean, compared to https://github.com/daveagp/java_jail/blob/master/cp/traceprinter/expected-output.txt ?

Owner

daveagp commented Sep 27, 2015

Hi,

I'm copying from your email:
"""
When I access Java Visualizer from browser it is not showing default program which is ClassNameHere

When I click on Visualize Execution button, it says please wait..processing your code and does not processes anything.

I can not see frames on the left side of the screen.
"""
First, you should just get the command-line test working. Until that works, nothing else can work. When you say "everything is blank inside {}." what do you mean, compared to https://github.com/daveagp/java_jail/blob/master/cp/traceprinter/expected-output.txt ?

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Sep 27, 2015

Hi David,

Thanks for the quick reply. Yes, the output inside {} is blank as compared
to expected-output.txt. I mean I can not see any values inside it, the way
they are in expected-output.txt. {"REF","9"} like that.
How do I make command-line test working? I configured safeexec and
java_jail paths in jv-config.json but still its not working.

Could you please guide me so that I can go ahead?

Thanks,
Nilesh

On Sun, Sep 27, 2015 at 12:29 AM, Dave Pritchard notifications@github.com
wrote:

Hi,

I'm copying from your email:
"""
When I access Java Visualizer from browser it is not showing default
program which is ClassNameHere

When I click on Visualize Execution button, it says please
wait..processing your code and does not processes anything.

I can not see frames on the left side of the screen.
"""
First, you should just get the command-line test working. Until that
works, nothing else can work. When you say "everything is blank inside {}."
what do you mean, compared to
https://github.com/daveagp/java_jail/blob/master/cp/traceprinter/expected-output.txt
?


Reply to this email directly or view it on GitHub
#6 (comment).

nileshtakale commented Sep 27, 2015

Hi David,

Thanks for the quick reply. Yes, the output inside {} is blank as compared
to expected-output.txt. I mean I can not see any values inside it, the way
they are in expected-output.txt. {"REF","9"} like that.
How do I make command-line test working? I configured safeexec and
java_jail paths in jv-config.json but still its not working.

Could you please guide me so that I can go ahead?

Thanks,
Nilesh

On Sun, Sep 27, 2015 at 12:29 AM, Dave Pritchard notifications@github.com
wrote:

Hi,

I'm copying from your email:
"""
When I access Java Visualizer from browser it is not showing default
program which is ClassNameHere

When I click on Visualize Execution button, it says please
wait..processing your code and does not processes anything.

I can not see frames on the left side of the screen.
"""
First, you should just get the command-line test working. Until that
works, nothing else can work. When you say "everything is blank inside {}."
what do you mean, compared to
https://github.com/daveagp/java_jail/blob/master/cp/traceprinter/expected-output.txt
?


Reply to this email directly or view it on GitHub
#6 (comment).

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Sep 27, 2015

Owner

Actually this is no big deal. We added a feature where the visualizer suppresses args[] if it is an empty array and that's what's happening here.

So let's go back to your other questions:
"""
When I access Java Visualizer from browser it is not showing default program which is ClassNameHere

When I click on Visualize Execution button, it says please wait..processing your code and does not processes anything.

I can not see frames on the left side of the screen.
"""

If you do this in Chrome or some other browsers, you can use the Developer Tools to inspect Network traffic and look at the error console. (f12 in Chrome) Open this panel including Network and then re-press the visualize button (see attachment). Are there errors? What is the network reply?
image

Owner

daveagp commented Sep 27, 2015

Actually this is no big deal. We added a feature where the visualizer suppresses args[] if it is an empty array and that's what's happening here.

So let's go back to your other questions:
"""
When I access Java Visualizer from browser it is not showing default program which is ClassNameHere

When I click on Visualize Execution button, it says please wait..processing your code and does not processes anything.

I can not see frames on the left side of the screen.
"""

If you do this in Chrome or some other browsers, you can use the Developer Tools to inspect Network traffic and look at the error console. (f12 in Chrome) Open this panel including Network and then re-press the visualize button (see attachment). Are there errors? What is the network reply?
image

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Sep 27, 2015

Hi David,

After turning on debugging in firefox and following above steps I am facing
JavaScript errors, please check.
Let me know what needs to be done.

Thanks,
Nilesh

On Sun, Sep 27, 2015 at 11:52 AM, Dave Pritchard notifications@github.com
wrote:

Actually this is no big deal. We added a feature where the visualizer
suppresses args[] if it is an empty array and that's what's happening here.

So let's go back to your other questions:
"""
When I access Java Visualizer from browser it is not showing default
program which is ClassNameHere

When I click on Visualize Execution button, it says please
wait..processing your code and does not processes anything.

I can not see frames on the left side of the screen.
"""

If you do this in Chrome or some other browsers, you can use the Developer
Tools to inspect Network traffic and look at the error console. (f12 in
Chrome) Open this panel including Network and then re-press the visualize
button (see attachment). Are there errors? What is the network reply?
[image: image]
https://cloud.githubusercontent.com/assets/1429912/10123986/7a28d3fe-64fd-11e5-8e0a-69886da0b16c.png


Reply to this email directly or view it on GitHub
#6 (comment).

nileshtakale commented Sep 27, 2015

Hi David,

After turning on debugging in firefox and following above steps I am facing
JavaScript errors, please check.
Let me know what needs to be done.

Thanks,
Nilesh

On Sun, Sep 27, 2015 at 11:52 AM, Dave Pritchard notifications@github.com
wrote:

Actually this is no big deal. We added a feature where the visualizer
suppresses args[] if it is an empty array and that's what's happening here.

So let's go back to your other questions:
"""
When I access Java Visualizer from browser it is not showing default
program which is ClassNameHere

When I click on Visualize Execution button, it says please
wait..processing your code and does not processes anything.

I can not see frames on the left side of the screen.
"""

If you do this in Chrome or some other browsers, you can use the Developer
Tools to inspect Network traffic and look at the error console. (f12 in
Chrome) Open this panel including Network and then re-press the visualize
button (see attachment). Are there errors? What is the network reply?
[image: image]
https://cloud.githubusercontent.com/assets/1429912/10123986/7a28d3fe-64fd-11e5-8e0a-69886da0b16c.png


Reply to this email directly or view it on GitHub
#6 (comment).

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Sep 27, 2015

Hi,

I forgot to send network tab response.

Thanks,
Nilesh

On Sun, Sep 27, 2015 at 12:17 PM, Nilesh Takale nileshtakale@gmail.com
wrote:

Hi David,

After turning on debugging in firefox and following above steps I am
facing JavaScript errors, please check.
Let me know what needs to be done.

Thanks,
Nilesh

On Sun, Sep 27, 2015 at 11:52 AM, Dave Pritchard <notifications@github.com

wrote:

Actually this is no big deal. We added a feature where the visualizer
suppresses args[] if it is an empty array and that's what's happening here.

So let's go back to your other questions:
"""
When I access Java Visualizer from browser it is not showing default
program which is ClassNameHere

When I click on Visualize Execution button, it says please
wait..processing your code and does not processes anything.

I can not see frames on the left side of the screen.
"""

If you do this in Chrome or some other browsers, you can use the
Developer Tools to inspect Network traffic and look at the error console.
(f12 in Chrome) Open this panel including Network and then re-press the
visualize button (see attachment). Are there errors? What is the network
reply?
[image: image]
https://cloud.githubusercontent.com/assets/1429912/10123986/7a28d3fe-64fd-11e5-8e0a-69886da0b16c.png


Reply to this email directly or view it on GitHub
#6 (comment).

nileshtakale commented Sep 27, 2015

Hi,

I forgot to send network tab response.

Thanks,
Nilesh

On Sun, Sep 27, 2015 at 12:17 PM, Nilesh Takale nileshtakale@gmail.com
wrote:

Hi David,

After turning on debugging in firefox and following above steps I am
facing JavaScript errors, please check.
Let me know what needs to be done.

Thanks,
Nilesh

On Sun, Sep 27, 2015 at 11:52 AM, Dave Pritchard <notifications@github.com

wrote:

Actually this is no big deal. We added a feature where the visualizer
suppresses args[] if it is an empty array and that's what's happening here.

So let's go back to your other questions:
"""
When I access Java Visualizer from browser it is not showing default
program which is ClassNameHere

When I click on Visualize Execution button, it says please
wait..processing your code and does not processes anything.

I can not see frames on the left side of the screen.
"""

If you do this in Chrome or some other browsers, you can use the
Developer Tools to inspect Network traffic and look at the error console.
(f12 in Chrome) Open this panel including Network and then re-press the
visualize button (see attachment). Are there errors? What is the network
reply?
[image: image]
https://cloud.githubusercontent.com/assets/1429912/10123986/7a28d3fe-64fd-11e5-8e0a-69886da0b16c.png


Reply to this email directly or view it on GitHub
#6 (comment).

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Sep 27, 2015

Owner

I don't see any errors copied in. Start with the Javascript console errors.

Owner

daveagp commented Sep 27, 2015

I don't see any errors copied in. Start with the Javascript console errors.

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Sep 27, 2015

Hi,

There is syntax error, check my second attachments.

Thanks,
Nilesh

On Sun, Sep 27, 2015 at 12:54 PM, Dave Pritchard notifications@github.com
wrote:

I don't see any errors copied in. Start with the Javascript console errors.


Reply to this email directly or view it on GitHub
#6 (comment).

nileshtakale commented Sep 27, 2015

Hi,

There is syntax error, check my second attachments.

Thanks,
Nilesh

On Sun, Sep 27, 2015 at 12:54 PM, Dave Pritchard notifications@github.com
wrote:

I don't see any errors copied in. Start with the Javascript console errors.


Reply to this email directly or view it on GitHub
#6 (comment).

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Sep 27, 2015

Owner

There's nothing there. I am not sure you can email attachments in GitHub Issue threads. Try responding on the webpage #6 and attaching your info there directly.

Owner

daveagp commented Sep 27, 2015

There's nothing there. I am not sure you can email attachments in GitHub Issue threads. Try responding on the webpage #6 and attaching your info there directly.

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Sep 27, 2015

I have sent email attachments to your gmail id. Please check.

On Sun, Sep 27, 2015 at 12:58 PM, Dave Pritchard notifications@github.com
wrote:

There's nothing there. I am not sure you can email attachments in GitHub
Issue threads. Try responding on the webpage #6
#6 and attaching your info
there directly.


Reply to this email directly or view it on GitHub
#6 (comment).

nileshtakale commented Sep 27, 2015

I have sent email attachments to your gmail id. Please check.

On Sun, Sep 27, 2015 at 12:58 PM, Dave Pritchard notifications@github.com
wrote:

There's nothing there. I am not sure you can email attachments in GitHub
Issue threads. Try responding on the webpage #6
#6 and attaching your info
there directly.


Reply to this email directly or view it on GitHub
#6 (comment).

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Sep 27, 2015

Owner

Please keep your replies on GitHub instead of email if you don't mind. So I see you have a syntax error on line 1 of config.js.php. If you click on that error, you should be able to see what the error is (like, what are the contents of that file). Can you check that?

Also, try refreshing the page and observing the network tab. Right now it only captured the "visualize" action but not the original page load.

Owner

daveagp commented Sep 27, 2015

Please keep your replies on GitHub instead of email if you don't mind. So I see you have a syntax error on line 1 of config.js.php. If you click on that error, you should be able to see what the error is (like, what are the contents of that file). Can you check that?

Also, try refreshing the page and observing the network tab. Right now it only captured the "visualize" action but not the original page load.

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Sep 27, 2015

Hi,

When I click on Visualize execution facing below error,

[13:13:01.203] Use of getPreventDefault() is deprecated. Use
defaultPrevented instead. @
http://192.168.147.10/OnlinePythonTutor/v3/js/jquery-1.8.2.min.js:2

In network tab it goes to the URL http://192.168.147.10/example-code/ ,
thats it.

On Sun, Sep 27, 2015 at 1:03 PM, Dave Pritchard notifications@github.com
wrote:

Please keep your replies on GitHub instead of email if you don't mind. So
I see you have a syntax error on line 1 of config.js.php. If you click on
that error, you should be able to see what the error is (like, what are the
contents of that file). Can you check that?

Also, try refreshing the page and observing the network tab. Right now it
only captured the "visualize" action but not the original page load.


Reply to this email directly or view it on GitHub
#6 (comment).

nileshtakale commented Sep 27, 2015

Hi,

When I click on Visualize execution facing below error,

[13:13:01.203] Use of getPreventDefault() is deprecated. Use
defaultPrevented instead. @
http://192.168.147.10/OnlinePythonTutor/v3/js/jquery-1.8.2.min.js:2

In network tab it goes to the URL http://192.168.147.10/example-code/ ,
thats it.

On Sun, Sep 27, 2015 at 1:03 PM, Dave Pritchard notifications@github.com
wrote:

Please keep your replies on GitHub instead of email if you don't mind. So
I see you have a syntax error on line 1 of config.js.php. If you click on
that error, you should be able to see what the error is (like, what are the
contents of that file). Can you check that?

Also, try refreshing the page and observing the network tab. Right now it
only captured the "visualize" action but not the original page load.


Reply to this email directly or view it on GitHub
#6 (comment).

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Sep 27, 2015

Hi David,

I guess there are few css and javascript errors. I can see in network tab
the request goes to http://192.168.147.10/example-code/(Default.java) and
in response tab is shows the entire code for class ClassNameHere.

Config.js.php processes jv-config.json, if it fails then it says You will
not be able to submit code.

I am facing below script errors,

[13:25:16.540] Error in parsing value for 'filter'. Declaration dropped. @

http://192.168.147.10/OnlinePythonTutor/v3/css/jquery.qtip.css:570

[13:26:51.965] SyntaxError: syntax error @
http://192.168.147.10/config.js.php:1
[13:26:52.036] Unknown property 'box-sizing'. Declaration dropped. @
http://192.168.147.10/
[13:26:52.237] syntax error @
http://192.168.147.10/example-code/(Default).java:1
[13:26:52.238] TypeError: dat.indexOf is not a function @
http://192.168.147.10/jv-frontend.js?8:101

Thanks,
Nilesh

On Sun, Sep 27, 2015 at 1:19 PM, Nilesh Takale nileshtakale@gmail.com
wrote:

Hi,

When I click on Visualize execution facing below error,

[13:13:01.203] Use of getPreventDefault() is deprecated. Use
defaultPrevented instead. @
http://192.168.147.10/OnlinePythonTutor/v3/js/jquery-1.8.2.min.js:2

In network tab it goes to the URL http://192.168.147.10/example-code/ ,
thats it.

On Sun, Sep 27, 2015 at 1:03 PM, Dave Pritchard notifications@github.com
wrote:

Please keep your replies on GitHub instead of email if you don't mind. So
I see you have a syntax error on line 1 of config.js.php. If you click on
that error, you should be able to see what the error is (like, what are the
contents of that file). Can you check that?

Also, try refreshing the page and observing the network tab. Right now it
only captured the "visualize" action but not the original page load.


Reply to this email directly or view it on GitHub
#6 (comment).

nileshtakale commented Sep 27, 2015

Hi David,

I guess there are few css and javascript errors. I can see in network tab
the request goes to http://192.168.147.10/example-code/(Default.java) and
in response tab is shows the entire code for class ClassNameHere.

Config.js.php processes jv-config.json, if it fails then it says You will
not be able to submit code.

I am facing below script errors,

[13:25:16.540] Error in parsing value for 'filter'. Declaration dropped. @

http://192.168.147.10/OnlinePythonTutor/v3/css/jquery.qtip.css:570

[13:26:51.965] SyntaxError: syntax error @
http://192.168.147.10/config.js.php:1
[13:26:52.036] Unknown property 'box-sizing'. Declaration dropped. @
http://192.168.147.10/
[13:26:52.237] syntax error @
http://192.168.147.10/example-code/(Default).java:1
[13:26:52.238] TypeError: dat.indexOf is not a function @
http://192.168.147.10/jv-frontend.js?8:101

Thanks,
Nilesh

On Sun, Sep 27, 2015 at 1:19 PM, Nilesh Takale nileshtakale@gmail.com
wrote:

Hi,

When I click on Visualize execution facing below error,

[13:13:01.203] Use of getPreventDefault() is deprecated. Use
defaultPrevented instead. @
http://192.168.147.10/OnlinePythonTutor/v3/js/jquery-1.8.2.min.js:2

In network tab it goes to the URL http://192.168.147.10/example-code/ ,
thats it.

On Sun, Sep 27, 2015 at 1:03 PM, Dave Pritchard notifications@github.com
wrote:

Please keep your replies on GitHub instead of email if you don't mind. So
I see you have a syntax error on line 1 of config.js.php. If you click on
that error, you should be able to see what the error is (like, what are the
contents of that file). Can you check that?

Also, try refreshing the page and observing the network tab. Right now it
only captured the "visualize" action but not the original page load.


Reply to this email directly or view it on GitHub
#6 (comment).

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Sep 27, 2015

Hi,

Please let me know what I need to do. Is there issue at my end?

Thanks,
Nilesh

nileshtakale commented Sep 27, 2015

Hi,

Please let me know what I need to do. Is there issue at my end?

Thanks,
Nilesh

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Sep 27, 2015

Owner

What is the actual content of config.js.php that is transmitted to you over the network? On my machine it looks like this:
image

Owner

daveagp commented Sep 27, 2015

What is the actual content of config.js.php that is transmitted to you over the network? On my machine it looks like this:
image

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Sep 27, 2015

Here is the screenshot
config_js_php

nileshtakale commented Sep 27, 2015

Here is the screenshot
config_js_php

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Sep 27, 2015

Owner

It looks like you don't have php installed, or your webserver's php module is not activated.

Owner

daveagp commented Sep 27, 2015

It looks like you don't have php installed, or your webserver's php module is not activated.

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Sep 27, 2015

Ok. I am sorry but I am not aware of installing php on webserver. In my www folder I only have html module. Could you please provide any reference so that I can move ahead?

nileshtakale commented Sep 27, 2015

Ok. I am sorry but I am not aware of installing php on webserver. In my www folder I only have html module. Could you please provide any reference so that I can move ahead?

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Sep 27, 2015

Hi David,

After installing php module now I am facing below error, you can see all the configuration in this screenshot. Please help.

after_php_module

nileshtakale commented Sep 27, 2015

Hi David,

After installing php module now I am facing below error, you can see all the configuration in this screenshot. Please help.

after_php_module

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Sep 27, 2015

Hi David,

I changed java_safe_ram_maketrace.php and corrected java/bin path. I am able to get rid of java error. But Safeexec is still giving error. Please check screenshot and help.

java_path_correction

nileshtakale commented Sep 27, 2015

Hi David,

I changed java_safe_ram_maketrace.php and corrected java/bin path. I am able to get rid of java error. But Safeexec is still giving error. Please check screenshot and help.

java_path_correction

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Sep 27, 2015

Owner

I guess your command-line visualizer is working, but it is not working with your jail. Did you try "Try with safeexec (from java_jail) ... " from the README? Did you follow all the installation steps, particularly (2) and (4)? Did you install and build safeexec?

Owner

daveagp commented Sep 27, 2015

I guess your command-line visualizer is working, but it is not working with your jail. Did you try "Try with safeexec (from java_jail) ... " from the README? Did you follow all the installation steps, particularly (2) and (4)? Did you install and build safeexec?

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Sep 27, 2015

I did not do "Try with safeexec (from java_jail). But now I did it with

/usr/java_visualizer/safeexec-master/safeexec --chroot_dir . --exec_dir / --share_newnet --nproc 50 --mem 3000000 --nfile 30 --env_vars CLASSPATH=/cp/:/cp/javax.json-1.0.jar:/java/lib/tools.jar --exec /java/bin/java traceprinter.InMemory < /usr/java_visualizer/java_jail-master/cp/traceprinter/test-input.txt

getting below error,

error 13 (Permission denied): execve error

Command exited with non-zero status (1)
elapsed time: 0 seconds
memory usage: 0 kbytes
cpu usage: 0.000 seconds

what to do for this permission error?

nileshtakale commented Sep 27, 2015

I did not do "Try with safeexec (from java_jail). But now I did it with

/usr/java_visualizer/safeexec-master/safeexec --chroot_dir . --exec_dir / --share_newnet --nproc 50 --mem 3000000 --nfile 30 --env_vars CLASSPATH=/cp/:/cp/javax.json-1.0.jar:/java/lib/tools.jar --exec /java/bin/java traceprinter.InMemory < /usr/java_visualizer/java_jail-master/cp/traceprinter/test-input.txt

getting below error,

error 13 (Permission denied): execve error

Command exited with non-zero status (1)
elapsed time: 0 seconds
memory usage: 0 kbytes
cpu usage: 0.000 seconds

what to do for this permission error?

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Sep 27, 2015

Owner

Did you follow steps 2 copying in all of the libraries into subfolders of the jail? I believe that can cause this error. Did you follow every other step in the instructions?

Owner

daveagp commented Sep 27, 2015

Did you follow steps 2 copying in all of the libraries into subfolders of the jail? I believe that can cause this error. Did you follow every other step in the instructions?

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Sep 27, 2015

Yes, I followed all the steps. I copied necessary library files in lib64,etc and proc. I did not do anything for /lib and /usr/lib though. My java_jail has 6 folders named java,cp,dev,etc,lib64 and proc.

nileshtakale commented Sep 27, 2015

Yes, I followed all the steps. I copied necessary library files in lib64,etc and proc. I did not do anything for /lib and /usr/lib though. My java_jail has 6 folders named java,cp,dev,etc,lib64 and proc.

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Sep 27, 2015

Owner

What about the more basic hello world example in the safeexec README?

Owner

daveagp commented Sep 27, 2015

What about the more basic hello world example in the safeexec README?

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Sep 28, 2015

Yes, it does gets executed. I did check that, while installing safeexec.
Now after doing some modifications in command and location of the execution getting below error.

/usr/java_visualizer/safeexec-master/safeexec --chroot_dir . --exec_dir / --share_newnet --nproc 50 --mem 3000000 --nfile 30 --env_vars CLASSPATH=/cp/:/cp/javax.json-1.0.jar:/java/lib/tools.jar --exec /usr/java_visualizer/java_jail-master/java/bin/java traceprinter.InMemory < /usr/java_visualizer/java_jail-master/cp/traceprinter/test-input.txt

Error occurred during initialization of VM
Could not allocate metaspace: 1073741824 bytes
Command exited with non-zero status (1)
elapsed time: 1 seconds
memory usage: 67224 kbytes
cpu usage: 0.000 seconds

nileshtakale commented Sep 28, 2015

Yes, it does gets executed. I did check that, while installing safeexec.
Now after doing some modifications in command and location of the execution getting below error.

/usr/java_visualizer/safeexec-master/safeexec --chroot_dir . --exec_dir / --share_newnet --nproc 50 --mem 3000000 --nfile 30 --env_vars CLASSPATH=/cp/:/cp/javax.json-1.0.jar:/java/lib/tools.jar --exec /usr/java_visualizer/java_jail-master/java/bin/java traceprinter.InMemory < /usr/java_visualizer/java_jail-master/cp/traceprinter/test-input.txt

Error occurred during initialization of VM
Could not allocate metaspace: 1073741824 bytes
Command exited with non-zero status (1)
elapsed time: 1 seconds
memory usage: 67224 kbytes
cpu usage: 0.000 seconds

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Sep 28, 2015

Owner

Try increasing --mem

Owner

daveagp commented Sep 28, 2015

Try increasing --mem

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Sep 28, 2015

this is weird..

/usr/java_visualizer/safeexec-master/safeexec --chroot_dir . --exec_dir / --share_newnet --nproc 50 --mem 30000000 --nfile 30 --env_vars CLASSPATH=/cp/:/cp/javax.json-1.0.jar:/java/lib/tools.jar --exec /usr/java_visualizer/java_jail-master/java/bin/java traceprinter.InMemory < /usr/java_visualizer/java_jail-master/cp/traceprinter/test-input.txt

Error:

Could not find or load main class traceprinter.InMemory
Command exited with non-zero status (1)
elapsed time: 0 seconds
memory usage: 0 kbytes
cpu usage: 0.052 seconds

nileshtakale commented Sep 28, 2015

this is weird..

/usr/java_visualizer/safeexec-master/safeexec --chroot_dir . --exec_dir / --share_newnet --nproc 50 --mem 30000000 --nfile 30 --env_vars CLASSPATH=/cp/:/cp/javax.json-1.0.jar:/java/lib/tools.jar --exec /usr/java_visualizer/java_jail-master/java/bin/java traceprinter.InMemory < /usr/java_visualizer/java_jail-master/cp/traceprinter/test-input.txt

Error:

Could not find or load main class traceprinter.InMemory
Command exited with non-zero status (1)
elapsed time: 0 seconds
memory usage: 0 kbytes
cpu usage: 0.052 seconds

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Sep 28, 2015

Owner

Is your pwd the jail? (I assume so since chroot_dir is . )

Double-check that the file java_jail/cp/traceprinter/InMemory.class exists and is readable by anyone

Owner

daveagp commented Sep 28, 2015

Is your pwd the jail? (I assume so since chroot_dir is . )

Double-check that the file java_jail/cp/traceprinter/InMemory.class exists and is readable by anyone

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Sep 28, 2015

I'm at / and yes the class exists and readable by anyone.

nileshtakale commented Sep 28, 2015

I'm at / and yes the class exists and readable by anyone.

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Oct 3, 2015

It is there.
file

nileshtakale commented Oct 3, 2015

It is there.
file

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Oct 3, 2015

Owner

Can you show me the output of "sudo find / | grep libpthread"

Owner

daveagp commented Oct 3, 2015

Can you show me the output of "sudo find / | grep libpthread"

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Oct 3, 2015

Please check
libpthread

nileshtakale commented Oct 3, 2015

Please check
libpthread

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Oct 3, 2015

Owner

You need it in the exact same subfolder of jail as it appears in the root. So instead of java_jail-master/lib64, put it in java_jail-master/lib/x86_64-linux-gnu

Owner

daveagp commented Oct 3, 2015

You need it in the exact same subfolder of jail as it appears in the root. So instead of java_jail-master/lib64, put it in java_jail-master/lib/x86_64-linux-gnu

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Oct 3, 2015

After copying all files from /jai/lib64 to /jail/lib, I executed below command and it gave me output.

/usr/java_visualizer/safeexec-master/safeexec --chroot_dir /usr/java_visualizer/java_jail-master --exec_dir / --share_newnet --nproc 50 --mem 30000000 --nfile 30 --env_vars CLASSPATH=./cp/:./cp/javax.json-1.0.jar:./java/lib/tools.jar --exec /java/bin/java traceprinter.InMemory < /usr/java_visualizer/java_jail-master/cp/traceprinter/test-input.txt

now what next?

nileshtakale commented Oct 3, 2015

After copying all files from /jai/lib64 to /jail/lib, I executed below command and it gave me output.

/usr/java_visualizer/safeexec-master/safeexec --chroot_dir /usr/java_visualizer/java_jail-master --exec_dir / --share_newnet --nproc 50 --mem 30000000 --nfile 30 --env_vars CLASSPATH=./cp/:./cp/javax.json-1.0.jar:./java/lib/tools.jar --exec /java/bin/java traceprinter.InMemory < /usr/java_visualizer/java_jail-master/cp/traceprinter/test-input.txt

now what next?

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Oct 3, 2015

Owner

If that output looks more or less correct, try using the web interface again.

Owner

daveagp commented Oct 3, 2015

If that output looks more or less correct, try using the web interface again.

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Oct 3, 2015

Yeah, I tried but as you said "configuring the glue to the webserver" is what we need to do

nileshtakale commented Oct 3, 2015

Yeah, I tried but as you said "configuring the glue to the webserver" is what we need to do

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Oct 3, 2015

Owner

So what happens when you try to use the visualizer webpage now?

Owner

daveagp commented Oct 3, 2015

So what happens when you try to use the visualizer webpage now?

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Oct 3, 2015

Faced below error
safeexec

nileshtakale commented Oct 3, 2015

Faced below error
safeexec

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Oct 3, 2015

Owner

Go into java_safe_maketrace.php, uncomment the line "// echo $jv_cmd; // for debugging" and try again.

Owner

daveagp commented Oct 3, 2015

Go into java_safe_maketrace.php, uncomment the line "// echo $jv_cmd; // for debugging" and try again.

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Oct 3, 2015

Below is the error description,
error_dev

nileshtakale commented Oct 3, 2015

Below is the error description,
error_dev

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Oct 3, 2015

I do not know if I am correct or not but why it is looking at below location?

:/cp/visualizer-stdlib traceprinter.InMemory. Class file is not at that location.

nileshtakale commented Oct 3, 2015

I do not know if I am correct or not but why it is looking at below location?

:/cp/visualizer-stdlib traceprinter.InMemory. Class file is not at that location.

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Oct 3, 2015

Owner

Not sure what you are asking me. Is "class file is not at that location" an error message? It should be there. And this worked, no?

/usr/java_visualizer/safeexec-master/safeexec --chroot_dir /usr/java_visualizer/java_jail-master --exec_dir / --share_newnet --nproc 50 --mem 30000000 --nfile 30 --env_vars CLASSPATH=./cp/:./cp/javax.json-1.0.jar:./java/lib/tools.jar --exec /java/bin/java traceprinter.InMemory < /usr/java_visualizer/java_jail-master/cp/traceprinter/test-input.txt

In that error message there is the command-line string. Try running it at the command-line manually.

Owner

daveagp commented Oct 3, 2015

Not sure what you are asking me. Is "class file is not at that location" an error message? It should be there. And this worked, no?

/usr/java_visualizer/safeexec-master/safeexec --chroot_dir /usr/java_visualizer/java_jail-master --exec_dir / --share_newnet --nproc 50 --mem 30000000 --nfile 30 --env_vars CLASSPATH=./cp/:./cp/javax.json-1.0.jar:./java/lib/tools.jar --exec /java/bin/java traceprinter.InMemory < /usr/java_visualizer/java_jail-master/cp/traceprinter/test-input.txt

In that error message there is the command-line string. Try running it at the command-line manually.

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Oct 3, 2015

Yes, I did get output from above command.
That's what I am telling you there is no file InMemory.class at /jail/cp/visualizer-stdlib.

Command from error message

/usr/java_visualizer/safeexec-master/safeexec --chroot_dir /usr/java_visualizer/java_jail-master/ --clock 15 --cpu 10 --mem 4000000 --exec_dir / --env_vars '' --nproc 50 --nfile 50 --share_newnet --exec /usr/java_visualizer/java_jail-master/java/bin/java -Xmx512M -cp /cp/:/cp/javax.json-1.0.jar:/java/lib/tools.jar:/cp/visualizer-stdlib traceprinter.InMemory

error 2 (No such file or directory): execve error

Command exited with non-zero status (1)
elapsed time: 0 seconds
memory usage: 0 kbytes
cpu usage: 0.000 seconds

nileshtakale commented Oct 3, 2015

Yes, I did get output from above command.
That's what I am telling you there is no file InMemory.class at /jail/cp/visualizer-stdlib.

Command from error message

/usr/java_visualizer/safeexec-master/safeexec --chroot_dir /usr/java_visualizer/java_jail-master/ --clock 15 --cpu 10 --mem 4000000 --exec_dir / --env_vars '' --nproc 50 --nfile 50 --share_newnet --exec /usr/java_visualizer/java_jail-master/java/bin/java -Xmx512M -cp /cp/:/cp/javax.json-1.0.jar:/java/lib/tools.jar:/cp/visualizer-stdlib traceprinter.InMemory

error 2 (No such file or directory): execve error

Command exited with non-zero status (1)
elapsed time: 0 seconds
memory usage: 0 kbytes
cpu usage: 0.000 seconds

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Oct 3, 2015

Owner

I don't think you are correctly understanding what the command line is doing. It's telling java there are 4 classpath elements. The traceprinter.InMemory need not be in the 4th one.

The problem I DO see is that the generated command is wrong. Where it says "--exec /usr/java_visualizer/java_jail-master/java/bin/java" it should just say "--exec /java/bin/java" because that's the correct path once you've been chrooted. Did you make further changes to the config.json file or did you make alterations to java_safe_ram_maketrace.php?

Owner

daveagp commented Oct 3, 2015

I don't think you are correctly understanding what the command line is doing. It's telling java there are 4 classpath elements. The traceprinter.InMemory need not be in the 4th one.

The problem I DO see is that the generated command is wrong. Where it says "--exec /usr/java_visualizer/java_jail-master/java/bin/java" it should just say "--exec /java/bin/java" because that's the correct path once you've been chrooted. Did you make further changes to the config.json file or did you make alterations to java_safe_ram_maketrace.php?

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Oct 3, 2015

Ok. I had done changes in java_safe_ram_maketrace.php and changed config.json for jail and safeexec paths. After reverting changes in java_safe_ram_maketrace.php facing below error.

error_php

nileshtakale commented Oct 3, 2015

Ok. I had done changes in java_safe_ram_maketrace.php and changed config.json for jail and safeexec paths. After reverting changes in java_safe_ram_maketrace.php facing below error.

error_php

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Oct 3, 2015

Command from error message and its message,

/usr/java_visualizer/safeexec-master/safeexec --chroot_dir /usr/java_visualizer/java_jail-master/ --clock 15 --cpu 10 --mem 4000000 --exec_dir / --env_vars '' --nproc 50 --nfile 50 --share_newnet --exec /java/bin/java -Xmx512M -cp /cp/:/cp/javax.json-1.0.jar:/java/lib/tools.jar:/cp/visualizer-stdlib traceprinter.InMemory

Time Limit Exceeded
elapsed time: 15 seconds
memory usage: 2799760 kbytes
cpu usage: 0.116 seconds

nileshtakale commented Oct 3, 2015

Command from error message and its message,

/usr/java_visualizer/safeexec-master/safeexec --chroot_dir /usr/java_visualizer/java_jail-master/ --clock 15 --cpu 10 --mem 4000000 --exec_dir / --env_vars '' --nproc 50 --nfile 50 --share_newnet --exec /java/bin/java -Xmx512M -cp /cp/:/cp/javax.json-1.0.jar:/java/lib/tools.jar:/cp/visualizer-stdlib traceprinter.InMemory

Time Limit Exceeded
elapsed time: 15 seconds
memory usage: 2799760 kbytes
cpu usage: 0.116 seconds

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Oct 3, 2015

Owner

Try increasing the memory limit specified in the json file to 30000000.

Owner

daveagp commented Oct 3, 2015

Try increasing the memory limit specified in the json file to 30000000.

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Oct 3, 2015

Same error,

Server error. Report a bug to daveagp@gmail.com (click 'Generate URL' and include it). Debug info (also copied to console):
textStatus: parsererror
errorThrown: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Server reply: /usr/java_visualizer/safeexec-master/safeexec --chroot_dir /usr/java_visualizer/java_jail-master/ --clock 15 --cpu 10 --mem 30000000 --exec_dir / --env_vars '' --nproc 50 --nfile 50 --share_newnet --exec /java/bin/java -Xmx512M -cp /cp/:/cp/javax.json-1.0.jar:/java/lib/tools.jar:/cp/visualizer-stdlib traceprinter.InMemory{"code":"public class ClassNameHere {\n public static void main(String[] args) {\n \n }\n}","stdin":"","trace":[{"stdout":"","event":"call","line":4,"stack_to_render":[{"func_name":"main:4","encoded_locals":{},"ordered_varnames":[],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"1","frame_id":1}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}},{"stdout":"","event":"step_line","line":4,"stack_to_render":[{"func_name":"main:4","encoded_locals":{},"ordered_varnames":[],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"2","frame_id":2}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}},{"stdout":"","event":"return","line":4,"stack_to_render":[{"func_name":"main:4","encoded_locals":{"return":["VOID"]},"ordered_varnames":["return"],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"3","frame_id":3}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}}],"userlog":"Debugger VM maxMemory: 455M\n"}

nileshtakale commented Oct 3, 2015

Same error,

Server error. Report a bug to daveagp@gmail.com (click 'Generate URL' and include it). Debug info (also copied to console):
textStatus: parsererror
errorThrown: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Server reply: /usr/java_visualizer/safeexec-master/safeexec --chroot_dir /usr/java_visualizer/java_jail-master/ --clock 15 --cpu 10 --mem 30000000 --exec_dir / --env_vars '' --nproc 50 --nfile 50 --share_newnet --exec /java/bin/java -Xmx512M -cp /cp/:/cp/javax.json-1.0.jar:/java/lib/tools.jar:/cp/visualizer-stdlib traceprinter.InMemory{"code":"public class ClassNameHere {\n public static void main(String[] args) {\n \n }\n}","stdin":"","trace":[{"stdout":"","event":"call","line":4,"stack_to_render":[{"func_name":"main:4","encoded_locals":{},"ordered_varnames":[],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"1","frame_id":1}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}},{"stdout":"","event":"step_line","line":4,"stack_to_render":[{"func_name":"main:4","encoded_locals":{},"ordered_varnames":[],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"2","frame_id":2}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}},{"stdout":"","event":"return","line":4,"stack_to_render":[{"func_name":"main:4","encoded_locals":{"return":["VOID"]},"ordered_varnames":["return"],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"3","frame_id":3}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}}],"userlog":"Debugger VM maxMemory: 455M\n"}

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Oct 3, 2015

Owner

Re-comment out the debugging line in java_safe_maketrace.php

Owner

daveagp commented Oct 3, 2015

Re-comment out the debugging line in java_safe_maketrace.php

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Oct 3, 2015

Hey..its working now.

working

nileshtakale commented Oct 3, 2015

Hey..its working now.

working

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Oct 3, 2015

Owner

Excellent! Have fun!

Owner

daveagp commented Oct 3, 2015

Excellent! Have fun!

@daveagp daveagp closed this Oct 3, 2015

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Oct 3, 2015

Thanks a lot!

nileshtakale commented Oct 3, 2015

Thanks a lot!

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Oct 29, 2015

Sorry to bother you again but after fresh installation on AWS I am getting below error,

pytutor_ajax_timeout_millis is not defined. The variable is there in config.js.php.
All commands for java jail and safeexec are executing properly.

Could you please help?

Thanks.

nileshtakale commented Oct 29, 2015

Sorry to bother you again but after fresh installation on AWS I am getting below error,

pytutor_ajax_timeout_millis is not defined. The variable is there in config.js.php.
All commands for java jail and safeexec are executing properly.

Could you please help?

Thanks.

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Oct 31, 2015

Owner

Please start a new issue thread, not this one.

Did you remember to copy jv-config.example.json to jv-config.json as specified in the README?

Owner

daveagp commented Oct 31, 2015

Please start a new issue thread, not this one.

Did you remember to copy jv-config.example.json to jv-config.json as specified in the README?

@nileshtakale

This comment has been minimized.

Show comment
Hide comment
@nileshtakale

nileshtakale Oct 31, 2015

Hey...we got it resolved..we updated the PHP version and it worked.

Thanks.

nileshtakale commented Oct 31, 2015

Hey...we got it resolved..we updated the PHP version and it worked.

Thanks.

@susobhang70

This comment has been minimized.

Show comment
Hide comment
@susobhang70

susobhang70 Nov 5, 2015

Hi,
I am having a similar issue to the one mentioned in this thread. I'm on CentOS release 5.8 (Final)

When I try this command from java_jail:
/home/ssad1/safeexec/safeexec --share_newnet --nproc 50 --mem 30000000 --nfile 30 --env_vars CLASSPATH=./cp/:./cp/javax.json-1.0.jar:./java/lib/tools.jar --exec ./java/bin/java traceprinter.InMemory < cp/traceprinter/test-input.txt

Output is:
Exception in thread "event-handler" java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:714)
at traceprinter.JSONTracingThread.handleEvent(JSONTracingThread.java:221)
at traceprinter.JSONTracingThread.run(JSONTracingThread.java:136)
OK
elapsed time: 2 seconds
memory usage: 5092524 kbytes
cpu usage: 1.585 seconds

When I run this:
/home/ssad1/safeexec/safeexec --chroot_dir . --exec_dir / --share_newnet --nproc 50 --mem 3000000 --nfile 30 --env_vars CLASSPATH=/cp/:/cp/javax.json-1.0.jar:/java/lib/tools.jar --exec /java/bin/java traceprinter.InMemory < cp/traceprinter/test-input.txt

Output is:
Error occurred during initialization of VM
Could not allocate metaspace: 1073741824 bytes
Command exited with non-zero status (1)
elapsed time: 0 seconds
memory usage: 0 kbytes
cpu usage: 0.000 seconds

Both are run from inside the java_jail

susobhang70 commented Nov 5, 2015

Hi,
I am having a similar issue to the one mentioned in this thread. I'm on CentOS release 5.8 (Final)

When I try this command from java_jail:
/home/ssad1/safeexec/safeexec --share_newnet --nproc 50 --mem 30000000 --nfile 30 --env_vars CLASSPATH=./cp/:./cp/javax.json-1.0.jar:./java/lib/tools.jar --exec ./java/bin/java traceprinter.InMemory < cp/traceprinter/test-input.txt

Output is:
Exception in thread "event-handler" java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:714)
at traceprinter.JSONTracingThread.handleEvent(JSONTracingThread.java:221)
at traceprinter.JSONTracingThread.run(JSONTracingThread.java:136)
OK
elapsed time: 2 seconds
memory usage: 5092524 kbytes
cpu usage: 1.585 seconds

When I run this:
/home/ssad1/safeexec/safeexec --chroot_dir . --exec_dir / --share_newnet --nproc 50 --mem 3000000 --nfile 30 --env_vars CLASSPATH=/cp/:/cp/javax.json-1.0.jar:/java/lib/tools.jar --exec /java/bin/java traceprinter.InMemory < cp/traceprinter/test-input.txt

Output is:
Error occurred during initialization of VM
Could not allocate metaspace: 1073741824 bytes
Command exited with non-zero status (1)
elapsed time: 0 seconds
memory usage: 0 kbytes
cpu usage: 0.000 seconds

Both are run from inside the java_jail

@daveagp

This comment has been minimized.

Show comment
Hide comment
@daveagp

daveagp Nov 6, 2015

Owner

Please use a new issue. There, tell me what happens when you increase the --mem argument.

Owner

daveagp commented Nov 6, 2015

Please use a new issue. There, tell me what happens when you increase the --mem argument.

Repository owner locked and limited conversation to collaborators Nov 6, 2015

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.