zsim icon indicating copy to clipboard operation
zsim copied to clipboard

Problem with running simple Java application

Open cyk0521 opened this issue 10 years ago • 2 comments

In order to speficy my problem #85 , I try running a simple java application, which utlizes Thread.sleep(x).


pulic class TestThread {
   public static void main(String args[]) {
     try {
         System.out.println("Sleep");
         Thread.sleep(50);
         System.out.println("Woke up");
      } catch (InterruptedException e) {
          System.out.println("Thread interrupted.");
      }
   }   
}


and my cfg file is same as tests/hooks.cfg except "process" section.

process0 = {
    command = "/usr/bin/java TestThread";
}

and executed zsim in java program directory.

$ cd ~/java-test/   # java class files in here 
$ ~/zsim/build/opt/zsim ~/zsim/tests/java.cfg

then, following messages are printed.

...
[H] Creating global segment, 1024 MBs
[H] Global segment shmid = 4554753
[H] Deadlock detection ON
[H] Attached to global heap
Sleep
[H] WARN: Stalled for 20 secs so far
...
[H] WARN: Stalled for 130 secs so far
[H] WARN: Deadlock detected, killing children
[H] Received interrupt
[H] Attempting graceful termination
[H] Killing process 47559
[H] Done sending kill signals
[H] WARN: Hard death at exit (1 children running), killing the whole process tree
Killed

I also tried sim.pinOption="-smc_strict", but the result was not changed. In ISCA'13 paper, authors report that ZSim supports java workloads. I think some of syscalls/signals are ignored/stolen (by zsim). How to find clear solution for this problem?

PS. I modified java source codes to simplify the problem.

environment:

Ubuntu 14.04.3 LTS, 3.13.0-74-generic kernel, g++ 4.8.4, pin2.14-71293 java version "1.7.0_91" OpenJDK Runtime Environment (IcedTea 2.6.3) (7u91-2.6.3-0ubuntu0.14.04.1) OpenJDK 64-Bit Server VM (build 24.91-b01, mixed mode)

cyk0521 avatar Jan 14 '16 05:01 cyk0521

Can you try the 1.5 JDK? That's what we use. Also, see #91.

s5z avatar Feb 20 '16 00:02 s5z

Is there any way to use higher JDK versions?

Sebastian-G avatar Aug 27 '18 18:08 Sebastian-G