RE: RFR: JDK-8154144 Tests in com/sun/jdi fails intermittently with "jdb input stream closed prematurely

2016-04-28 Thread Sharath Ballal
Hi Dan,   The debugger has received a ‘vmDeathEvent’ and as part of handling this event, the System.exit() is being called (handleExitEvent() in EventHandler.java).  So the fact that debuggee has finished executing, is known to the debugger and the debugger is explicitly cleaning up after that

Re: RFR : JDK-8154166 - java/lang/management/MemoryMXBean/ResetPeakMemoryUsage.java fails with RuntimeException

2016-04-28 Thread Harsha Wardhana B
Hi Jaroslav, I am not sure how @required tag works. I searched code base and it is not used in any file. Also, the documentation on Jtreg page is sparse. Could you paste an example as to how to use it? Also, I would still think that repeated gc via weak-reference is right and defensive appro

Re: RFR (XS): 8150725 JDWP specification: referenceTypeID size needs clarification

2016-04-28 Thread serguei.spit...@oracle.com
Thanks, Dan! Serguei On 4/28/16 06:49, Daniel D. Daugherty wrote: Ties moduleID to objectID and there's existing verbiage about objectID being possibly variant in size depending on the implementation. Thumbs up. Dan On 4/28/16 1:00 AM, serguei.spit...@oracle.com wrote: Please, review the J

Re: RFR (XS): 8150725 JDWP specification: referenceTypeID size needs clarification

2016-04-28 Thread serguei.spit...@oracle.com
On 4/28/16 04:59, Alan Bateman wrote: On 28/04/2016 08:00, serguei.spit...@oracle.com wrote: Please, review the JDWP spec change in the pubs repository. This is the jdwp-spec.html patch: I think this looks okay. Thanks! Serguei -Alan

Re: RFR: JDK-8154144 Tests in com/sun/jdi fails intermittently with "jdb input stream closed prematurely

2016-04-28 Thread Daniel D. Daugherty
> When JDB is done, as part of the shutdown it calls System.exit() > at Env.java:92 in a different thread 'event-handler'. Based on the above line from below, I'm even more convinced that this bug is hit because the debuggee VM is allowed to run off the end of main() and that creates a race betwe

Re: RFR (XS): 8150725 JDWP specification: referenceTypeID size needs clarification

2016-04-28 Thread Daniel D. Daugherty
Ties moduleID to objectID and there's existing verbiage about objectID being possibly variant in size depending on the implementation. Thumbs up. Dan On 4/28/16 1:00 AM, serguei.spit...@oracle.com wrote: Please, review the JDWP spec change in the pubs repository. This is the jdwp-spec.html p

Re: RFR (XS): 8150725 JDWP specification: referenceTypeID size needs clarification

2016-04-28 Thread Alan Bateman
On 28/04/2016 08:00, serguei.spit...@oracle.com wrote: Please, review the JDWP spec change in the pubs repository. This is the jdwp-spec.html patch: I think this looks okay. -Alan

Re: RFR: JDK-8154144 Tests in com/sun/jdi fails intermittently with "jdb input stream closed prematurely

2016-04-28 Thread Staffan Larsen
Hi Sharath, Ah, I see: it is the call to System.exit() that is causing readLine to return. That makes sense, and I now understand the fix. Reviewed. Thanks, /Staffan > On 28 apr. 2016, at 10:25, Sharath Ballal wrote: > > Hi Staffan, > The root cause of this problem is that BufferedReader.rea

Re: RFR (XS): 8153190 JVMTI GetAllModules should make it clear that it also returns unnamed module

2016-04-28 Thread serguei.spit...@oracle.com
On 4/28/16 02:48, Alan Bateman wrote: On 28/04/2016 10:44, serguei.spit...@oracle.com wrote: Please, review the JVM TI spec one-liner fix below. The jvmti.xml patch: diff -r 888f37103953 src/share/vm/prims/jvmti.xml --- a/src/share/vm/prims/jvmti.xmlWed Apr 27 11:25:16 2016 +0200 +++ b/

Re: RFR (XS): 8153190 JVMTI GetAllModules should make it clear that it also returns unnamed module

2016-04-28 Thread Alan Bateman
On 28/04/2016 10:44, serguei.spit...@oracle.com wrote: Please, review the JVM TI spec one-liner fix below. The jvmti.xml patch: diff -r 888f37103953 src/share/vm/prims/jvmti.xml --- a/src/share/vm/prims/jvmti.xmlWed Apr 27 11:25:16 2016 +0200 +++ b/src/share/vm/prims/jvmti.xmlThu Apr

RFR (XS): 8153190 JVMTI GetAllModules should make it clear that it also returns unnamed module

2016-04-28 Thread serguei.spit...@oracle.com
Please, review the JVM TI spec one-liner fix below. The jvmti.xml patch: diff -r 888f37103953 src/share/vm/prims/jvmti.xml --- a/src/share/vm/prims/jvmti.xmlWed Apr 27 11:25:16 2016 +0200 +++ b/src/share/vm/prims/jvmti.xmlThu Apr 28 02:24:09 2016 -0700 @@ -6482,6 +6482,7 @@ Get A

Re: RFR(s) 8153711: [REDO] JDWP: Memory Leak: GlobalRefs never deleted when processing invokeMethod command

2016-04-28 Thread Severin Gehwolf
On Tue, 2016-04-19 at 19:32 -0700, serguei.spit...@oracle.com wrote: > > Hi Severin, > > > > I postpone a push for this fix. > > > > There are two nsk.jdi test failures (they look like deadlocks): > >   nsk/jdi/ObjectReference/invokeMethod/invokemethod012 FAIL(TIMEOUT) > >   nsk/jdi/Scenarios/inv

RE: RFR: JDK-8154144 Tests in com/sun/jdi fails intermittently with "jdb input stream closed prematurely

2016-04-28 Thread Sharath Ballal
Hi Staffan, The root cause of this problem is that BufferedReader.readLine() is intermittently returning 'null' during System.exit(0). In TTY.java:751 we are always blocking on readLine(). Whenever a user enters a command in JDB, the readLine() returns the command, which gets executed. This i

Re: RFR: JDK-8154144 Tests in com/sun/jdi fails intermittently with "jdb input stream closed prematurely

2016-04-28 Thread Staffan Larsen
Hi Sharath, Can you explain more how this help with the problem in the bug? It looks like you are trying to avoid a race by not printing the "Input stream closed.” message while shutting down. You added this: 136 ((TTY)notifier).setShuttingDown(true); 137 Env.shutdown(

RFR: JDK-8154144 Tests in com/sun/jdi fails intermittently with "jdb input stream closed prematurely

2016-04-28 Thread Sharath Ballal
Hi, Pls review the change for bug HYPERLINK "https://bugs.openjdk.java.net/browse/JDK-8154144"JDK-8154144 - Tests in com/sun/jdi fails intermittently with "jdb input stream closed prematurely Webrev: http://cr.openjdk.java.net/~sballal/8154144/webrev.00/ -Sharath Ballal

Re: RFR (XS): 8150725 JDWP specification: referenceTypeID size needs clarification

2016-04-28 Thread serguei.spit...@oracle.com
Dmitry, On 4/28/16 00:04, Dmitry Samersoff wrote: Serguei, Should "same as objectID" be replaced to explicit size? No, it is VM implementation dependent. Please, see the following statement in the spec: "Object ids, reference type ids, field ids, method ids, and frame ids may be sized diff

Re: RFR (XS): 8150725 JDWP specification: referenceTypeID size needs clarification

2016-04-28 Thread serguei.spit...@oracle.com
Sorry. Forgot to attach the resulting jdwp-spec.html file. Please, find it in the attachment now. Thanks, Serguei On 4/28/16 00:00, serguei.spit...@oracle.com wrote: Please, review the JDWP spec change in the pubs repository. This is the jdwp-spec.html patch: diff -r 419446ca4a1b docs/technot

Re: RFR (XS): 8150725 JDWP specification: referenceTypeID size needs clarification

2016-04-28 Thread Dmitry Samersoff
Serguei, Should "same as objectID" be replaced to explicit size? Looks good for me. -Dmitry On 2016-04-28 10:00, serguei.spit...@oracle.com wrote: > Please, review the JDWP spec change in the pubs repository. > > This is the jdwp-spec.html patch: > > diff -r 419446ca4a1b docs/technotes/guide

RFR (XS): 8150725 JDWP specification: referenceTypeID size needs clarification

2016-04-28 Thread serguei.spit...@oracle.com
Please, review the JDWP spec change in the pubs repository. This is the jdwp-spec.html patch: diff -r 419446ca4a1b docs/technotes/guides/jpda/jdwp-spec.html --- a/docs/technotes/guides/jpda/jdwp-spec.html Thu Apr 21 13:37:56 2016 -0700 +++ b/docs/technotes/guides/jpda/jdwp-spec.html Wed Apr 27