[
https://issues.apache.org/jira/browse/CALCITE-5227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17602031#comment-17602031
]
Julian Hyde commented on CALCITE-5227:
--------------------------------------
Your {{JaninoCompilerTest}} reproduces the issue: using Janino 3.1.6, it passes
on JDK 13 but crashes on OpenJDK 18; using Janino 3.1.8, it passes on all JDK
versions. It demonstrates that the Janino upgrade solves the Janino bug.
But your {{WideTableTest}} reproduces the issue rather too well. Using Janino
3.1.6 it passes on JDK 13 but crashes on OpenJDK 18; but using Janino 3.1.8, it
still crashes. In other words, Janino 3.1.8 doesn't fix this particular issue.
Here is the output from the test.
{noformat}
WideTableTest > testWideTable() STANDARD_OUT
Java version: 18.0.2.1
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (metaspaceArena.cpp:86), pid=215254, tid=216042
# guarantee(requested_word_size <= chunklevel::MAX_CHUNK_WORD_SIZE) failed:
Requested size too large (3023253) - max allowed size per allocation is 524288.
#
# JRE version: OpenJDK Runtime Environment (18.0.2.1+1) (build 18.0.2.1+1-1)
# Java VM: OpenJDK 64-Bit Server VM (18.0.2.1+1-1, mixed mode, sharing, tiered,
compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0xb79f55]
metaspace::MetaspaceArena::allocate_new_chunk(unsigned long)+0x95
#
# Core dump will be written. Default location: Core dumps may be processed with
"/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping
to /home/jhyde/dev/calcite.3/core/core.215254)
#
# An error report file with more information is saved as:
# /home/jhyde/dev/calcite.3/core/hs_err_pid215254.log
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
SKIPPED 23.7sec, org.apache.calcite.test.enumerable.WideTableTest >
testWideTable()
{noformat}
Here is my environment:
{noformat}
$ java -version
openjdk version "18.0.2.1" 2022-08-18
OpenJDK Runtime Environment (build 18.0.2.1+1-1)
OpenJDK 64-Bit Server VM (build 18.0.2.1+1-1, mixed mode, sharing)
$ uname -a
Linux marmite 5.15.0-47-generic #51-Ubuntu SMP Thu Aug 11 07:51:15 UTC 2022
x86_64 x86_64 x86_64 GNU/Linux
{noformat}
> Janino upgrade breaks SELECTs with many projects causing JVM crashes
> --------------------------------------------------------------------
>
> Key: CALCITE-5227
> URL: https://issues.apache.org/jira/browse/CALCITE-5227
> Project: Calcite
> Issue Type: Bug
> Affects Versions: 1.30.0
> Reporter: Daniel Glöckner
> Priority: Critical
> Labels: pull-request-available
> Fix For: 1.32.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> In our case we have SELECTs with > 1000 project fields. You might say this is
> a bit crazy but this is how our data model looks like ;)
> We recently upgraded to Calcite 1.30 and noticed JVM crashes for such
> SELECTs.
> After thorough analysis we found that the byte code produced by newer Janino
> versions is 350 times larger compared to the byte code produced by javac.
> I created a unit test to reproduce the issue in Calcite code base:
> https://github.com/apache/calcite/commit/f4d4815dff5537c56b34b36794c71d7a9829eec6
> The Janino issue is tracked here:
> https://github.com/janino-compiler/janino/issues/174
--
This message was sent by Atlassian Jira
(v8.20.10#820010)