Re: RFR: 8309752: com/sun/jdi/SetLocalWhileThreadInNative.java fails with virtual test thread factory due to OpaqueFrameException [v2]

2023-06-12 Thread Chris Plummer
On Sat, 10 Jun 2023 02:56:47 GMT, Chris Plummer  wrote:

>> com/sun/jdi/SetLocalWhileThreadInNative.java is failing with 
>> OpaqueFrameException when using the virtual test thread factory. The reason 
>> is because JDI only supports calling StackFrame.setValue() on the topmost 
>> frame of a virtual thread. The test is calling it on the 
>> ThreadReference.frames(2), so the OpaqueFrameException is correct behavior 
>> and the test needs to adapt.
>> 
>> I could have chosen to just not have this test support running on a virtual 
>> thread, but it appears to be the only test we have that attempts 
>> StackFrame.setValue() on something other than the topmost frame, so it's 
>> good to have it expect the OpaqueFrameException.
>> 
>> Tested locally with and without the virtual thread wrapper. tier1 and tier5 
>> svc testing tbd.
>
> Chris Plummer has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   caughtOPE -> caughtOFE

Thanks for the reviews Leonid and Serguei!

-

PR Comment: https://git.openjdk.org/jdk/pull/14402#issuecomment-1587826234


Re: RFR: 8309752: com/sun/jdi/SetLocalWhileThreadInNative.java fails with virtual test thread factory due to OpaqueFrameException [v2]

2023-06-11 Thread Leonid Mesnik
On Sat, 10 Jun 2023 02:56:47 GMT, Chris Plummer  wrote:

>> com/sun/jdi/SetLocalWhileThreadInNative.java is failing with 
>> OpaqueFrameException when using the virtual test thread factory. The reason 
>> is because JDI only supports calling StackFrame.setValue() on the topmost 
>> frame of a virtual thread. The test is calling it on the 
>> ThreadReference.frames(2), so the OpaqueFrameException is correct behavior 
>> and the test needs to adapt.
>> 
>> I could have chosen to just not have this test support running on a virtual 
>> thread, but it appears to be the only test we have that attempts 
>> StackFrame.setValue() on something other than the topmost frame, so it's 
>> good to have it expect the OpaqueFrameException.
>> 
>> Tested locally with and without the virtual thread wrapper. tier1 and tier5 
>> svc testing tbd.
>
> Chris Plummer has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   caughtOPE -> caughtOFE

Marked as reviewed by lmesnik (Reviewer).

-

PR Review: https://git.openjdk.org/jdk/pull/14402#pullrequestreview-1473772526


Re: RFR: 8309752: com/sun/jdi/SetLocalWhileThreadInNative.java fails with virtual test thread factory due to OpaqueFrameException [v2]

2023-06-09 Thread Chris Plummer
> com/sun/jdi/SetLocalWhileThreadInNative.java is failing with 
> OpaqueFrameException when using the virtual test thread factory. The reason 
> is because JDI only supports calling StackFrame.setValue() on the topmost 
> frame of a virtual thread. The test is calling it on the 
> ThreadReference.frames(2), so the OpaqueFrameException is correct behavior 
> and the test needs to adapt.
> 
> I could have chosen to just not have this test support running on a virtual 
> thread, but it appears to be the only test we have that attempts 
> StackFrame.setValue() on something other than the topmost frame, so it's good 
> to have it expect the OpaqueFrameException.
> 
> Tested locally with and without the virtual thread wrapper. tier1 and tier5 
> svc testing tbd.

Chris Plummer has updated the pull request incrementally with one additional 
commit since the last revision:

  caughtOPE -> caughtOFE

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/14402/files
  - new: https://git.openjdk.org/jdk/pull/14402/files/ee21d434..2799ebe6

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=14402&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14402&range=00-01

  Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/14402.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14402/head:pull/14402

PR: https://git.openjdk.org/jdk/pull/14402


Re: RFR: 8309752: com/sun/jdi/SetLocalWhileThreadInNative.java fails with virtual test thread factory due to OpaqueFrameException

2023-06-09 Thread Serguei Spitsyn
On Fri, 9 Jun 2023 20:47:13 GMT, Chris Plummer  wrote:

> com/sun/jdi/SetLocalWhileThreadInNative.java is failing with 
> OpaqueFrameException when using the virtual test thread factory. The reason 
> is because JDI only supports calling StackFrame.setValue() on the topmost 
> frame of a virtual thread. The test is calling it on the 
> ThreadReference.frames(2), so the OpaqueFrameException is correct behavior 
> and the test needs to adapt.
> 
> I could have chosen to just not have this test support running on a virtual 
> thread, but it appears to be the only test we have that attempts 
> StackFrame.setValue() on something other than the topmost frame, so it's good 
> to have it expect the OpaqueFrameException.
> 
> Tested locally with and without the virtual thread wrapper. tier1 and tier5 
> svc testing tbd.

Looks good.
Thanks,
Serguei

test/jdk/com/sun/jdi/SetLocalWhileThreadInNative.java line 166:

> 164: List localVars = frame.visibleVariables();
> 165: boolean changedLocal = false;
> 166: boolean caughtOPE = false;

Nit: Should it be caughtOFE instead of caughtOPE?

-

Marked as reviewed by sspitsyn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/14402#pullrequestreview-1473268372
PR Review Comment: https://git.openjdk.org/jdk/pull/14402#discussion_r1224999636


RFR: 8309752: com/sun/jdi/SetLocalWhileThreadInNative.java fails with virtual test thread factory due to OpaqueFrameException

2023-06-09 Thread Chris Plummer
com/sun/jdi/SetLocalWhileThreadInNative.java is failing with 
OpaqueFrameException when using the virtual test thread factory. The reason is 
because JDI only supports calling StackFrame.setValue() on the topmost frame of 
a virtual thread. The test is calling it on the ThreadReference.frames(2), so 
the OpaqueFrameException is correct behavior and the test needs to adapt.

I could have chosen to just not have this test support running on a virtual 
thread, but it appears to be the only test we have that attempts 
StackFrame.setValue() on something other than the topmost frame, so it's good 
to have it expect the OpaqueFrameException.

Tested locally with and without the virtual thread wrapper. tier1 and tier5 svc 
testing tbd.

-

Commit messages:
 - Fix jcheck error
 - Expect OpaqueFrameException when using virtual threads.

Changes: https://git.openjdk.org/jdk/pull/14402/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14402&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8309752
  Stats: 11 lines in 2 files changed: 7 ins; 1 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/14402.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14402/head:pull/14402

PR: https://git.openjdk.org/jdk/pull/14402