Replies: 21 comments
-
Do you use Java heap tuning ? In our deployment we run the indexer with
|
Beta Was this translation helpful? Give feedback.
-
also if indexer is run on linux, you might hit restrictions on number of open processes - nproc. or max open files limit |
Beta Was this translation helpful? Give feedback.
-
hmm. but has something significant changed since rc7? it is a linux box, and these machines are pretty big.. |
Beta Was this translation helpful? Give feedback.
-
also, current max file limit is 5000000
|
Beta Was this translation helpful? Give feedback.
-
This does not seem to be caused by memory shorage as much as thread limits. https://blog.fastthread.io/2016/07/06/troubleshoot-outofmemoryerror-unable-to-create-new-native-thread/ and http://stackoverflow.com/questions/16789288/java-lang-outofmemoryerror-unable-to-create-new-native-thread mention some ideas, in particular I wonder if this is related to the recently added support for renamed files in git which forks more external processes than previously. |
Beta Was this translation helpful? Give feedback.
-
It would be useful to gather process dump when the exception occurs so that the number of existing threads can be seen. |
Beta Was this translation helpful? Give feedback.
-
I don't know when this occurs, it's during the indexing process (actually happens a few times). Is there anything I can do to help capture that? or can you reproduce somehow on your side? |
Beta Was this translation helpful? Give feedback.
-
Can you please disable handling renamed files and see if that's the problem? It's this option in configuration. You can set it through the read-only configuration. There was a change since rc7 in handling renamed files for git. |
Beta Was this translation helpful? Give feedback.
-
Thanks for feedback. I am pretty new to grok source code, I suspect you want me to overwrite it at Configuration.java public void setHandleHistoryOfRenamedFiles(boolean enable) {
this.handleHistoryOfRenamedFiles = enable;
} or is there an option to pass it at command line...? |
Beta Was this translation helpful? Give feedback.
-
Sorry there's no a command line option. Of course you can change the code and compile it but that's not necessary. This is the way:
You can skip this step as you can see the only thing which differs is the java version. If you know yours you can just continue with step 2 and replace it.
OPENGROK_INSTANCE_BASE="x" tools/Groups add group group The output should be like:
READ_XML_CONFIGURATION=/var/opengrok/etc/read-only.xml ./OpenGrok index
java -jar opengrok.jar -R /var/opengrok/etc/read-only.xml By the way this is the way to configure all opengrok features which are contained in the Configuration.java class and don't have command line option. |
Beta Was this translation helpful? Give feedback.
-
I have tested opengrok rc8 with disabled handleHistoryOfRenamedFiles and got the same performance as with rc7. So at least on my system the "git --rename" is the killer. Thanks for your support. I know now how to disable the feature and can work with the latest versions.. ` Feb 14, 2017 5:50:19 AM org.opensolaris.opengrok.index.IndexDatabase optimize
real 66m20.424s opengrok 13 rc8 rename patch: INFO: Progress: 62,104 (100%) Feb 14, 2017 7:31:58 AM org.opensolaris.opengrok.index.IndexDatabase optimize
real 66m14.478s ` |
Beta Was this translation helpful? Give feedback.
-
I'm sorry but I don't see the difference
vs.
|
Beta Was this translation helpful? Give feedback.
-
..exactly, I applied your config patch directly in the source code, compiled it and it worked as before.. real 66m20.424s =>~6 seconds diff.. |
Beta Was this translation helpful? Give feedback.
-
running index with this new change. will post results here. |
Beta Was this translation helpful? Give feedback.
-
still failing with same errors. and with this patch Krystof gave me, I have loads of warnings now. Is there going to be a fix for this? |
Beta Was this translation helpful? Give feedback.
-
from your ulimit: might play the role in your case can you try to increase that to more ? |
Beta Was this translation helpful? Give feedback.
-
@tulinkry also mentioned that timer threads created by executors could be a problem - ifeally timers should be shared. |
Beta Was this translation helpful? Give feedback.
-
yes. noticed that. will try. |
Beta Was this translation helpful? Give feedback.
-
I think I have the same issue. After upgrading to latest (from 113f53c)
It seems to occur for specific searches , Not sure what is pattern yet (maybe searches that the results are in big files? in c/c++?) |
Beta Was this translation helpful? Give feedback.
-
@amotzte that looks like different problem When inspecting the "out of memory errors" it is necessary to consider at least these things:
It would be nice if you can debug this further (attaching debugger remotely to Tomcat is possible). The question is whether the input data fed to |
Beta Was this translation helpful? Give feedback.
-
Thanks @vladak for the replay will try to debug a bit further |
Beta Was this translation helpful? Give feedback.
-
I created a new index with rc9, and I had a problem, here was the error:
SEVERE: Problem updating lucene index database:
java.lang.OutOfMemoryError: unable to create new native thread
it happened a few times in my run, here is another example:
Feb 08, 2017 8:12:01 AM org.opensolaris.opengrok.index.IndexDatabase$2 run
SEVERE: Problem updating lucene index database:
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:714)
at org.opensolaris.opengrok.util.Executor.exec(Executor.java:193)
at org.opensolaris.opengrok.history.GitHistoryParser.parse(GitHistoryParser.java:161)
at org.opensolaris.opengrok.history.GitRepository.getHistory(GitRepository.java:512)
at org.opensolaris.opengrok.history.GitRepository.getHistory(GitRepository.java:505)
at org.opensolaris.opengrok.history.FileHistoryCache.get(FileHistoryCache.java:499)
at org.opensolaris.opengrok.history.HistoryGuru.getHistory(HistoryGuru.java:242)
at org.opensolaris.opengrok.history.HistoryGuru.getHistory(HistoryGuru.java:202)
at org.opensolaris.opengrok.history.HistoryGuru.getHistoryReader(HistoryGuru.java:186)
at org.opensolaris.opengrok.analysis.AnalyzerGuru.populateDocument(AnalyzerGuru.java:334)
at org.opensolaris.opengrok.index.IndexDatabase.addFile(IndexDatabase.java:622)
at org.opensolaris.opengrok.index.IndexDatabase.indexDown(IndexDatabase.java:883)
at org.opensolaris.opengrok.index.IndexDatabase.indexDown(IndexDatabase.java:848)
at org.opensolaris.opengrok.index.IndexDatabase.indexDown(IndexDatabase.java:848)
at org.opensolaris.opengrok.index.IndexDatabase.indexDown(IndexDatabase.java:848)
at org.opensolaris.opengrok.index.IndexDatabase.indexDown(IndexDatabase.java:848)
at org.opensolaris.opengrok.index.IndexDatabase.update(IndexDatabase.java:397)
at org.opensolaris.opengrok.index.IndexDatabase$2.run(IndexDatabase.java:184)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Is there a setting I had to change, or is this a new bug with this version. please advise. thanks.
Beta Was this translation helpful? Give feedback.
All reactions