Re: too many instances of org.tartarus.snowball.Among in the heap

2012-07-30 Thread roz dev
I did take couple of thread dumps and they seem to be fine

Heap dump is huge - close to 15GB

I am having hard time to analyze that heap dump

2012-07-30 16:07:32
Full thread dump Java HotSpot(TM) 64-Bit Server VM (19.0-b09 mixed mode):

RMI TCP Connection(33)-10.8.21.124 - Thread t@190
   java.lang.Thread.State: RUNNABLE
at sun.management.ThreadImpl.dumpThreads0(Native Method)
at sun.management.ThreadImpl.dumpAllThreads(ThreadImpl.java:374)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:167)
at
com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:96)
at
com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:33)
at
com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120)
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)
at javax.management.StandardMBean.invoke(StandardMBean.java:391)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at
javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427)
at
javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
at
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1265)
at
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1360)
at
javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

   Locked ownable synchronizers:
- locked 49cbecf2 (a
java.util.concurrent.locks.ReentrantLock$NonfairSync)

JMX server connection timeout 189 - Thread t@189
   java.lang.Thread.State: TIMED_WAITING
at java.lang.Object.wait(Native Method)
- waiting on b75fa27 (a [I)
at
com.sun.jmx.remote.internal.ServerCommunicatorAdmin$Timeout.run(ServerCommunicatorAdmin.java:150)
at java.lang.Thread.run(Thread.java:662)

   Locked ownable synchronizers:
- None

web-77 - Thread t@186
   java.lang.Thread.State: WAITING
at sun.misc.Unsafe.park(Native Method)
- parking to wait for 5ab03cb6 (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
at
java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:662)

   Locked ownable synchronizers:
- None

web-76 - Thread t@185
   java.lang.Thread.State: WAITING
at sun.misc.Unsafe.park(Native Method)
- parking to wait for 5ab03cb6 (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
at
java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:662)

   Locked ownable synchronizers:
- None

web-75 - Thread t@184
   java.lang.Thread.State: WAITING
at 

Re: too many instances of org.tartarus.snowball.Among in the heap

2012-07-30 Thread roz dev
is it some kind of memory leak with Lucene's use of Snowball Stemmer?

I tried to google for Snowball Stemmer but could not find any recent info
about memory leak

this old link does indicate some memory leak but it is from 2004

http://snowball.tartarus.org/archives/snowball-discuss/0631.html

Any inputs are welcome

-Saroj




On Mon, Jul 30, 2012 at 4:39 PM, roz dev rozde...@gmail.com wrote:

 I did take couple of thread dumps and they seem to be fine

 Heap dump is huge - close to 15GB

 I am having hard time to analyze that heap dump

 2012-07-30 16:07:32
 Full thread dump Java HotSpot(TM) 64-Bit Server VM (19.0-b09 mixed mode):

 RMI TCP Connection(33)-10.8.21.124 - Thread t@190
java.lang.Thread.State: RUNNABLE
 at sun.management.ThreadImpl.dumpThreads0(Native Method)
 at sun.management.ThreadImpl.dumpAllThreads(ThreadImpl.java:374)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at
 com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:167)
 at
 com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:96)
 at
 com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:33)
 at
 com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
 at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120)
 at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)
 at javax.management.StandardMBean.invoke(StandardMBean.java:391)
 at
 com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
 at
 com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
 at
 javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427)
 at
 javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
 at
 javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1265)
 at
 javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1360)
 at
 javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
 at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
 at sun.rmi.transport.Transport$1.run(Transport.java:159)
 at java.security.AccessController.doPrivileged(Native Method)
 at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
 at
 sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
 at
 sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
 at
 sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)

Locked ownable synchronizers:
 - locked 49cbecf2 (a
 java.util.concurrent.locks.ReentrantLock$NonfairSync)

 JMX server connection timeout 189 - Thread t@189
java.lang.Thread.State: TIMED_WAITING
 at java.lang.Object.wait(Native Method)
 - waiting on b75fa27 (a [I)
 at
 com.sun.jmx.remote.internal.ServerCommunicatorAdmin$Timeout.run(ServerCommunicatorAdmin.java:150)
 at java.lang.Thread.run(Thread.java:662)

Locked ownable synchronizers:
 - None

 web-77 - Thread t@186
java.lang.Thread.State: WAITING
 at sun.misc.Unsafe.park(Native Method)
 - parking to wait for 5ab03cb6 (a
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
 at
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
 at
 java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
 at
 java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
 at java.lang.Thread.run(Thread.java:662)

Locked ownable synchronizers:
 - None

 web-76 - Thread t@185
java.lang.Thread.State: WAITING
 at sun.misc.Unsafe.park(Native Method)
 - parking to wait for 5ab03cb6 (a
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
 at
 

too many instances of org.tartarus.snowball.Among in the heap

2012-07-27 Thread roz dev
Hi All

I am trying to find out the reason for very high memory use and ran JMAP
-hist

It is showing that i have too many instances of org.tartarus.snowball.Among

Any ideas what is this for and why am I getting so many of them

num   #instances#bytes  Class description
--
*1:  467281101869124400  org.tartarus.snowball.Among
*
2:  5244210 1840458960  byte[]
3:  526519495969839368  char[]
4:  10008928864769280   int[]
5:  10250527410021080
java.util.LinkedHashMap$Entry
6:  4672811 268474232   org.tartarus.snowball.Among[]
*7:  8072312 258313984   java.util.HashMap$Entry*
8:  466514  246319392   org.apache.lucene.util.fst.FST$Arc[]
9:  1828542 237600432   java.util.HashMap$Entry[]
10: 3834312 153372480   java.util.TreeMap$Entry
11: 2684700 128865600
org.apache.lucene.util.fst.Builder$UnCompiledNode
12: 4712425 113098200   org.apache.lucene.util.BytesRef
13: 3484836 111514752   java.lang.String
14: 2636045 105441800   org.apache.lucene.index.FieldInfo
15: 1813561 101559416   java.util.LinkedHashMap
16: 6291619 100665904   java.lang.Integer
17: 2684700 85910400
org.apache.lucene.util.fst.Builder$Arc
18: 956998  84215824
org.apache.lucene.index.TermsHashPerField
19: 2892957 69430968
org.apache.lucene.util.AttributeSource$State
20: 2684700 64432800
org.apache.lucene.util.fst.Builder$Arc[]
21: 685595  60332360org.apache.lucene.util.fst.FST
22: 933451  59210944java.lang.Object[]
23: 957043  53594408org.apache.lucene.util.BytesRefHash
24: 591463  42585336
org.apache.lucene.codecs.BlockTreeTermsReader$FieldReader
25: 424801  40780896
org.tartarus.snowball.ext.EnglishStemmer
26: 424801  40780896
org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter
27: 1549670 37192080org.apache.lucene.index.Term
28: 849602  33984080
org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter$WordDelimiterConcatenation
29: 424801  27187264
org.apache.lucene.analysis.core.WhitespaceTokenizer
30: 478499  26795944
org.apache.lucene.index.FreqProxTermsWriterPerField
31: 535521  25705008
org.apache.lucene.index.FreqProxTermsWriterPerField$FreqProxPostingsArray
32: 219081  24537072
org.apache.lucene.codecs.BlockTreeTermsWriter$TermsWriter
33: 478499  22967952
org.apache.lucene.index.FieldInvertState
34: 956998  22967952
org.apache.lucene.index.TermsHashPerField$PostingsBytesStartArray
35: 478499  22967952
org.apache.lucene.index.TermVectorsConsumerPerField
36: 478499  22967952
org.apache.lucene.index.NormsConsumerPerField
37: 316582  22793904
org.apache.lucene.store.MMapDirectory$MMapIndexInput
38: 906708  21760992
org.apache.lucene.util.AttributeSource$State[]
39: 906708  21760992
org.apache.lucene.analysis.tokenattributes.OffsetAttributeImpl
40: 883588  21206112java.util.ArrayList
41: 438192  21033216
org.apache.lucene.store.RAMOutputStream
42: 860601  20654424java.lang.StringBuilder
43: 424801  20390448
org.apache.lucene.analysis.miscellaneous.WordDelimiterIterator
44: 424801  20390448
org.apache.lucene.analysis.core.StopFilter
45: 424801  20390448
org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter
46: 424801  20390448
org.apache.lucene.analysis.snowball.SnowballFilter
47: 839390  20145360
org.apache.lucene.index.DocumentsWriterDeleteQueue$TermNode


-Saroj


Re: too many instances of org.tartarus.snowball.Among in the heap

2012-07-27 Thread Bernd Fehling
It is something from internally of the snowball analyzer (stemmer).

To find out more you should take a heapdump and look into it with
Memory Analyzer (MAT) http://www.eclipse.org/mat/

Regards,
Bernd


Am 27.07.2012 09:53, schrieb roz dev:
 Hi All
 
 I am trying to find out the reason for very high memory use and ran JMAP
 -hist
 
 It is showing that i have too many instances of org.tartarus.snowball.Among
 
 Any ideas what is this for and why am I getting so many of them
 
 num   #instances#bytes  Class description
 --
 *1:  467281101869124400  org.tartarus.snowball.Among
 *
 2:  5244210 1840458960  byte[]
 3:  526519495969839368  char[]
 4:  10008928864769280   int[]
 5:  10250527410021080
 java.util.LinkedHashMap$Entry
 6:  4672811 268474232   org.tartarus.snowball.Among[]
 *7:  8072312 258313984   java.util.HashMap$Entry*
 8:  466514  246319392   org.apache.lucene.util.fst.FST$Arc[]
 9:  1828542 237600432   java.util.HashMap$Entry[]
 10: 3834312 153372480   java.util.TreeMap$Entry
 11: 2684700 128865600
 org.apache.lucene.util.fst.Builder$UnCompiledNode
 12: 4712425 113098200   org.apache.lucene.util.BytesRef
 13: 3484836 111514752   java.lang.String
 14: 2636045 105441800   org.apache.lucene.index.FieldInfo
 15: 1813561 101559416   java.util.LinkedHashMap
 16: 6291619 100665904   java.lang.Integer
 17: 2684700 85910400
 org.apache.lucene.util.fst.Builder$Arc
 18: 956998  84215824
 org.apache.lucene.index.TermsHashPerField
 19: 2892957 69430968
 org.apache.lucene.util.AttributeSource$State
 20: 2684700 64432800
 org.apache.lucene.util.fst.Builder$Arc[]
 21: 685595  60332360org.apache.lucene.util.fst.FST
 22: 933451  59210944java.lang.Object[]
 23: 957043  53594408org.apache.lucene.util.BytesRefHash
 24: 591463  42585336
 org.apache.lucene.codecs.BlockTreeTermsReader$FieldReader
 25: 424801  40780896
 org.tartarus.snowball.ext.EnglishStemmer
 26: 424801  40780896
 org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter
 27: 1549670 37192080org.apache.lucene.index.Term
 28: 849602  33984080
 org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter$WordDelimiterConcatenation
 29: 424801  27187264
 org.apache.lucene.analysis.core.WhitespaceTokenizer
 30: 478499  26795944
 org.apache.lucene.index.FreqProxTermsWriterPerField
 31: 535521  25705008
 org.apache.lucene.index.FreqProxTermsWriterPerField$FreqProxPostingsArray
 32: 219081  24537072
 org.apache.lucene.codecs.BlockTreeTermsWriter$TermsWriter
 33: 478499  22967952
 org.apache.lucene.index.FieldInvertState
 34: 956998  22967952
 org.apache.lucene.index.TermsHashPerField$PostingsBytesStartArray
 35: 478499  22967952
 org.apache.lucene.index.TermVectorsConsumerPerField
 36: 478499  22967952
 org.apache.lucene.index.NormsConsumerPerField
 37: 316582  22793904
 org.apache.lucene.store.MMapDirectory$MMapIndexInput
 38: 906708  21760992
 org.apache.lucene.util.AttributeSource$State[]
 39: 906708  21760992
 org.apache.lucene.analysis.tokenattributes.OffsetAttributeImpl
 40: 883588  21206112java.util.ArrayList
 41: 438192  21033216
 org.apache.lucene.store.RAMOutputStream
 42: 860601  20654424java.lang.StringBuilder
 43: 424801  20390448
 org.apache.lucene.analysis.miscellaneous.WordDelimiterIterator
 44: 424801  20390448
 org.apache.lucene.analysis.core.StopFilter
 45: 424801  20390448
 org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter
 46: 424801  20390448
 org.apache.lucene.analysis.snowball.SnowballFilter
 47: 839390  20145360
 org.apache.lucene.index.DocumentsWriterDeleteQueue$TermNode
 
 
 -Saroj
 

-- 
*
Bernd FehlingUniversitätsbibliothek Bielefeld
Dipl.-Inform. (FH)LibTec - Bibliothekstechnologie
Universitätsstr. 25 und Wissensmanagement
33615 Bielefeld
Tel. +49 521 106-4060   bernd.fehling(at)uni-bielefeld.de

BASE - Bielefeld Academic Search Engine - www.base-search.net
*




Re: too many instances of org.tartarus.snowball.Among in the heap

2012-07-27 Thread Alexandre Rafalovitch
Try taking a couple of thread dumps and see where in the stack the
snowball classes show up. That might give you a clue.

Did you customize the parameters to the stemmer? If so, maybe it has
problems with the file you gave it.

Just some generic thoughts that might help.

Regards,
   Alex.
Personal blog: http://blog.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all
at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
book)


On Fri, Jul 27, 2012 at 3:53 AM, roz dev rozde...@gmail.com wrote:
 Hi All

 I am trying to find out the reason for very high memory use and ran JMAP
 -hist

 It is showing that i have too many instances of org.tartarus.snowball.Among

 Any ideas what is this for and why am I getting so many of them

 num   #instances#bytes  Class description
 --
 *1:  467281101869124400  org.tartarus.snowball.Among
 *
 2:  5244210 1840458960  byte[]