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

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8044398 Attach code should propagate errors in Diagnostic Commands as errors
From:       Staffan Larsen <staffan.larsen () oracle ! com>
Date:       2014-05-30 17:01:42
Message-ID: BD706028-C6DD-4A18-8026-4A72E468605D () oracle ! com
[Download RAW message or body]

Thanks Dan!

On 30 maj 2014, at 15:26, Daniel D. Daugherty <daniel.daugherty@oracle.com> wrote:

> > webrev: http://cr.openjdk.java.net/~sla/8044398/webrev.00/
> 
> src/share/vm/services/attachListener.cpp
> No comment.
> 
> Thumbs up!
> 
> Dan
> 
> 
> On 5/30/14 12:51 AM, Staffan Larsen wrote:
> > The code in attachListener.cpp does this:
> > 
> > DCmd::parse_and_execute(DCmd_Source_AttachAPI, out, op->arg(0), ' ', THREAD);
> > if (HAS_PENDING_EXCEPTION) {
> > java_lang_Throwable::print(PENDING_EXCEPTION, out);
> > out->cr();
> > CLEAR_PENDING_EXCEPTION;
> > // The exception has been printed on the output stream
> > // If the JVM returns JNI_ERR, the attachAPI throws a generic I/O
> > // exception and the content of the output stream is not processed.
> > // By returning JNI_OK, the exception will be displayed on the client side
> > }
> > return JNI_OK;
> > 
> > That was correct before the fix of JDK-8039173. After that fix, the attach \
> > framework is able to propagate error messages as exceptions when an attach \
> > command fails. 
> > The code in attachListener.cpp should be updated to:
> > 
> > DCmd::parse_and_execute(DCmd_Source_AttachAPI, out, op->arg(0), ' ', THREAD);
> > if (HAS_PENDING_EXCEPTION) {
> > java_lang_Throwable::print(PENDING_EXCEPTION, out);
> > out->cr();
> > CLEAR_PENDING_EXCEPTION;
> > return JNI_ERR;
> > }
> > return JNI_OK;
> > 
> > webrev: http://cr.openjdk.java.net/~sla/8044398/webrev.00/
> > bug: https://bugs.openjdk.java.net/browse/JDK-8044398
> > 
> > Thanks,
> > /Staffan
> > 
> 


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

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