[ 
https://issues.apache.org/jira/browse/CASSANDRA-12793?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Podkowinski updated CASSANDRA-12793:
-------------------------------------------
    Status: Patch Available  (was: Open)

Thanks for reporting and sorry it took so long to respond. 

The issue is easy to reproduce and the suggested change does fix the issue. 
Eventually the broken OpenJDK detection will currently prevent the 
"-XX:+UseCondCardMark" flag from being set automatically.

OpenJDK unpatched:

{noformat}
+ java -version
+ java_ver_output=openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
+ grep [openjdk|java] version
+ cut -d- -f1
+ echo openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
+ awk -F" NR==1 {print $2}
+ jvmver=1.8.0_151
+ JVM_VERSION=1.8.0
+ JVM_PATCH_VERSION=151
+ [ 1.8.0 < 1.8 ]
+ [ 1.8.0 < 1.8 ]
+ echo openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
+ + awk NR==2 {print $1}
grep -A 1 java version
+ jvm=
+ JVM_VENDOR=other
+ JVM_ARCH=unknown
{noformat}


Oracle JDK unpatched:

{noformat}
+ java -version
+ java_ver_output=java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
+ echo java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
+ grep [openjdk|java] version
+ cut -d- -f1
+ awk -F" NR==1 {print $2}
+ jvmver=1.8.0_161
+ JVM_VERSION=1.8.0
+ JVM_PATCH_VERSION=161
+ [ 1.8.0 < 1.8 ]
+ [ 1.8.0 < 1.8 ]
+ echo java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
+ + awkgrep NR==2 {print $1}
 -A 1 java version
+ jvm=Java(TM)
+ JVM_VENDOR=Oracle
+ echo java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
+ awk NR==3 {print $3}
+ JVM_ARCH=64-Bit
{noformat}

OpenJDK patched:

{noformat}
+ java -version
+ java_ver_output=openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
+ echo openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
+ grep [openjdk|java] version
+ cut -d- -f1
+ awk -F" NR==1 {print $2}
+ jvmver=1.8.0_151
+ JVM_VERSION=1.8.0
+ JVM_PATCH_VERSION=151
+ [ 1.8.0 < 1.8 ]
+ [ 1.8.0 < 1.8 ]
+ grep -A 1 [openjdk|java] version
+ awk NR==2 {print $1}
+ echo openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
+ jvm=OpenJDK
+ JVM_VENDOR=OpenJDK
+ + awk NR==3 {print $2}
echo openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
+ JVM_ARCH=64-Bit
{noformat}

Oracle patched:

{noformat}
+ java -version
+ java_ver_output=java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
+ echo java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
+ grep [openjdk|java] version+ cut -d- -f1
+ awk -F" NR==1 {print $2}
+ jvmver=1.8.0_161
+ JVM_VERSION=1.8.0
+ JVM_PATCH_VERSION=161
+ [ 1.8.0 < 1.8 ]
+ [ 1.8.0 < 1.8 ]
+ echo java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
+ grep -A 1 [openjdk|java] version
+ awk NR==2 {print $1}
+ jvm=Java(TM)
+ JVM_VENDOR=Oracle
+ echo+ awk NR==3 {print $3}
 java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
+ JVM_ARCH=64-Bit
{noformat}


> invalid jvm type and architecture [cassandra-env.sh]
> ----------------------------------------------------
>
>                 Key: CASSANDRA-12793
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12793
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Configuration
>         Environment: ubuntu 16.04, openjdk 1.8.0_91
>            Reporter: Ali Ebrahiminejad
>            Priority: Minor
>             Fix For: 3.11.x
>
>         Attachments: 12793.patch
>
>
> In cassandra-env.sh the part that determines the type of JVM we'll be running 
> on doesn't provide the right answer for openjdk 1.8.0_91.
> value of java_ver_output is "openjdk version "1.8.0_91" OpenJDK Runtime 
> Environment (build 1.8.0_91-8u91-b14-3ubuntu1~16.04.1-b14) OpenJDK 64-Bit 
> Server VM (build 25.91-b14, mixed mode)", yet the command looks for "java 
> version" (jvm=`echo "$java_ver_output" | grep -A 1 'java version' ...) which 
> does not exist.
> I guess it should be replaced with jvm=`echo "$java_ver_output" | grep -A 1 
> '[openjdk|java] version' | awk 'NR==2 {print $1}'`



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to