JDK-8263326 : Remove ReceiverTypeData check from serviceability/sa/TestPrintMdo.java
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc-agent
  • Affected Version: 17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-03-10
  • Updated: 2022-10-10
  • Resolved: 2021-03-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 17
11.0.18-oracleFixed 17 b14Fixed
Related Reports
Blocks :  
Duplicate :  
Description
The tests assumes that the clhsdb "printmdo -a" command will include ReceiverTypeData somewhere in the output. Normally it is from the following in the output:

MethodData 0x00007f097141b430 for method java/util/concurrent/ConcurrentHashMap.tabAt([Ljava/util/concurrent/ConcurrentHashMap$Node;I)Ljava/util/concurrent/ConcurrentHashMap$Node;@0x0000000800448820
0 bci: 15 VirtualCallData 	count(48) entries(0)
	argument types	0: stack(1) ObjArrayKlass for InstanceKlass for java/util/concurrent/ConcurrentHashMap$Node
80 bci: 18 ReceiverTypeData 	flags(1) count(0) entries(1)
	InstanceKlass for java/util/concurrent/ConcurrentHashMap$Node(3)

Sinced LingeredApp is used as the debuggee, the output of "printmdo -a" is very much subjected to the code executed by LingeredApp on startup, including any library code it calls. It is also subjected to how the VM is launched. Therefore there is no guarantee that the above mention of ReceiverTypeData will be present. We have had other issues like this in the past, thus the restrictions currently in place when running TestPrintMdo.java:

* @requires vm.flavor == "server" & !vm.emulatedClient & !(vm.opt.TieredStopAtLevel == 1)

And the LingeredApp is launched with:

app = LingeredApp.startApp("-XX:+ProfileInterpreter", "-XX:CompileThreshold=100");

I started running into problems with ReceiverTypeData not appearing in the output about 1% of the time while working on changes for JDK-8243455, which impacts code executed by LingeredApp on startup.

Rather than trying to make it so somehow we can (hopefully) guarantee that ReceiverTypeData is always present, which I'm not even sure we can do, I think it's best to just no longer rely on its presence, and not have to worry about this failure cropping up again.
Comments
Fix request [11u] I backport this for parity with 11.0.18-oracle. No risk, only a test change. Clean backport except for Copyright. Test passes. SAP nighlty testing passed.
08-10-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk11u-dev/pull/1403 Date: 2022-10-07 20:10:51 +0000
07-10-2022

Changeset: ecfa712c Author: Chris Plummer <cjplummer@openjdk.org> Date: 2021-03-12 21:05:02 +0000 URL: https://git.openjdk.java.net/jdk/commit/ecfa712c
12-03-2021