[Bug] javac gives non-deterministic output (for sealed interface with records)
Przemek Bielicki
pbielicki at gmail.com
Thu Dec 28 14:44:43 UTC 2023
Hi Chen,
I have two classes that use the same syntax. I can always reproduce this
"issue". There is a caveat though. Once the problem appears in the first
compiled class, another time in the second and yet another time in both
classes. It is reproducible in JDK 23 - Vicente sent me a patched JDK 23
with extra logging and I was able to catch the different order of
processing the permits depending on where those classes were compiled:
:scans-server:compileJava
[javac-log]: adding Task to GradleExecGraphNodeExecutionInfo
[javac-log]: permitted list is now: Task,
[javac-log]: adding Transform to GradleExecGraphNodeExecutionInfo
[javac-log]: permitted list is now: Task, Transform,
vs.
:scans-server:compileJava
[javac-log]: adding Transform to GradleExecGraphNodeExecutionInfo
[javac-log]: permitted list is now: Transform,
[javac-log]: adding Task to GradleExecGraphNodeExecutionInfo
[javac-log]: permitted list is now: Transform, Task,
We'll continue our investigations in January (I hope).
If you think that the class 80 is wrong then it's coming from the node with
"Linux 5.4.0-*166*-generic" kernel (Ubuntu 20.04.6 LTS).
I am able to reproduce this issue with the same frequency on any node that
is using the same kernel version. This is super weird but this minor kernel
version difference is the only indicator that I was able to catch.
I hope that helps.
Cheers,
Przemek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20231228/ff7da312/attachment.htm>
More information about the compiler-dev
mailing list