1

we have a Javascript test setup with Rhino + Envjs and CI server running Ubuntu. We're running our tests from the command line with the following:

java -cp ext/js.jar:ext/jline.jar org.mozilla.javascript.tools.shell.Main -opt -1 -f run.js

Now we surprisingly got following problem : the test running stops, printing only the following:

[  Envjs/1.6 (Rhino; U; Linux amd64 3.2.0-33-generic; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]
Killed

At another computer (Mac) the same tests pass without problems. I tried debug switch -debug and Java memory size -Xmx1024m but those didn't help.

NOTE: Restarting the server solved the problem this time.

UPDATE : After some days this has happened today a couple of times, however subsequent builds have succeeded.

UPDATE 2 : This seems to happen every now and then, sometimes also after test have been succesfully run.

This might be a single case, but do you have idea what could be the reason or how to debug Rhino if something like this happens again?

br, Touko

Touko
  • 11,359
  • 16
  • 75
  • 105

1 Answers1

1

"Killed" means the process was terminated by a signal from the outside. Common cases are:

  • Someone used kill with the wrong process ID
  • There is a system resource monitor installed which terminates processes that take too many resources. On Linux, use ulimit and ask your sysadmin.
  • Your OS runs out of memory in a place where it can't let Java know about the error (i.e. this happens when the OS itself needs memory to complete an operation for the Java VM like I/O).
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
  • At our virtual server, ulimit was 'unlimited' but this might be related to memory problems. Memory was added for our virtual server, let's see if the problem still happens in the future. – Touko Jan 30 '13 at 12:04
  • :-/ You should get an OutOfMemoryError if Java can't get any more memory from the OS. Did you check the system log for errors? – Aaron Digulla Jan 30 '13 at 13:14
  • Checking out /var/log/syslog , found the following infos many times : "... Out of memory: Kill process 934 (java) score 337 or sacrifice child", "... Killed process 934 (java) total-vm:1969140kB, anon-rss:695888kB, file-rss:0kB". Java didn't show any errors/exceptions, though, only that "Killed". – Touko Jan 30 '13 at 13:25
  • In that case, the OS runs out of memory for some reason and then stops the Java VM without giving it a chance to handle the error. – Aaron Digulla Jan 30 '13 at 13:26