# StreamOutput/Input and JvmInfo.Mem instance with negative values

**URL:** <https://discuss.elastic.co/t/streamoutput-input-and-jvminfo-mem-instance-with-negative-values/4441>\
**Category:** Elasticsearch\
**Created:** [May 20, 2011, 12:00am UTC](https://discuss.elastic.co/t/streamoutput-input-and-jvminfo-mem-instance-with-negative-values/4441 "2011-05-20T00:00:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrawlings](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jrawlings/32/3183_2.png) [@jrawlings](https://discuss.elastic.co/u/jrawlings)\
**Post date:** [May 20, 2011, 12:00am UTC](https://discuss.elastic.co/t/streamoutput-input-and-jvminfo-mem-instance-with-negative-values/4441/1 "2011-05-20T00:00:57Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [May 20, 2011, 9:32am UTC](https://discuss.elastic.co/t/streamoutput-input-and-jvminfo-mem-instance-with-negative-values/4441/2 "2011-05-20T09:32:50Z")

</div>

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 [May 19, 2011 12:33:58 PM org.elasticsearch.client.transportWARNING: [Albert] f - Pastebin.com](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

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [May 20, 2011, 11:41am UTC](https://discuss.elastic.co/t/streamoutput-input-and-jvminfo-mem-instance-with-negative-values/4441/3 "2011-05-20T11:41:34Z")

</div>

Opened an issue [IBM J9 failure to serialize nodes info · Issue #950 · elastic/elasticsearch · GitHub](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 [May 19, 2011 12:33:58 PM org.elasticsearch.client.transportWARNING: [Albert] f - Pastebin.com](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

---

<div class="post-metadata">

**Author:** ![jrawlings](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jrawlings/32/3183_2.png) [@jrawlings](https://discuss.elastic.co/u/jrawlings)\
**Post date:** [May 20, 2011, 1:34pm UTC](https://discuss.elastic.co/t/streamoutput-input-and-jvminfo-mem-instance-with-negative-values/4441/4 "2011-05-20T13:34:52Z")

</div>

Just woke up. Thanks for opening and resolving the issue 🙂

On May 20, 4:41 am, Shay Banon [shay.ba...@elasticsearch.com](mailto: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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:05am UTC](https://discuss.elastic.co/t/streamoutput-input-and-jvminfo-mem-instance-with-negative-values/4441/5 "2017-07-06T04:05:47Z")

</div>

Closed on July 6, 2017, 4:05am UTC


