Cheleswer, Some times ago I invented LingeredAppWithDeadlock for tests like this one.
Please take a look at: .../jdk/test/sun/tools/jstack/DeadlockDetectionTest.java .../hotspot/test/serviceability/sa/DeadlockDetectionTest.java -Dmitry On 2016-04-05 13:23, Cheleswer Sahu wrote: > Hi, > > > > Please review the code changes for > https://bugs.openjdk.java.net/browse/JDK-8153319. > > > > Webrev link: http://cr.openjdk.java.net/~csahu/8153319/ > > > > > > Bug Brief: Test is failing on some platforms. > > > > Problem Identified: Newly created child thread (NamedThread) is > finished its execution before main thread calls “jstack”, which result > in test failure. > > > > Solution Proposed: Set the child thread in sleep state for forever and > make sure that “jstack “ tool always gets executed after ” NamedThread” > is started. > > > > > > Regards, > > Cheleswer > > > > > -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * I would love to change the world, but they won't give me the sources.