[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: 8222821: com/sun/jdi/ExceptionEvents.java failed
From:       Daniil Titov <daniil.x.titov () oracle ! com>
Date:       2019-04-30 20:28:51
Message-ID: 2C6101E9-D67D-4105-9CDD-972930BBD420 () oracle ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thank you, Dean, JC, Chris, and Serguei, for reviewing this change!

 

Best regards,

Daniil

 

 

 

From: Chris Plummer <chris.plummer@oracle.com>
Date: Tuesday, April 30, 2019 at 11:39 AM
To: Daniil Titov <daniil.x.titov@oracle.com>
Subject: Re: FW: 8222821: com/sun/jdi/ExceptionEvents.java failed

 

Looks good.

Chris



 

 

From: serviceability-dev <serviceability-dev-bounces@openjdk.java.net> on behalf of \
                Jean Christophe Beyler <jcbeyler@google.com>
Date: Thursday, April 25, 2019 at 7:38 PM
To: <dean.long@oracle.com>
Cc: OpenJDK Serviceability <serviceability-dev@openjdk.java.net>
Subject: Re: RFR: 8222821: com/sun/jdi/ExceptionEvents.java failed

 

Hi Daniil,

 

Looks good to me too, (thanks for the detailed explanation about the test failure btw \
:-)),

Jc

 

On Thu, Apr 25, 2019 at 6:43 PM <dean.long@oracle.com> wrote:

Looks good.

dl

On 4/25/19 6:33 PM, Daniil Titov wrote:
> Please review the change that fixes an intermittent failure of the test when \
> running with Graal on. 
> The test creates exception requests for different kinds of exceptions and errors, \
> starts the debuggee that throws an exception, and listens for exception events. If \
> the number of received exception events is not equal to 1 the test fails. For the \
> case when the exception request is created for java.lang.Error class  the test \
> intermittently fails if Graal is on. It happens because, sometimes, in addition to \
> StackOverflowError thrown by the test itself, jdk.vm.ci.common.JVMCIError is thrown \
> from method getField() in class jdk.vm.ci.hotspot .HotSpotVMConfigAccess at line \
> 252 (src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java)
>  
> 240       private VMField getField(String name, String cppType, boolean required) {
> 241               VMField entry = store.vmFields.get(name);
> 242               if (entry == null) {
> 243                   if (!required) {
> 244                       return null;
> 245                   }
> 246                   store.printConfig();
> 247                   throw new JVMCIError("expected VM field not found in " + \
> store + ": " + name); 248               }
> 249       
> 250               // Make sure the native type is still the type we expect.
> 251               if (cppType != null && !cppType.equals(entry.type)) {
> 252                   throw new JVMCIError("expected type " + cppType + " but VM \
> field " + name + " is of type " + entry.type); 253               }
> 254               return entry;
> 255           }
> 
> that in one case is caught at line 412 in \
> src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java
>  
> 404           public final int pendingFailedSpeculationOffset;
> 405           {
> 406               String name = "JavaThread::_pending_failed_speculation";
> 407               int offset = -1;
> 408               try {
> 409                   offset = getFieldOffset(name, Integer.class, "jlong");
> 410               } catch (JVMCIError e) {
> 411                   try {
> 412                       offset = getFieldOffset(name, Integer.class, "long");
> 413                   } catch (JVMCIError e2) {
> 414                   }
> 415               }
> 416               if (offset == -1) {
> 417                   throw new JVMCIError("cannot get offset of field " + name + " \
> with type long or jlong"); 418               }
> 419               pendingFailedSpeculationOffset = offset;
> 420           }
> 
> and in other case at line 229 in the same class \
> (src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java)
>  
> 221       public final int classMirrorOffset;
> 222           {
> 223               String name = "Klass::_java_mirror";
> 224               int offset = -1;
> 225               boolean isHandle = false;
> 226               try {
> 227                   offset = getFieldOffset(name, Integer.class, "oop");
> 228               } catch (JVMCIError e) {
> 229       
> 230               }
> 231               if (offset == -1) {
> 232                   try {
> 233                       offset = getFieldOffset(name, Integer.class, "jobject");
> 234                       isHandle = true;
> 235                   } catch (JVMCIError e) {
> 236                       try {
> 237                           // JDK-8186777
> 238                           offset = getFieldOffset(name, Integer.class, \
> "OopHandle"); 239                           isHandle = true;
> 240                       } catch (JVMCIError e2) {
> 241                       }
> 242                   }
> 243               }
> 244               if (offset == -1) {
> 245                   throw new JVMCIError("cannot get offset of field " + name + " \
> with type oop, jobject or OopHandle"); 246               }
> 247               classMirrorOffset = offset;
> 248               classMirrorIsHandle = isHandle;
> 249           }
> 
> That results in the number of received exception events exceeds 1 and the test \
> fails. 
> To ignore these unexpected events the fix adds "jdk.vm.ci.hotspot.*"  class \
> exclusion filter when it creates an exception request. 
> Webrev: http://cr.openjdk.java.net/~dtitov/8222821/webrev.01/
> Bug: https://bugs.openjdk.java.net/browse/JDK-8222821
> 
> Thanks!
> -Daniil
> 
> 
> 


 

-- 

 

Thanks,

Jc

 


[Attachment #5 (text/html)]

<html xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type \
content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 \
(filtered medium)"><style><!-- /* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
	{mso-style-name:msonormal;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
span.EmailStyle18
	{mso-style-type:personal;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
span.EmailStyle20
	{mso-style-type:personal-reply;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p \
class=MsoNormal>Thank you, Dean, JC, Chris, and Serguei, for reviewing this \
change!<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Best \
regards,<o:p></o:p></p><p class=MsoNormal>Daniil<o:p></o:p></p><p \
class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p \
class=MsoNormal><o:p>&nbsp;</o:p></p><div style='border:none;border-top:solid #B5C4DF \
1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span \
style='font-size:12.0pt;color:black'>From: </span></b><span \
style='font-size:12.0pt;color:black'>Chris Plummer \
&lt;chris.plummer@oracle.com&gt;<br><b>Date: </b>Tuesday, April 30, 2019 at 11:39 \
AM<br><b>To: </b>Daniil Titov &lt;daniil.x.titov@oracle.com&gt;<br><b>Subject: \
</b>Re: FW: 8222821: com/sun/jdi/ExceptionEvents.java \
failed<o:p></o:p></span></p></div><div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Looks \
good.<br><br>Chris<br><br><br><o:p></o:p></p></div><p \
class=MsoNormal>&nbsp;<o:p></o:p></p><p class=MsoNormal>&nbsp;<o:p></o:p></p><div \
style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p \
class=MsoNormal><b><span style='font-size:12.0pt;color:black'>From: </span></b><span \
style='font-size:12.0pt;color:black'>serviceability-dev <a \
href="mailto:serviceability-dev-bounces@openjdk.java.net">&lt;serviceability-dev-bounces@openjdk.java.net&gt;</a> \
on behalf of Jean Christophe Beyler <a \
href="mailto:jcbeyler@google.com">&lt;jcbeyler@google.com&gt;</a><br><b>Date: \
</b>Thursday, April 25, 2019 at 7:38 PM<br><b>To: </b><a \
href="mailto:dean.long@oracle.com">&lt;dean.long@oracle.com&gt;</a><br><b>Cc: \
</b>OpenJDK Serviceability <a \
href="mailto:serviceability-dev@openjdk.java.net">&lt;serviceability-dev@openjdk.java.net&gt;</a><br><b>Subject: \
</b>Re: RFR: 8222821: com/sun/jdi/ExceptionEvents.java \
failed</span><o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>Hi \
Daniil,<o:p></o:p></p><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p \
class=MsoNormal>Looks good to me too, (thanks for the detailed explanation about the \
test failure btw :-)),<o:p></o:p></p><div><p \
class=MsoNormal>Jc<o:p></o:p></p></div></div></div><p \
class=MsoNormal>&nbsp;<o:p></o:p></p><div><div><p class=MsoNormal>On Thu, Apr 25, \
2019 at 6:43 PM &lt;<a \
href="mailto:dean.long@oracle.com">dean.long@oracle.com</a>&gt; \
wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC \
1.0pt;padding:0in 0in 0in \
6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><p \
class=MsoNormal style='margin-bottom:12.0pt'>Looks good.<br><br>dl<br><br>On 4/25/19 \
6:33 PM, Daniil Titov wrote:<br>&gt; Please review the change that fixes an \
intermittent failure of the test when running with Graal on.<br>&gt;<br>&gt; The test \
creates exception requests for different kinds of exceptions and errors, starts the \
debuggee that throws an exception, and listens for exception events. If the number of \
received exception events is not equal to 1 the test fails. For the case when the \
exception request is created for java.lang.Error class&nbsp; the test intermittently \
fails if Graal is on. It happens because, sometimes, in addition to \
StackOverflowError thrown by the test itself, jdk.vm.ci.common.JVMCIError is thrown \
from method getField() in class jdk.vm.ci.hotspot .HotSpotVMConfigAccess at line 252 \
(src/<a href="http://jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java" \
target="_blank">jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java</a>)<br>&gt;<br>&gt; \
240&nbsp; &nbsp; &nbsp; &nbsp;private VMField getField(String name, String cppType, \
boolean required) {<br>&gt;&nbsp; &nbsp; &nbsp;241&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp;VMField entry = store.vmFields.get(name);<br>&gt;&nbsp; &nbsp; \
&nbsp;242&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (entry == null) \
{<br>&gt;&nbsp; &nbsp; &nbsp;243&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp;if (!required) {<br>&gt;&nbsp; &nbsp; &nbsp;244&nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return \
null;<br>&gt;&nbsp; &nbsp; &nbsp;245&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp;}<br>&gt;&nbsp; &nbsp; &nbsp;246&nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;store.printConfig();<br>&gt;&nbsp; &nbsp; \
&nbsp;247&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;throw \
new JVMCIError(&quot;expected VM field not found in &quot; + store + &quot;: &quot; + \
name);<br>&gt;&nbsp; &nbsp; &nbsp;248&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;}<br>&gt;&nbsp; &nbsp; &nbsp;249&nbsp; &nbsp; &nbsp; &nbsp;<br>&gt;&nbsp; \
&nbsp; &nbsp;250&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Make sure \
the native type is still the type we expect.<br>&gt;&nbsp; &nbsp; &nbsp;251&nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (cppType != null &amp;&amp; \
!cppType.equals(entry.type)) {<br>&gt;&nbsp; &nbsp; &nbsp;252&nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;throw new JVMCIError(&quot;expected \
type &quot; + cppType + &quot; but VM field &quot; + name + &quot; is of type &quot; \
+ entry.type);<br>&gt;&nbsp; &nbsp; &nbsp;253&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp;}<br>&gt;&nbsp; &nbsp; &nbsp;254&nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;return entry;<br>&gt;&nbsp; &nbsp; &nbsp;255&nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;}<br>&gt;<br>&gt; that in one case is caught at line 412 \
in src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java<br>&gt;<br>&gt;&nbsp; \
&nbsp; &nbsp;404&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;public final int \
pendingFailedSpeculationOffset;<br>&gt;&nbsp; &nbsp; &nbsp;405&nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp;{<br>&gt;&nbsp; &nbsp; &nbsp;406&nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;String name = \
&quot;JavaThread::_pending_failed_speculation&quot;;<br>&gt;&nbsp; &nbsp; \
&nbsp;407&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int offset = \
-1;<br>&gt;&nbsp; &nbsp; &nbsp;408&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;try {<br>&gt;&nbsp; &nbsp; &nbsp;409&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;offset = getFieldOffset(name, Integer.class, \
&quot;jlong&quot;);<br>&gt;&nbsp; &nbsp; &nbsp;410&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp;} catch (JVMCIError e) {<br>&gt;&nbsp; &nbsp; &nbsp;411&nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;try {<br>&gt;&nbsp; \
&nbsp; &nbsp;412&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp;offset = getFieldOffset(name, Integer.class, \
&quot;long&quot;);<br>&gt;&nbsp; &nbsp; &nbsp;413&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} catch (JVMCIError e2) {<br>&gt;&nbsp; &nbsp; \
&nbsp;414&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;}<br>&gt;&nbsp; &nbsp; &nbsp;415&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp;}<br>&gt;&nbsp; &nbsp; &nbsp;416&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp;if (offset == -1) {<br>&gt;&nbsp; &nbsp; &nbsp;417&nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;throw new \
JVMCIError(&quot;cannot get offset of field &quot; + name + &quot; with type long or \
jlong&quot;);<br>&gt;&nbsp; &nbsp; &nbsp;418&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp;}<br>&gt;&nbsp; &nbsp; &nbsp;419&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp;pendingFailedSpeculationOffset = offset;<br>&gt;&nbsp; &nbsp; \
&nbsp;420&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>&gt;<br>&gt; and in other case \
at line 229 in the same class \
(src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java)<br>&gt;<br>&gt; \
221&nbsp; &nbsp; &nbsp; &nbsp;public final int classMirrorOffset;<br>&gt;&nbsp; \
&nbsp; &nbsp;222&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br>&gt;&nbsp; &nbsp; \
&nbsp;223&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;String name = \
&quot;Klass::_java_mirror&quot;;<br>&gt;&nbsp; &nbsp; &nbsp;224&nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int offset = -1;<br>&gt;&nbsp; &nbsp; \
&nbsp;225&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;boolean isHandle = \
false;<br>&gt;&nbsp; &nbsp; &nbsp;226&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;try {<br>&gt;&nbsp; &nbsp; &nbsp;227&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;offset = getFieldOffset(name, Integer.class, \
&quot;oop&quot;);<br>&gt;&nbsp; &nbsp; &nbsp;228&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp;} catch (JVMCIError e) {<br>&gt;&nbsp; &nbsp; &nbsp;229&nbsp; \
&nbsp; &nbsp; &nbsp;<br>&gt;&nbsp; &nbsp; &nbsp;230&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp;}<br>&gt;&nbsp; &nbsp; &nbsp;231&nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;if (offset == -1) {<br>&gt;&nbsp; &nbsp; &nbsp;232&nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;try {<br>&gt;&nbsp; \
&nbsp; &nbsp;233&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp;offset = getFieldOffset(name, Integer.class, \
&quot;jobject&quot;);<br>&gt;&nbsp; &nbsp; &nbsp;234&nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;isHandle = true;<br>&gt;&nbsp; \
&nbsp; &nbsp;235&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;} catch (JVMCIError e) {<br>&gt;&nbsp; &nbsp; &nbsp;236&nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;try {<br>&gt;&nbsp; \
&nbsp; &nbsp;237&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;// JDK-8186777<br>&gt;&nbsp; &nbsp; &nbsp;238&nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;offset = getFieldOffset(name, Integer.class, \
&quot;OopHandle&quot;);<br>&gt;&nbsp; &nbsp; &nbsp;239&nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;isHandle = \
true;<br>&gt;&nbsp; &nbsp; &nbsp;240&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} catch (JVMCIError e2) {<br>&gt;&nbsp; &nbsp; \
&nbsp;241&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;}<br>&gt;&nbsp; &nbsp; &nbsp;242&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;}<br>&gt;&nbsp; &nbsp; &nbsp;243&nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>&gt;&nbsp; &nbsp; &nbsp;244&nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (offset == -1) {<br>&gt;&nbsp; &nbsp; \
&nbsp;245&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;throw \
new JVMCIError(&quot;cannot get offset of field &quot; + name + &quot; with type oop, \
jobject or OopHandle&quot;);<br>&gt;&nbsp; &nbsp; &nbsp;246&nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>&gt;&nbsp; &nbsp; &nbsp;247&nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;classMirrorOffset = offset;<br>&gt;&nbsp; \
&nbsp; &nbsp;248&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;classMirrorIsHandle = isHandle;<br>&gt;&nbsp; &nbsp; &nbsp;249&nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;}<br>&gt;<br>&gt; That results in the number of received \
exception events exceeds 1 and the test fails.<br>&gt;<br>&gt; To ignore these \
unexpected events the fix adds &quot;jdk.vm.ci.hotspot.*&quot;&nbsp; class exclusion \
filter when it creates an exception request.<br>&gt;<br>&gt; Webrev: <a \
href="http://cr.openjdk.java.net/%7Edtitov/8222821/webrev.01/" \
target="_blank">http://cr.openjdk.java.net/~dtitov/8222821/webrev.01/</a><br>&gt; \
Bug: <a href="https://bugs.openjdk.java.net/browse/JDK-8222821" \
target="_blank">https://bugs.openjdk.java.net/browse/JDK-8222821</a><br>&gt;<br>&gt; \
Thanks!<br>&gt; -Daniil<br>&gt;<br>&gt;<br>&gt;<o:p></o:p></p></blockquote></div><p \
class=MsoNormal><br clear=all><o:p></o:p></p><div><p \
class=MsoNormal>&nbsp;<o:p></o:p></p></div><p class=MsoNormal>-- \
<o:p></o:p></p><div><div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><p \
class=MsoNormal>Thanks,<o:p></o:p></p><div><p \
class=MsoNormal>Jc<o:p></o:p></p></div></div></div><p><o:p>&nbsp;</o:p></p></div></body></html>



[Attachment #6 (message/rfc822)]

> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.


   Hi Daniil,
 
 Looks good to me.
 
 Thanks,
 Serguei
 
 
 
On 4/25/19 7:37 PM, Jean Christophe Beyler wrote:
 
 
  
Hi Daniil, 

 
 
Looks good to me too, (thanks for the detailed explanation about the test failure btw \
:-)),  Jc
 
 
 
 
 
On Thu, Apr 25, 2019 at 6:43 PM <dean.long@oracle.com> wrote:
 
 
Looks good.
 
 dl
 
 On 4/25/19 6:33 PM, Daniil Titov wrote:
 > Please review the change that fixes an intermittent failure of the test when \
running with Graal on.  >
 > The test creates exception requests for different kinds of exceptions and errors, \
starts the debuggee that throws an exception, and listens for exception events. If \
the number of received exception events is not equal to 1 the test fails. For the \
case when the exception request is created for java.lang.Error class   the test \
intermittently fails if Graal is on. It happens because, sometimes, in addition to \
StackOverflowError thrown by the test itself, jdk.vm.ci.common.JVMCIError is thrown \
from method getField() in class jdk.vm.ci.hotspot .HotSpotVMConfigAccess at line 252 \
(src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java)
  >
 > 240           private VMField getField(String name, String cppType, boolean \
required) {  >        241                       VMField entry = \
store.vmFields.get(name);  >        242                       if (entry == null) {
 >        243                             if (!required) {
 >        244                                   return null;
 >        245                             }
 >        246                             store.printConfig();
 >        247                             throw new JVMCIError("expected VM field not \
found in " + store + ": " + name);  >        248                       }
 >        249           
 >        250                       // Make sure the native type is still the type we \
expect.  >        251                       if (cppType != null && \
!cppType.equals(entry.type)) {  >        252                             throw new \
JVMCIError("expected type " + cppType + " but VM field " + name + " is of type " + \
entry.type);  >        253                       }
 >        254                       return entry;
 >        255                 }
 >
 > that in one case is caught at line 412 in \
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java
  >
 >        404                 public final int pendingFailedSpeculationOffset;
 >        405                 {
 >        406                       String name = \
"JavaThread::_pending_failed_speculation";  >        407                       int \
offset = -1;  >        408                       try {
 >        409                             offset = getFieldOffset(name, \
Integer.class, "jlong");  >        410                       } catch (JVMCIError e) {
 >        411                             try {
 >        412                                   offset = getFieldOffset(name, \
Integer.class, "long");  >        413                             } catch (JVMCIError \
e2) {  >        414                             }
 >        415                       }
 >        416                       if (offset == -1) {
 >        417                             throw new JVMCIError("cannot get offset of \
field " + name + " with type long or jlong");  >        418                       }
 >        419                       pendingFailedSpeculationOffset = offset;
 >        420                 }
 >
 > and in other case at line 229 in the same class \
(src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java)
  >
 > 221           public final int classMirrorOffset;
 >        222                 {
 >        223                       String name = "Klass::_java_mirror";
 >        224                       int offset = -1;
 >        225                       boolean isHandle = false;
 >        226                       try {
 >        227                             offset = getFieldOffset(name, \
Integer.class, "oop");  >        228                       } catch (JVMCIError e) {
 >        229           
 >        230                       }
 >        231                       if (offset == -1) {
 >        232                             try {
 >        233                                   offset = getFieldOffset(name, \
Integer.class, "jobject");  >        234                                   isHandle = \
true;  >        235                             } catch (JVMCIError e) {
 >        236                                   try {
 >        237                                         // JDK-8186777
 >        238                                         offset = getFieldOffset(name, \
Integer.class, "OopHandle");  >        239                                         \
isHandle = true;  >        240                                   } catch (JVMCIError \
e2) {  >        241                                   }
 >        242                             }
 >        243                       }
 >        244                       if (offset == -1) {
 >        245                             throw new JVMCIError("cannot get offset of \
field " + name + " with type oop, jobject or OopHandle");  >        246               \
}  >        247                       classMirrorOffset = offset;
 >        248                       classMirrorIsHandle = isHandle;
 >        249                 }
 >
 > That results in the number of received exception events exceeds 1 and the test \
fails.  >
 > To ignore these unexpected events the fix adds "jdk.vm.ci.hotspot.*"   class \
exclusion filter when it creates an exception request.  >
 > Webrev: http://cr.openjdk.java.net/~dtitov/8222821/webrev.01/
 > Bug: https://bugs.openjdk.java.net/browse/JDK-8222821
 >
 > Thanks!
 > -Daniil
 >
 >
 >
 
 
 
 
 

 
 -- 
 
 
 

 
 Thanks, 
Jc
 
 
 
 


[Attachment #9 (text/html)]

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi Daniil,<br>
    <br>
    Looks good to me.<br>
    <br>
    Thanks,<br>
    Serguei<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 4/25/19 7:37 PM, Jean Christophe
      Beyler wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAF9BGBx3iLBHKw4tfPXVA61ruDtW2rDyE1EeV15XL__L5mRFGw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <div dir="ltr">Hi Daniil,
        <div><br>
        </div>
        <div>Looks good to me too, (thanks for the detailed explanation
          about the test failure btw :-)),
          <div>Jc</div>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Thu, Apr 25, 2019 at 6:43
          PM &lt;<a href="mailto:dean.long@oracle.com"
            moz-do-not-send="true">dean.long@oracle.com</a>&gt; wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Looks
          good.<br>
          <br>
          dl<br>
          <br>
          On 4/25/19 6:33 PM, Daniil Titov wrote:<br>
          &gt; Please review the change that fixes an intermittent
          failure of the test when running with Graal on.<br>
          &gt;<br>
          &gt; The test creates exception requests for different kinds
          of exceptions and errors, starts the debuggee that throws an
          exception, and listens for exception events. If the number of
          received exception events is not equal to 1 the test fails.
          For the case when the exception request is created for
          java.lang.Error class   the test intermittently fails if Graal
          is on. It happens because, sometimes, in addition to
          StackOverflowError thrown by the test itself,
          jdk.vm.ci.common.JVMCIError is thrown from method getField()
          in class jdk.vm.ci.hotspot .HotSpotVMConfigAccess at line 252
          (src/<a
href="http://jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java"
  rel="noreferrer" target="_blank" \
moz-do-not-send="true">jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java</a>)<br>
  &gt;<br>
          &gt; 240           private VMField getField(String name, String
          cppType, boolean required) {<br>
          &gt;        241                       VMField entry =
          store.vmFields.get(name);<br>
          &gt;        242                       if (entry == null) {<br>
          &gt;        243                             if (!required) {<br>
          &gt;        244                                   return null;<br>
          &gt;        245                             }<br>
          &gt;        246                             store.printConfig();<br>
          &gt;        247                             throw new JVMCIError("expected
          VM field not found in " + store + ": " + name);<br>
          &gt;        248                       }<br>
          &gt;        249           <br>
          &gt;        250                       // Make sure the native type is
          still the type we expect.<br>
          &gt;        251                       if (cppType != null &amp;&amp;
          !cppType.equals(entry.type)) {<br>
          &gt;        252                             throw new JVMCIError("expected
          type " + cppType + " but VM field " + name + " is of type " +
          entry.type);<br>
          &gt;        253                       }<br>
          &gt;        254                       return entry;<br>
          &gt;        255                 }<br>
          &gt;<br>
          &gt; that in one case is caught at line 412 in
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java<br>
  &gt;<br>
          &gt;        404                 public final int
          pendingFailedSpeculationOffset;<br>
          &gt;        405                 {<br>
          &gt;        406                       String name =
          "JavaThread::_pending_failed_speculation";<br>
          &gt;        407                       int offset = -1;<br>
          &gt;        408                       try {<br>
          &gt;        409                             offset = getFieldOffset(name,
          Integer.class, "jlong");<br>
          &gt;        410                       } catch (JVMCIError e) {<br>
          &gt;        411                             try {<br>
          &gt;        412                                   offset =
          getFieldOffset(name, Integer.class, "long");<br>
          &gt;        413                             } catch (JVMCIError e2) {<br>
          &gt;        414                             }<br>
          &gt;        415                       }<br>
          &gt;        416                       if (offset == -1) {<br>
          &gt;        417                             throw new JVMCIError("cannot
          get offset of field " + name + " with type long or jlong");<br>
          &gt;        418                       }<br>
          &gt;        419                       pendingFailedSpeculationOffset =
          offset;<br>
          &gt;        420                 }<br>
          &gt;<br>
          &gt; and in other case at line 229 in the same class
(src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java)<br>
  &gt;<br>
          &gt; 221           public final int classMirrorOffset;<br>
          &gt;        222                 {<br>
          &gt;        223                       String name =
          "Klass::_java_mirror";<br>
          &gt;        224                       int offset = -1;<br>
          &gt;        225                       boolean isHandle = false;<br>
          &gt;        226                       try {<br>
          &gt;        227                             offset = getFieldOffset(name,
          Integer.class, "oop");<br>
          &gt;        228                       } catch (JVMCIError e) {<br>
          &gt;        229           <br>
          &gt;        230                       }<br>
          &gt;        231                       if (offset == -1) {<br>
          &gt;        232                             try {<br>
          &gt;        233                                   offset =
          getFieldOffset(name, Integer.class, "jobject");<br>
          &gt;        234                                   isHandle = true;<br>
          &gt;        235                             } catch (JVMCIError e) {<br>
          &gt;        236                                   try {<br>
          &gt;        237                                         // JDK-8186777<br>
          &gt;        238                                         offset =
          getFieldOffset(name, Integer.class, "OopHandle");<br>
          &gt;        239                                         isHandle = \
                true;<br>
          &gt;        240                                   } catch (JVMCIError e2) \
{<br>  &gt;        241                                   }<br>
          &gt;        242                             }<br>
          &gt;        243                       }<br>
          &gt;        244                       if (offset == -1) {<br>
          &gt;        245                             throw new JVMCIError("cannot
          get offset of field " + name + " with type oop, jobject or
          OopHandle");<br>
          &gt;        246                       }<br>
          &gt;        247                       classMirrorOffset = offset;<br>
          &gt;        248                       classMirrorIsHandle = isHandle;<br>
          &gt;        249                 }<br>
          &gt;<br>
          &gt; That results in the number of received exception events
          exceeds 1 and the test fails.<br>
          &gt;<br>
          &gt; To ignore these unexpected events the fix adds
          "jdk.vm.ci.hotspot.*"   class exclusion filter when it creates
          an exception request.<br>
          &gt;<br>
          &gt; Webrev: <a
            href="http://cr.openjdk.java.net/%7Edtitov/8222821/webrev.01/"
            rel="noreferrer" target="_blank" \
moz-do-not-send="true">http://cr.openjdk.java.net/~dtitov/8222821/webrev.01/</a><br>  \
&gt; Bug: <a  href="https://bugs.openjdk.java.net/browse/JDK-8222821"
            rel="noreferrer" target="_blank" \
moz-do-not-send="true">https://bugs.openjdk.java.net/browse/JDK-8222821</a><br>  \
&gt;<br>  &gt; Thanks!<br>
          &gt; -Daniil<br>
          &gt;<br>
          &gt;<br>
          &gt;<br>
          <br>
        </blockquote>
      </div>
      <br clear="all">
      <div><br>
      </div>
      -- <br>
      <div dir="ltr" class="gmail_signature">
        <div dir="ltr">
          <div><br>
          </div>
          Thanks,
          <div>Jc</div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic