[PATCH] 7142035 assert in j.l.instrument agents during shutdown when daemon thread is running

Chan, Sunny Sunny.Chan at gs.com
Wed Jan 8 07:48:55 PST 2014


Hi Staffan

I wrote the test with a shell script and creating lots of classes because that's the easiest way to trigger the bug. I will try to rewrite the test in Pure Java and multiple classloaders and see whether it will trigger the bug - I will get back to you on this.

In terms of the bug fix itself does it look fine?

Thanks,
Sunny

-----Original Message-----
From: Staffan Larsen [mailto:staffan.larsen at oracle.com] 
Sent: 08 January 2014 22:27
To: Chan, Sunny [Tech]
Cc: serviceability-dev at openjdk.java.net serviceability-dev at openjdk.java.net
Subject: Re: [PATCH] 7142035 assert in j.l.instrument agents during shutdown when daemon thread is running

Chan,

Thanks for providing a patch and extra points for adding a test case!

We are trying to move away from writing tests in shell-scripts because they tend to break more often than Java-based tests. Do you think it is possible to re-write your test case in pure Java? There are some helper classes for launching processes and parsing output in test/lib/testlibrary/jdk/testlibrary/. 

What is the reason for creating so many classes? Is that the best way to provoke the bug? If loading classes is the most efficient way of provoking the bug, perhaps it would be possible to re-write the test to load the same class over and over again in multiple class loaders instead of creating a ton of different classes?

Thanks,
/Staffan

On 23 dec 2013, at 08:57, Chan, Sunny <Sunny.Chan at gs.com> wrote:

> Hello,
> 
> I would like to proposed the following patch to fix the bug 7142035. The missing assert could cause an Assertion failure message if you install a java.lang.instrument agent and have a daemon thread running in the JVM. I have also included a regression test that demonstrate the issue.
> 
> Please review this and let me know if we need to modify the patch in any way.
> 
> Sunny Chan, Executive Director, Technology Goldman Sachs (Asia) L.L.C. 
> | 68th Floor | Cheung Kong Center | 2 Queens Road Central | Hong Kong
> email:  sunny.chan at gs.com | Tel: +852 2978 6481 | Fax: +852 2978 0633
> 
> This message may contain information that is confidential or privileged.  If you are not the intended recipient, please advise the sender immediately and delete this message.  See http://www.gs.com/disclaimer/email for further information on confidentiality and the risks inherent in electronic communication.
> 
> <7142035.patch>



More information about the serviceability-dev mailing list