You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by vagrant1984 <ya...@gmail.com> on 2010/01/13 03:05:21 UTC

mem leak?

hey, everyone

I need some help to identify whether MINA has memory leak.

We are currently using MINA 2.0.0-M6. After running for a day under fairly
heavy
load, it runs into OOM,  I use eclipse memory analyzer to profile the hprof
file,

Description:

The thread *java.lang.Thread @ 0x2329c198 NioProcessor-3* keeps local
variables with total size *692,558,776 (68.60%)* bytes.
The memory is accumulated in one instance of *"java.lang.Object[]"* loaded
by *"<system class loader>"*.

Accumulated Objects by Class
 LabelNumber Of ObjectsUsed Heap SizeRetained Heap Size
org.apache.mina.filter.codec.ProtocolCodecFilter$EncodedWriteRequest<mat://object/0x455f37d8>
1,696,45940,715,016359,855,312
org.apache.mina.filter.codec.ProtocolCodecFilter$MessageWriteRequest<mat://object/0x455f4590>
1,696,45927,143,344319,130,104byte[] <mat://object/0x43d37778>8768768

   - Total: 3 entries

3,392,92667,859,128

678,986,184

any idea why those objects are still hanging around? Your insight is highly
appreciated! tks!

yang

Re: mem leak?

Posted by Julien Vermillard <jv...@archean.fr>.
Le Wed, 13 Jan 2010 11:30:30 -0500,
David Rosenstrauch <da...@darose.net> a écrit :

> On 01/13/2010 11:17 AM, Emmanuel Lecharny wrote:
> > David Rosenstrauch a écrit :
> >> On 01/13/2010 03:39 AM, Emmanuel LŽcharny wrote:
> >>> vagrant1984 a écrit :
> >>>> We are currently using MINA 2.0.0-M6. 
> >>> The current version is 2.0.0-RC1, please switch to this version
> >>> as many bug fixes has been injected into the code.
> >>
> >> I've actually been holding off on upgrading us off of 2.0.0-M6 -
> >> since 2.0 is in "release candidate" mode, I figured that a true
> >> 2.0 was coming soon.
> > Totally agree, if your program works. But if you have issues, then
> > it's better to check with the most recent version to see if those
> > issues are still present.
> 
> 2.0M6 has been very solid for us so far, FYI!
> 
> DR

Good to hear :)

Anyway probing the last RC is the best way to know if 2.0 will works
with your application and will help us to release faster.

Thanks

-- 
Julien Vermillard

Archean Technologies
http://www.archean.fr

Re: mem leak?

Posted by David Rosenstrauch <da...@darose.net>.
On 01/13/2010 11:17 AM, Emmanuel Lecharny wrote:
> David Rosenstrauch a écrit :
>> On 01/13/2010 03:39 AM, Emmanuel LŽcharny wrote:
>>> vagrant1984 a écrit :
>>>> We are currently using MINA 2.0.0-M6. 
>>> The current version is 2.0.0-RC1, please switch to this version as 
>>> many bug fixes has been injected into the code.
>>
>> I've actually been holding off on upgrading us off of 2.0.0-M6 - since 
>> 2.0 is in "release candidate" mode, I figured that a true 2.0 was 
>> coming soon.
> Totally agree, if your program works. But if you have issues, then it's 
> better to check with the most recent version to see if those issues are 
> still present.

2.0M6 has been very solid for us so far, FYI!

DR

Re: mem leak?

Posted by Emmanuel Lecharny <el...@gmail.com>.
David Rosenstrauch a écrit :
> On 01/13/2010 03:39 AM, Emmanuel LŽcharny wrote:
>> vagrant1984 a écrit :
>>> We are currently using MINA 2.0.0-M6. 
>> The current version is 2.0.0-RC1, please switch to this version as 
>> many bug fixes has been injected into the code.
>
> I've actually been holding off on upgrading us off of 2.0.0-M6 - since 
> 2.0 is in "release candidate" mode, I figured that a true 2.0 was 
> coming soon.
Totally agree, if your program works. But if you have issues, then it's 
better to check with the most recent version to see if those issues are 
still present.

>
> Just wondering what the dev roadmap is and when a 2.0 release might be 
> coming?
We are trying to cleanup the remaining bugs atm - call it bug parade - 
in order to be able to vote a 2.0 (next week ?)

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com



Re: mem leak?

Posted by David Rosenstrauch <da...@darose.net>.
On 01/13/2010 03:39 AM, Emmanuel LŽcharny wrote:
> vagrant1984 a écrit :
>> We are currently using MINA 2.0.0-M6. 
> The current version is 2.0.0-RC1, please switch to this version as many 
> bug fixes has been injected into the code.

I've actually been holding off on upgrading us off of 2.0.0-M6 - since 
2.0 is in "release candidate" mode, I figured that a true 2.0 was coming 
soon.

Just wondering what the dev roadmap is and when a 2.0 release might be 
coming?

Thanks,

DR

Re: mem leak?

Posted by Emmanuel LŽcharny <el...@gmail.com>.
vagrant1984 a écrit :
> hey, everyone
>   
Hi,
> I need some help to identify whether MINA has memory leak.
>   
Unlikely.
> We are currently using MINA 2.0.0-M6. 
The current version is 2.0.0-RC1, please switch to this version as many 
bug fixes has been injected into the code.

> After running for a day under fairly
> heavy
> load, it runs into OOM,  I use eclipse memory analyzer to profile the hprof
> file,
>
> Description:
>
> The thread *java.lang.Thread @ 0x2329c198 NioProcessor-3* keeps local
> variables with total size *692,558,776 (68.60%)* bytes.
> The memory is accumulated in one instance of *"java.lang.Object[]"* loaded
> by *"<system class loader>"*.
>
> Accumulated Objects by Class
>  LabelNumber Of ObjectsUsed Heap SizeRetained Heap Size
> org.apache.mina.filter.codec.ProtocolCodecFilter$EncodedWriteRequest<mat://object/0x455f37d8>
> 1,696,45940,715,016359,855,312
>   

Sounds like you have some issues in the way you manage the outgoing 
requests.

Can you tell us more about :
- what kind of sage is yours ?
- which protocol are you using ?
- if you have written your own codec, please give us some more 
information about it
- if you are using an executor, please give us some nformation about its 
configuration.

Also I suggest you follow Ashsih's advice : use Yourkit to point out the 
region responsible for the leak.

I pretty much think that your server is accumulating sessions and 
message to write in memory, without doing any cleanup.

Re: mem leak?

Posted by Ashish <pa...@gmail.com>.
Not sure :-(

Can you explore more about what kindof objects are holded. Or may be
try YourKit profiler.



On Wed, Jan 13, 2010 at 7:35 AM, vagrant1984 <ya...@gmail.com> wrote:
> hey, everyone
>
> I need some help to identify whether MINA has memory leak.
>
> We are currently using MINA 2.0.0-M6. After running for a day under fairly
> heavy
> load, it runs into OOM,  I use eclipse memory analyzer to profile the hprof
> file,
>
> Description:
>
> The thread *java.lang.Thread @ 0x2329c198 NioProcessor-3* keeps local
> variables with total size *692,558,776 (68.60%)* bytes.
> The memory is accumulated in one instance of *"java.lang.Object[]"* loaded
> by *"<system class loader>"*.
>
> Accumulated Objects by Class
>  LabelNumber Of ObjectsUsed Heap SizeRetained Heap Size
> org.apache.mina.filter.codec.ProtocolCodecFilter$EncodedWriteRequest<mat://object/0x455f37d8>
> 1,696,45940,715,016359,855,312
> org.apache.mina.filter.codec.ProtocolCodecFilter$MessageWriteRequest<mat://object/0x455f4590>
> 1,696,45927,143,344319,130,104byte[] <mat://object/0x43d37778>8768768
>
>   - Total: 3 entries
>
> 3,392,92667,859,128
>
> 678,986,184
>
> any idea why those objects are still hanging around? Your insight is highly
> appreciated! tks!
>
> yang
>



-- 
thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal