Aexyn / caliper

Automatically exported from code.google.com/p/caliper
Apache License 2.0
0 stars 0 forks source link

Cannot run Tutorial.java. Worker existed without producing data. Disconnected from the target VM. #278

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Windows 8, 64bit
IntelliJ

Loaded Tutorial.java into IntelliJ, running off of a caliper-all.jar snapshot 
as of 10/16/2013 built using mvn on top of a downloaded codebase. Tests do not 
complete. The JVM exits.

"Experiment selection: 
  Instruments:   [allocation, runtime]
  User parameters:   {}
  Virtual machines:  [default]
  Selection type:    Full cartesian product

This selection yields 2 experiments.
Starting experiment 1 of 10: {instrument=allocation, 
benchmarkMethod=timeNanoTime, vm=default, parameters={}}… The worker exited 
without producing data. It has likely crashed. Run with --verbose to see any 
worker output.
Disconnected from the target VM, address: '127.0.0.1:51136', transport: 'socket'

Process finished with exit code 1"

This code is run with:
final PrintWriter stdout = new PrintWriter(System.out);
final PrintWriter stderr = new PrintWriter(System.err);
try {
            CaliperMain.exitlessMain(new String[]{
                    "--run-name=" + Tutorial.class.getName(),
                    "--trials=5",
                    "--verbose",
                    Tutorial.Benchmark1.class.getName()},
                    stdout,
                    stderr);
        } catch(final Throwable e) {
            log.fatal(e);
        }

Original issue reported on code.google.com by Frank.Kl...@gmail.com on 17 Oct 2013 at 4:41

GoogleCodeExporter commented 9 years ago
I am getting the same problem.

Original comment by phishman3579@gmail.com on 5 Nov 2013 at 9:05

GoogleCodeExporter commented 9 years ago
#1, windows also?  I don't have a windows machine, but I'll see if I can 
reproduce on another OS.

Original comment by gak@google.com on 5 Nov 2013 at 9:10

GoogleCodeExporter commented 9 years ago
Yea, I am running windows and also ran into a similar problem with a build from 
today (11/05/2013).

I also tried with an extremely simple class and same result:

    public boolean runTests() {
        return true;
    }

    @Benchmark 
    public int time(int reps) {
        System.out.println("Starting "+reps+" tests.");
        boolean passed = false;
        for (int i = 0; i < reps; i++) {
            System.out.println("hi");
            try {
                passed = runTests();
            } catch (NullPointerException e) {
                System.err.println(string);
                throw e;
            }
            if (!passed) break;
        }
        if (passed) System.out.println("Tests finished. All passed.");
        else System.err.println("Tests finished. Detected a failure.");
        return -1;
    }

    public static void main(String[] args) {
        com.google.caliper.runner.CaliperMain.main(DataStructuresMicrobenchmark.class, args);
    }

Original comment by phishman3579@gmail.com on 5 Nov 2013 at 9:17

GoogleCodeExporter commented 9 years ago
Output from the run.

Experiment selection: 
  Instruments:   [allocation, runtime]
  User parameters:   {}
  Virtual machines:  [default]
  Selection type:    Full cartesian product

This selection yields 2 experiments.
Generating data.
Generated data.
Starting 1 tests.
hi
Tests finished. All passed.
Generating data.
Generated data.
Starting 1 tests.
hi
Tests finished. All passed.
Starting experiment 1 of 2: {instrument=allocation, benchmarkMethod=time, 
vm=default, parameters={}}… The worker exited without producing data. It has 
likely crashed. Run with --verbose to see any worker output.

Original comment by phishman3579@gmail.com on 5 Nov 2013 at 9:19

GoogleCodeExporter commented 9 years ago
Mind including output with --verbose?

Original comment by gak@google.com on 5 Nov 2013 at 9:34

GoogleCodeExporter commented 9 years ago
It doesn't seem to make a difference if I include verbose or not. I used the 
following in my main and it produced the same output.

CaliperMain.main(DataStructuresMicrobenchmark.class, new String[]{"--verbose"});

Original comment by phishman3579@gmail.com on 5 Nov 2013 at 9:38

GoogleCodeExporter commented 9 years ago
Here is the output:
Configuration:
  instrument.allocation.class = com.google.caliper.runner.AllocationInstrument
  instrument.allocation.options.trackAllocations = true
  instrument.arbitrary.class = com.google.caliper.runner.ArbitraryMeasurementInstrument
  instrument.arbitrary.options.gcBeforeEach = true
  instrument.runtime.class = com.google.caliper.runner.RuntimeInstrument
  instrument.runtime.options.gcBeforeEach = true
  instrument.runtime.options.measurements = 100
  instrument.runtime.options.timingInterval = 1ms
  instrument.runtime.options.warmup = 10s
  results.console.class = com.google.caliper.runner.ConsoleResultProcessor
  results.file.class = com.google.caliper.runner.OutputFileDumper
  results.upload.class = com.google.caliper.runner.HttpUploader
  results.upload.options.url = https://microbenchmarks.appspot.com/
  vm.args = -Xmx3g -Xms3g
  vm.baseDirectory = java
  vm.jdk-32-client.args = -d32 -client
  vm.jdk-32-client.home = jdk-32
  vm.jdk-32-server.args = -d32 -server
  vm.jdk-32-server.home = jdk-32
  vm.jdk-64-compressed.args = -d64 -XX:+UseCompressedOops
  vm.jdk-64-compressed.home = jdk-64
  vm.jdk-64-uncompressed.args = -d64 -XX:-UseCompressedOops
  vm.jdk-64-uncompressed.home = jdk-64
Experiment selection: 
  Instruments:   [allocation, runtime]
  User parameters:   {}
  Virtual machines:  [default]
  Selection type:    Full cartesian product

This selection yields 2 experiments.
Generating data.
Generated data.
Starting 1 tests.
hi
Tests finished. All passed.
Generating data.
Generated data.
Starting 1 tests.
hi
Tests finished. All passed.
Starting experiment 1 of 2: {instrument=allocation, benchmarkMethod=time, 
vm=default, parameters={}}… The worker exited without producing data. It has 
likely crashed. Run with --verbose to see any worker output.

  results.upload.options.url = https://microbenchmarks.appspot.com/
  vm.args = -Xmx3g -Xms3g
  vm.baseDirectory = java
  vm.jdk-32-client.args = -d32 -client
  vm.jdk-32-client.home = jdk-32
  vm.jdk-32-server.args = -d32 -server
  vm.jdk-32-server.home = jdk-32
  vm.jdk-64-compressed.args = -d64 -XX:+UseCompressedOops
  vm.jdk-64-compressed.home = jdk-64
  vm.jdk-64-uncompressed.args = -d64 -XX:-UseCompressedOops
  vm.jdk-64-uncompressed.home = jdk-64
Experiment selection: 
  Instruments:   [allocation, runtime]
  User parameters:   {reps=[3]}
  Virtual machines:  [default]
  Selection type:    Full cartesian product

This selection yields 2 experiments.
Generating data.
Generated data.
Starting 3 tests.
hi
hi
hi
Tests finished. All passed.
Generating data.
Generated data.
Starting 3 tests.
hi
hi
hi
Tests finished. All passed.
Starting experiment 1 of 2: {instrument=allocation, benchmarkMethod=time, 
vm=default, parameters={reps=3}}… The worker exited without producing data. 
It has likely crashed. Run with --verbose to see any worker output.

Original comment by phishman3579@gmail.com on 5 Nov 2013 at 9:40

GoogleCodeExporter commented 9 years ago
Actually, I think I found "a" problem... 

default config was:
vm.args=-Xmx3g -Xms3g

Which is too large, I narrowed it down to:
vm.args=-Xmx1g -Xms1g

It actually executes now...

Original comment by phishman3579@gmail.com on 5 Nov 2013 at 9:44

GoogleCodeExporter commented 9 years ago
That's surprising.  Can you run
$ java -Xmx3g -Xms3g -version
and see if it crashes?

Original comment by gak@google.com on 5 Nov 2013 at 9:49

GoogleCodeExporter commented 9 years ago
Works fine from the command line, maybe it because the benchmark is being run 
from inside an IDE?

java -Xmx3g -Xms3g -version
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

Original comment by phishman3579@gmail.com on 5 Nov 2013 at 9:54

GoogleCodeExporter commented 9 years ago
I'm running it from within IDE (IntelliJ 12.1.6)

It fails for me on OSX Mountain Lion x64

Original comment by stephen....@gmail.com on 7 Nov 2013 at 10:08