StreamOutput/Input and JvmInfo.Mem instance with negative values


(jrawlings) #1

The method calls on memoryMXBean in
org.elasticsearch.monitor.jvm.JvmInfo can all return -1 if the
particular usage property is not defined. This occurred with the IBM
JVM that we are using currently (details below) with the
getNonHeapMemoryUsage().getMax() method. This is a problem because the
JvmInfo.Mem variables are serialized using the writeVLong method in
org.elasticsearch.common.io.stream.StreamOutput which explicitly
states that it does not support negative values. Upon deserialization,
the following Exception(s) are thrown http://pastebin.com/e89uWUM5

java version "1.6.0"
Java(TM) SE Runtime Environment (build pxa6460sr9fp1-20110208_03(SR9
FP1))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux amd64-64
jvmxa6460sr9-20110203_74623 (JIT enabled, AOT enabled)
J9VM - 20110203_074623
JIT - r9_20101028_17488ifx3
GC - 20101027_AA)
JCL - 20110203_01

Let me know if you want me to open an Issue.

Thanks,
Joe Rawlings


(Shay Banon) #2

Nice catch (humbly impressed)!, yea open an issue.
On Friday, May 20, 2011 at 3:00 AM, Joe Rawlings wrote:

The method calls on memoryMXBean in
org.elasticsearch.monitor.jvm.JvmInfo can all return -1 if the
particular usage property is not defined. This occurred with the IBM
JVM that we are using currently (details below) with the
getNonHeapMemoryUsage().getMax() method. This is a problem because the
JvmInfo.Mem variables are serialized using the writeVLong method in
org.elasticsearch.common.io.stream.StreamOutput which explicitly
states that it does not support negative values. Upon deserialization,
the following Exception(s) are thrown http://pastebin.com/e89uWUM5

java version "1.6.0"
Java(TM) SE Runtime Environment (build pxa6460sr9fp1-20110208_03(SR9
FP1))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux amd64-64
jvmxa6460sr9-20110203_74623 (JIT enabled, AOT enabled)
J9VM - 20110203_074623
JIT - r9_20101028_17488ifx3
GC - 20101027_AA)
JCL - 20110203_01

Let me know if you want me to open an Issue.

Thanks,
Joe Rawlings


(Shay Banon) #3

Opened an issue https://github.com/elasticsearch/elasticsearch/issues/950 and fixed it in both 0.16 branch and master (just to get it out there).
On Friday, May 20, 2011 at 12:32 PM, Shay Banon wrote:

Nice catch (humbly impressed)!, yea open an issue.
On Friday, May 20, 2011 at 3:00 AM, Joe Rawlings wrote:

The method calls on memoryMXBean in
org.elasticsearch.monitor.jvm.JvmInfo can all return -1 if the
particular usage property is not defined. This occurred with the IBM
JVM that we are using currently (details below) with the
getNonHeapMemoryUsage().getMax() method. This is a problem because the
JvmInfo.Mem variables are serialized using the writeVLong method in
org.elasticsearch.common.io.stream.StreamOutput which explicitly
states that it does not support negative values. Upon deserialization,
the following Exception(s) are thrown http://pastebin.com/e89uWUM5

java version "1.6.0"
Java(TM) SE Runtime Environment (build pxa6460sr9fp1-20110208_03(SR9
FP1))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux amd64-64
jvmxa6460sr9-20110203_74623 (JIT enabled, AOT enabled)
J9VM - 20110203_074623
JIT - r9__20101028_17488ifx3
GC - 20101027_AA)
JCL - 20110203_01

Let me know if you want me to open an Issue.

Thanks,
Joe Rawlings


(jrawlings) #4

Just woke up. Thanks for opening and resolving the issue :slight_smile:

On May 20, 4:41 am, Shay Banon shay.ba...@elasticsearch.com wrote:

Opened an issuehttps://github.com/elasticsearch/elasticsearch/issues/950and fixed it in both 0.16 branch and master (just to get it out there).

On Friday, May 20, 2011 at 12:32 PM, Shay Banon wrote:

Nice catch (humbly impressed)!, yea open an issue.
On Friday, May 20, 2011 at 3:00 AM, Joe Rawlings wrote:

The method calls on memoryMXBean in
org.elasticsearch.monitor.jvm.JvmInfo can all return -1 if the
particular usage property is not defined. This occurred with the IBM
JVM that we are using currently (details below) with the
getNonHeapMemoryUsage().getMax() method. This is a problem because the
JvmInfo.Mem variables are serialized using the writeVLong method in
org.elasticsearch.common.io.stream.StreamOutput which explicitly
states that it does not support negative values. Upon deserialization,
the following Exception(s) are thrownhttp://pastebin.com/e89uWUM5

java version "1.6.0"
Java(TM) SE Runtime Environment (build pxa6460sr9fp1-20110208_03(SR9
FP1))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux amd64-64
jvmxa6460sr9-20110203_74623 (JIT enabled, AOT enabled)
J9VM - 20110203_074623
JIT - r9__20101028_17488ifx3
GC - 20101027_AA)
JCL - 20110203_01

Let me know if you want me to open an Issue.

Thanks,
Joe Rawlings


(system) #5