s5z / zsim

A fast and scalable x86-64 multicore simulator
GNU General Public License v2.0
337 stars 186 forks source link

Problem with running simple Java application #88

Open cyk0521 opened 8 years ago

cyk0521 commented 8 years ago

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)

s5z commented 8 years ago

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

Sebastian-G commented 6 years ago

Is there any way to use higher JDK versions?