0

I am using an opensource tool called dimmunix to catch the deadlock sequence and in particular interested in creating a sequence of interleaving to create deadlock manually using jdb.If i am using java with dimmunix with -java agent option it is perfectly working fine.But whenever i am trying to run it with jdb -J-javaagent option it is throwing an exception i have a strong feeling that it is not relation to my application/tool,

Exception is

Exception in thread "launched target monitor" java.lang.IllegalMonitorStateException
    at java.lang.UNIXProcess.waitFor(UNIXProcess.java:181)
    at com.sun.tools.jdi.AbstractLauncher$Helper$1.run(AbstractLauncher.java:235)
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable

Can anyone help me out.

Nizam
  • 5,698
  • 9
  • 45
  • 57
Sur123
  • 35
  • 9
  • Copy and paste you commands and error message including stack trace from the exception instead of rephrasing it – Miserable Variable Nov 06 '13 at 03:46
  • jdb -classpath ./dimmunix-java/test -J-Xbootclasspath/p:./dimmunix-java/src/Dimmunix/bin:./asm-3.2/lib/asm-3.2.jar -J-javaagent:./dimmunix-java/src/DimmunixInstrumentation/DimmunixAgent.jar dimmunixTests.Test Initializing jdb ... > run run dimmunixTests.Test Exception in thread "launched target monitor" java.lang.IllegalMonitorStateException at java.lang.UNIXProcess.waitFor(UNIXProcess.java:181) at com.sun.tools.jdi.AbstractLauncher$Helper$1.run(AbstractLauncher.java:235) Set uncaught java.lang.Throwable Set deferred uncaught java.lang.Throwable > – Sur123 Nov 06 '13 at 04:14
  • @MiserableVariable please reply if you have any idea... – Sur123 Nov 06 '13 at 04:37
  • I am afraid I don't. There is no `-J` flag for `jdb` so I am pretty sure you are doing that wrong, but I can relate that to the error message – Miserable Variable Nov 06 '13 at 06:46
  • @MiserableVariable http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jdb.html documentation by oracle it is given that we can use -J option ...is it correct? – Sur123 Nov 06 '13 at 11:34
  • You are correct, I had a blackout because on command line did not list that (but it does accept it). But what is `java.lang.UnixProcess`? Is that a class from `JDK`? – Miserable Variable Nov 06 '13 at 16:00
  • @MiserableVariable even i m unable to find out why it is coming? – Sur123 Nov 07 '13 at 05:05

1 Answers1

0

Are you passing the right arguments? -J-javaagent does not seem correct. See Tutorials about javaagents

Community
  • 1
  • 1
Xuan
  • 460
  • 5
  • 13
  • I am actually modifying the same command i am using with java jdb -classpath ./dimmunix-java/test -J-Xbootclasspath/p:./dimmunix-java/src/Dimmunix/bin:./asm-3.2/lib/asm-3.2.jar -J-javaagent:./dimmunix-java/src/DimmunixInstrumentation/DimmunixAgent.jar dimmunixTests.Test – Sur123 Nov 07 '13 at 07:05