Bug 1389302 - org.apache.lucene.index.IndexFormatTooOldException in workspace log
Summary: org.apache.lucene.index.IndexFormatTooOldException in workspace log
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: eclipse
Version: rh-eclipse46
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: alpha
: 2.3
Assignee: Mat Booth
QA Contact: Václav Kadlčík
URL:
Whiteboard:
Depends On: 1395709 1397483
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-27 12:15 UTC by Mat Booth
Modified: 2016-12-05 09:29 UTC (History)
4 users (show)

Fixed In Version: rh-eclipse46-eclipse-epp-logging-2.0.3-1.2.el7
Doc Type: Bug Fix
Doc Text:
Prior to this update, Eclipse used Lucene 5 for search indexing, which no longer supports Lucene 3 indexes. Consequently, Lucene 3 indexes downloaded from external locations could not be read by Eclipse's integrated automatic error reporting tool (AERI), resulting in errors in the log file. The automatic error reporting tool in Eclipse has been ported to use Lucene 4, which is able to read Lucene 3 indexes, and the integrated automatic error reporting tool now works correctly.
Clone Of:
Environment:
Last Closed: 2016-12-05 09:29:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2852 0 normal SHIPPED_LIVE rh-eclipse46 bug fix update 2016-12-05 14:29:07 UTC

Description Mat Booth 2016-10-27 12:15:27 UTC
This is the second part of bug 1373405 that I split into two bugs


!ENTRY org.eclipse.epp.logging.aeri.ide 2 10 2016-09-06 09:52:27.896
!MESSAGE Updating the index from remote failed. ; version: 2.0.1.201608030901
!STACK 0
org.apache.lucene.index.IndexFormatTooOldException: Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="/tmp/1473148346752-0/segments_2"))): -11 (needs to be between 1071082519 and 1071082519). This version of Lucene only supports indexes created with release 4.0 and later.
        at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:299)
        at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:493)
        at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:490)
        at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:731)
        at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:683)
        at org.apache.lucene.index.SegmentInfos.readLatestCommit(SegmentInfos.java:490)
        at org.apache.lucene.index.IndexWriter.addIndexes(IndexWriter.java:2487)
        at org.eclipse.epp.internal.logging.aeri.ide.server.mars.ServerProblemsHistory.replaceContent(ServerProblemsHistory.java:200)
        at org.eclipse.epp.internal.logging.aeri.ide.server.mars.ServerProblemsHistory$UpdateIndexJob.run(ServerProblemsHistory.java:298)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Comment 1 Mat Booth 2016-11-16 13:07:36 UTC
The problem is that AERI downloads some indexes from the Internet and they are Lucene 3 indexes, which cannot be read by Lucene 5, which is what our version Eclipse uses.

Since rh-java-common collection has both Lucene 4 and Lucene 5 available, my solution is to port the "eclipse-epp-logging" bundles, which supplies AERI, to use Lucene 4 instead, which *can* read Lucene 3 indexes.

Comment 2 Mat Booth 2016-11-16 13:53:25 UTC
Annoyingly, there is an error in Lucene 4's OSGi metadata that makes it difficult to use Lucene 4 and Lucene 5 in the same runtime, please see bug 1395709

Comment 3 Václav Kadlčík 2016-11-16 14:00:54 UTC
> The problem is that AERI downloads some indexes from the Internet

Mat, please, haven't you discovered a better method to "provoke" the exception, e.g. by some action in GUI? In bz1373405 I reported it somewhat vaguely (follow the log, wait, it will appear), it would be great to have a better reproducer...

Comment 4 Mat Booth 2016-11-17 14:44:34 UTC
(In reply to Václav Kadlčík from comment #3)
> > The problem is that AERI downloads some indexes from the Internet
> 
> Mat, please, haven't you discovered a better method to "provoke" the
> exception, e.g. by some action in GUI? In bz1373405 I reported it somewhat
> vaguely (follow the log, wait, it will appear), it would be great to have a
> better reproducer...

The work is done in a background thread scheduled for 5 minutes after start up, which is a time that is unfortunately hard-coded; there doesn't seem to be a way of triggering it to happen sooner from the UI.

However, the exception does appear reliably in the log five minutes after the workbench starts up -- no UI interaction is necessary to observe the exception.

Comment 5 Mat Booth 2016-11-17 14:55:44 UTC
(In reply to Mat Booth from comment #4)
> (In reply to Václav Kadlčík from comment #3)
> > > The problem is that AERI downloads some indexes from the Internet
> > 
> > Mat, please, haven't you discovered a better method to "provoke" the
> > exception, e.g. by some action in GUI? In bz1373405 I reported it somewhat
> > vaguely (follow the log, wait, it will appear), it would be great to have a
> > better reproducer...
> 
> The work is done in a background thread scheduled for 5 minutes after start
> up, which is a time that is unfortunately hard-coded; there doesn't seem to
> be a way of triggering it to happen sooner from the UI.
> 
> However, the exception does appear reliably in the log five minutes after
> the workbench starts up -- no UI interaction is necessary to observe the
> exception.

Just to clarify a little, my testing included doing this:

$ rm -rf .eclipse/ workspace/                          
$ scl enable rh-eclipse46 "eclipse -clean -consoleLog -data workspace"

... and wait five minutes for the following output ...

!ENTRY org.eclipse.epp.logging.aeri.ide 2 10 2016-11-17 14:29:52.089
!MESSAGE Updating the index from remote ‘https://aer.ctrlflow.com/downloads/redhat/problems.zip’ failed with exception: org.apache.lucene.index.IndexFormatTooOldException: Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="/tmp/1479392991929-0/segments_1"))): -11 (needs to be between 1071082519 and 1071082519). This version of Lucene only supports indexes created with release 4.0 and later. ; version: 2.0.3.201610111629
!STACK 0
org.eclipse.epp.logging.aeri.core.util.Logs$LogTraceException
        at org.eclipse.epp.logging.aeri.core.util.Logs$LogTraceException.newTrace(Logs.java:387)
        at org.eclipse.epp.logging.aeri.core.util.Logs.log(Logs.java:134)
        at org.eclipse.epp.internal.logging.aeri.ide.server.mars.ServerProblemsHistory$UpdateIndexJob.run(ServerProblemsHistory.java:322)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

!ENTRY org.eclipse.epp.logging.aeri.ide 2 10 2016-11-17 14:29:54.438
!MESSAGE Updating the index from remote ‘https://www.eclipse.org/downloads/download.php?r=1&file=/technology/epp/logging/problems.zip’ failed with exception: org.apache.lucene.index.IndexFormatTooOldException: Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="/tmp/1479392994101-0/segments_2"))): -11 (needs to be between 1071082519 and 1071082519). This version of Lucene only supports indexes created with release 4.0 and later. ; version: 2.0.3.201610111629
!STACK 0
org.eclipse.epp.logging.aeri.core.util.Logs$LogTraceException
        at org.eclipse.epp.logging.aeri.core.util.Logs$LogTraceException.newTrace(Logs.java:387)
        at org.eclipse.epp.logging.aeri.core.util.Logs.log(Logs.java:134)
        at org.eclipse.epp.internal.logging.aeri.ide.server.mars.ServerProblemsHistory$UpdateIndexJob.run(ServerProblemsHistory.java:322)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Comment 6 Mat Booth 2016-11-17 14:58:44 UTC
When using the fixed build, after five minutes you should see no errors and you can observe the downloaded indexes have been successfully written to disk:

$ ll workspace/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/remote-history/
total 19496
-rw-rw-r--. 1 mbooth mbooth   251762 Nov 17 14:54 _1.fdt
-rw-rw-r--. 1 mbooth mbooth    38428 Nov 17 14:54 _1.fdx
-rw-rw-r--. 1 mbooth mbooth       62 Nov 17 14:54 _1.fnm
-rw-rw-r--. 1 mbooth mbooth  1469247 Nov 17 14:54 _1.frq
-rw-rw-r--. 1 mbooth mbooth     4807 Nov 17 14:54 _1.nrm
-rw-rw-r--. 1 mbooth mbooth  2685828 Nov 17 14:54 _1.prx
-rw-rw-r--. 1 mbooth mbooth      310 Nov 17 14:54 _1.si
-rw-rw-r--. 1 mbooth mbooth   141416 Nov 17 14:54 _1.tii
-rw-rw-r--. 1 mbooth mbooth 15337911 Nov 17 14:54 _1.tis
-rw-rw-r--. 1 mbooth mbooth       29 Nov 17 14:54 _1_upgraded.si
-rw-rw-r--. 1 mbooth mbooth       89 Nov 17 14:54 segments_2
-rw-rw-r--. 1 mbooth mbooth       36 Nov 17 14:54 segments.gen
-rw-rw-r--. 1 mbooth mbooth        0 Nov 17 14:49 write.lock

Comment 7 Václav Kadlčík 2016-11-18 11:40:06 UTC
Thanks, Mat, for all the information.

rh-eclipse46-eclipse-epp-logging-2.0.3-1.2.el7 + rh-java-common-lucene-4.8.0-6.8.el7 (bz1395709#c9) work for me.

Comment 9 Václav Kadlčík 2016-11-24 08:36:02 UTC
just FTR, re-verified with
 * rh-eclipse46-eclipse-epp-logging-2.0.3-1.2.el7, and
 * rh-java-common-lucene-4.8.0-6.8.el7 of 2016:25764 (i.e. the "official" build)

Comment 11 errata-xmlrpc 2016-12-05 09:29:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2852.html


Note You need to log in before you can comment on or make changes to this bug.