Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error while indexing with opengrok-0.12-rc5 #727

Closed
psumbera opened this issue Jan 23, 2014 · 1 comment
Closed

error while indexing with opengrok-0.12-rc5 #727

psumbera opened this issue Jan 23, 2014 · 1 comment

Comments

@psumbera
Copy link

2014-01-23 03:55:53.732-0800 FINE t34 Executor.exec: Executing command [/usr/bin/hg, log, --template, changeset: {rev}:{node|
short}\n{branches}{tags}{parents}\nuser: {author}\ndate: {date|isodate}\nfiles: {files}\ndescription: {desc|strip|obfuscate}
nfile_copies: {file_copies}\n] in directory /builds1/psumbera2/userland-sources
2014-01-23 04:05:53.748-0800 INFO t38 Executor$2.run: Terminating process of command [/usr/bin/hg, log, --template, changeset: {rev}:{node|short}\n{branches}{tags}{parents}\nuser: {author}\ndate: {date|isodate}\nfiles: {files}\ndescription: {desc|strip|obfuscate}\nfile_copies: {file_copies}\n] in directory /builds1/psumbera2/userland-sources due to timeout
2014-01-23 04:05:53.750-0800 SEVERE t34 Executor.exec: Failed to read from process: /usr/bin/hg
java.io.IOException: Stream closed
at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:162)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:272)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:154)
at java.io.BufferedReader.readLine(BufferedReader.java:317)
at java.io.BufferedReader.readLine(BufferedReader.java:382)
at org.opensolaris.opengrok.history.MercurialHistoryParser.processStream(MercurialHistoryParser.java:114)
at org.opensolaris.opengrok.util.Executor.exec(Executor.java:178)
at org.opensolaris.opengrok.history.MercurialHistoryParser.parse(MercurialHistoryParser.java:76)
at org.opensolaris.opengrok.history.MercurialRepository.getHistory(MercurialRepository.java:509)
at org.opensolaris.opengrok.history.Repository.createCache(Repository.java:296)
at org.opensolaris.opengrok.history.HistoryGuru.createCache(HistoryGuru.java:475)
at org.opensolaris.opengrok.history.HistoryGuru.access$000(HistoryGuru.java:51)
at org.opensolaris.opengrok.history.HistoryGuru$1.run(HistoryGuru.java:519)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
2014-01-23 04:05:53.752-0800 WARNING t34 Executor.exec: Non-zero exit status -1 from command [/usr/bin/hg, log, --template, changeset: {rev}:{node|short}\n{branches}{tags}{parents}\nuser: {author}\ndate: {date|isodate}\nfiles: {files}\ndescription: {desc|strip|obfuscate}\nfile_copies: {file_copies}\n] in directory /builds1/psumbera2/userland-sources
2014-01-23 04:05:53.752-0800 WARNING t34 HistoryGuru.createCache: An error occured while creating cache for /builds1/psumbera2/userland-sources (MercurialRepository)
org.opensolaris.opengrok.history.HistoryException: Failed to get history for: "/builds1/psumbera2/userland-sources" Exit code
: -1
at org.opensolaris.opengrok.history.MercurialHistoryParser.parse(MercurialHistoryParser.java:79)
at org.opensolaris.opengrok.history.MercurialRepository.getHistory(MercurialRepository.java:509)
at org.opensolaris.opengrok.history.Repository.createCache(Repository.java:296)
at org.opensolaris.opengrok.history.HistoryGuru.createCache(HistoryGuru.java:475)
at org.opensolaris.opengrok.history.HistoryGuru.access$000(HistoryGuru.java:51)
at org.opensolaris.opengrok.history.HistoryGuru$1.run(HistoryGuru.java:519)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
2014-01-23 04:05:53.753-0800 INFO t1 Indexer.prepareIndexer: Done...
2014-01-23 04:05:53.754-0800 INFO t1 Indexer.doIndexerExecution: Starting indexing
2014-01-23 04:05:53.787-0800 SEVERE t37 Executor$1.run: Error during process pipe listening
java.io.IOException: Stream Closed
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:243)
at java.lang.UNIXProcess$DeferredCloseInputStream.read(UNIXProcess.java:262)
at org.opensolaris.opengrok.util.Executor$SpoolHandler.processStream(Executor.java:320)
at org.opensolaris.opengrok.util.Executor$1.run(Executor.java:153)
at java.lang.Thread.run(Thread.java:744)

@vladak
Copy link
Member

vladak commented Jan 23, 2014

This related to enhancement #705 which times out commands if they run for more that 10 minutes.

Obviously, your hg log command takes too long to finish. I'd advise to tune it like this:

put this into /etc/opengrok/readonly_configuration.xml

<?xml version="1.0" encoding="UTF-8"?>
<java version="1.6.0_06" class="java.beans.XMLDecoder">
 <object class="org.opensolaris.opengrok.configuration.Configuration">
  <void property="CommandTimeout">
   <int>7200</int>
  </void>
 </object>
</java>

and execute the indexer like this: READ_XML_CONFIGURATION=/etc/opengrok/readonly_configuration.xml /usr/opengrok/bin/OpenGrok index

The above will give you 2 hours for each executed command (like hg log) which should be sufficient.

@vladak vladak closed this as completed Jan 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants