Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 418361

Summary: JDT and PDE User pre-built index is missing in recent N-builds
Product: [Eclipse Project] Platform Reporter: Dani Megert <daniel_megert>
Component: RelengAssignee: Platform-Releng-Inbox <platform-releng-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: david_williams, markus.kell.r
Version: 4.4   
Target Milestone: 4.4 M3   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
help dialog with PDE and Index selected.
none
3 buildDoc_log.xml from 9/30 N build none

Description Dani Megert CLA 2013-09-30 11:52:54 EDT
This bug is strange: the pre-built index is there for PDE User and all ISV bundles but it's missing for Platform User and JDT User. BUT: only in the N-builds but not in the I-build (e.g. I20130924-1130).


http://download.eclipse.org/eclipse/downloads/drops4/N20130923-2000/testresults/html/org.eclipse.ua.tests.doc_linux.gtk.x86_6.0.html

testPlatformUserIndex
testJdtUserIndex


could not open: index

junit.framework.AssertionFailedError: could not open: index
at org.eclipse.ua.tests.doc.internal.linkchecker.PrebuiltIndexChecker.validateIndex(PrebuiltIndexChecker.java:77)
at org.eclipse.ua.tests.doc.internal.linkchecker.PrebuiltIndexChecker.testPlatformUserIndex(PrebuiltIndexChecker.java:49)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:655)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:310)
at org.eclipse.test.UITestApplication$2.run(UITestApplication.java:197)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3715)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3364)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:144)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:613)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:140)
at org.eclipse.test.UITestApplication.run(UITestApplication.java:62)
at org.eclipse.test.UITestApplication.start(UITestApplication.java:212)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:109)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:80)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:372)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:226)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
at org.eclipse.core.launcher.Main.main(Main.java:34)
Comment 1 David Williams CLA 2013-09-30 22:36:32 EDT
How confident are we in those tests ... or, put another way, how can I tell definitively if index is present in a downloaded SDK? 

And, it's not that I have good news that its merely the tests are bad. I don't "see" any index in tonight's N-build. I downloaded 

http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/N20130930-2000/eclipse-SDK-N20130930-2000-linux-gtk-x86_64.tar.gz&mirror_id=1

And I don't see an "index page" for any of the "books" in the help ... as determined by bringing up help, and clicking on the "Index" tab in left navigator. (See attachment). 

If there's not errors in build log (and I have not looked) I wonder if things are getting "packaged" to the wrong place?
Comment 2 David Williams CLA 2013-09-30 22:37:12 EDT
Created attachment 236001 [details]
help dialog with PDE and Index selected.
Comment 3 David Williams CLA 2013-09-30 22:50:06 EDT
Looking into the bundle
org.eclipse.pde.doc.user

I see files such as 
index/_0.frq
index/segments.gen
index/_0.fdx
index/_0.tis
index/_0.fdt
index/indexed_contributions
index/_0.tii
index/_0.fnm
index/_0.nrm
index/indexed_dependencies
index/segments_1
index/indexed_docs
index/_0.prx

The look "reasonable" (little that I know what they should look like) but one likely error is in 

index/indexed_contributions

its content is 

= = = = = 
#This is a generated file; do not edit.
#Mon Sep 30 21:06:57 EDT 2013
org.eclipse.pde.doc.user=org.eclipse.pde.doc.user\n3.10.0.qualifier
= = = = = 

The fact that it ends with ".qualifier" looks pretty suspicious.
Comment 4 David Williams CLA 2013-09-30 23:15:50 EDT
And ... I think this confirms what the unit tests are saying

These two bundles contain no "index" files at all: 

org.eclipse.jdt.doc.user_3.10.0.N20130930-2000.jar
org.eclipse.platform.doc.user_4.4.0.N20130930-2000.jar

And all three of these have the ".qualifier" in index/indexed_contributions

org.eclipse.jdt.doc.isv_3.10.0.N20130930-2000.jar
org.eclipse.platform.doc.isv_4.4.0.N20130930-2000.jar
org.eclipse.platform.doc.user_4.4.0.N20130930-2000.jar


But ... red herring ... I checked the I-build from M2, specifically 
org.eclipse.pde.doc.user_3.10.0.v20130918-1843.jar

And its 
index/indexed_contributions
also says merely "qualifier". 
org.eclipse.pde.doc.user=org.eclipse.pde.doc.user\n3.10.0.qualifier

The mystery continues.
Comment 5 David Williams CLA 2013-10-01 01:24:15 EDT
To cross reference, see bug 417578 where we are tracking some "undo" stuff related to original attempts to fix bug 415008.
Comment 6 David Williams CLA 2013-10-01 01:43:38 EDT
Created attachment 236002 [details]
3 buildDoc_log.xml from 9/30 N build

Just wanted to capture the buildDoc_log.xml from an N-build. Apparently we only capture them for 3 doc bundles? 

org.eclipse.jdt.doc.isv
org.eclipse.pde.doc.user
org.eclipse.platform.doc.isv

Don't recall why that was, but doesn't "match" exactly those that are failing to generate indexes or anything. 

Nothing obvious jumped out from logs, to me, but ... I've not read them real closely.
Comment 7 David Williams CLA 2013-10-01 01:51:45 EDT
Not sure how we ended up so inconsistent with the "app arguments" for building doc ... but, ironically, the two that do not have any index files, are the two that name "build.index" as an explicit ant target. 

I'm assuming we should strive for more consistency in what we call? Or, are there really different "functional" purposes for each? 


org.eclipse.jdt.doc.isv
pom.xml
118: <appArgLine>-consolelog -debug -application org.eclipse.ant.core.antRunner -buildfile buildDoc.xml -Dbasedir.properties=cbi_basedirs.properties -logger org.apache.tools.ant.XmlLogger -verbose -logfile buildDoc_log.xml</appArgLine> 

org.eclipse.jdt.doc.user
pom.xml
47: <appArgLine>-application org.eclipse.ant.core.antRunner -buildfile build.xml build.index</appArgLine> 

org.eclipse.pde.doc.user
pom.xml
115: <appArgLine>-consolelog -debug -application org.eclipse.ant.core.antRunner -buildfile buildDoc.xml -Dbasedir.properties=cbi_basedirs.properties -logger org.apache.tools.ant.XmlLogger -verbose -logfile buildDoc_log.xml</appArgLine> 

org.eclipse.platform.doc.isv
pom.xml
263: <appArgLine>-consolelog -debug -application org.eclipse.ant.core.antRunner -buildfile buildDoc.xml -Dbasedir.properties=cbi_basedirs.properties -logger org.apache.tools.ant.XmlLogger -verbose -logfile buildDoc_log.xml</appArgLine> 

org.eclipse.platform.doc.user
pom.xml
47: <appArgLine>-application org.eclipse.ant.core.antRunner -buildfile customBuildCallbacks.xml build.index</appArgLine>
Comment 8 David Williams CLA 2013-10-01 02:30:08 EDT
I've added more (consistent) logging to those antRunner calls where we did not add it previously. 

http://git.eclipse.org/c/platform/eclipse.platform.common.git/commit/?id=fa52512e792541d10b05c63a8bf4215f8b939d05

I've also added more (consistent) prereqs to the version of "eclipse" we install for ant runner. 

http://git.eclipse.org/c/platform/eclipse.platform.common.git/commit/?id=3b0cf9e57c5ab91d54e4f9184804e53c53c12eb9

We may change this again, in future, once fate of bug 418392 is clarified.
Comment 9 Dani Megert CLA 2013-10-01 04:24:22 EDT
Reading to your comment, it seems you already answered all the questions you previously posted (like e.g. how can I see that the index is really missing, or, whether the tests are trustworthy). If not, please ask the open questions again.

I agree that we want the doc generation to be consistent over all the 5 bundles.
Comment 10 Dani Megert CLA 2013-10-01 11:32:35 EDT
While the pom, build scripts and manifest currently differ between the doc bundles, it does not explain why the index is there in I-build works but not in the N-builds.
Comment 11 David Williams CLA 2013-10-01 11:51:46 EDT
(In reply to Dani Megert from comment #10)
> While the pom, build scripts and manifest currently differ between the doc
> bundles, it does not explain why the index is there in I-build works but not
> in the N-builds.

No question about that. But, thought there might be some "indeterminate behavior" introduced (such as a "change in build order"?). The improved logging might help spot the trouble more easily.  

In any case, while I do know now what the junit tests are looking for, I am still puzzled why even those with indexes were not showing up in the UI (for that one N-build I looked at). Is that to be expected? That they all have to be there for any to show up? Or, is that a separate issue? Or a hint that something deeper is wrong with indexing (for N-builds ... haven't looked at today's I-build yet)?
Comment 12 Markus Keller CLA 2013-10-01 12:55:41 EDT
The buildDoc_log.xml are available in I20131001-0800, so let's wait for the next N-build that should include the missing logs (for the first time, see comment 8).


(In reply to David Williams from comment #11)
> I am
> still puzzled why even those with indexes were not showing up in the UI (for
> that one N-build I looked at).

David, I guess you have a wrong expectation for what these help indexes are. They are not an "Index" topic that should show up somewhere in the help TOC.

The help indexes are Lucene indexes that are used to speed up full-text searches in help documents. The only effect you see in the UI is that the very first search in the infocenter only takes 1 s to collect the indexes from all installed doc bundles. In N-builds, the very first search takes several seconds longer until the indexes are built (depending on your hard disk speed). Note that we only pre-build an index for "en", so if your machine doesn't default to an English locale, then you have to launch Eclipse with "-nl en" to make use of the pre-built index.
Comment 13 David Williams CLA 2013-10-01 13:15:21 EDT
(In reply to Markus Keller from comment #12)

> 
> David, I guess you have a wrong expectation for what these help indexes are.
> They are not an "Index" topic that should show up somewhere in the help TOC.
> 
> The help indexes are Lucene indexes that are used to speed up full-text
> searches in help documents. The only effect you see in the UI is that the
> very first search in the infocenter only takes 1 s to collect the indexes
> from all installed doc bundles. In N-builds, the very first search takes
> several seconds longer until the indexes are built (depending on your hard
> disk speed). Note that we only pre-build an index for "en", so if your
> machine doesn't default to an English locale, then you have to launch
> Eclipse with "-nl en" to make use of the pre-built index.

Thanks! (that helps a lot).
Comment 14 David Williams CLA 2013-10-01 15:07:40 EDT
I've just now finished an "N-build" on my local test machine, and all the doc bundles have indices in them. So, if production build tonight does not, first thing I'll do is study the "build repo" to see what is not getting "cleaned up" or "reset" from one build to another. In the worst case, we may have to remove something and let it re-clone ... unless it is yet some other even more obscure, subtle bug specific to eclipse.org infrastructure (which, would be surprising, sort of :).
Comment 15 David Williams CLA 2013-10-02 00:06:16 EDT
From downloading and visually inspecting tonight's N-build, it appears all indices are back. 

It is conceivable that specifying "runtime.compatibility" and "compatibility.state" in the "running Eclipse" might have helped these be produced correctly. But, as said earlier, that does not really explain why there would be a difference between I-builds and N-build. 

But, I did look at the build order (pasted below) and the ones that were missing indices are the first two built. <guessing ahead> While each module has its own "running eclipse" (in 'work' directory), there is part of each of those that points back to a common "localRepo" (via config.ini) ... so ... might be some effect of order ... and only "logical" thing that'd make sense for I-builds is that by chance it was correct when those bundles were built, and then "swapped in" by comparator ... but dates of I-build doc bundles (also below) don't really support that. 

= = = = 

N20130930-2000 (no indexes)
208 [INFO] org.eclipse.platform.doc.isv ...................... SUCCESS [2:47.868s]
209 [INFO] org.eclipse.jdt.doc.isv ........................... SUCCESS [40.379s]
210 [INFO] org.eclipse.jdt.doc.user .......................... SUCCESS [4.133s]
215 [INFO] org.eclipse.platform.doc.user ..................... SUCCESS [4.048s]
272 [INFO] org.eclipse.pde.doc.user .......................... SUCCESS [19.638s]

N20131001-2000 (has indexes)
208 [INFO] org.eclipse.platform.doc.isv ...................... SUCCESS [2:50.098s]
209 [INFO] org.eclipse.jdt.doc.isv ........................... SUCCESS [54.937s]
210 [INFO] org.eclipse.jdt.doc.user .......................... SUCCESS [8.521s]
215 [INFO] org.eclipse.platform.doc.user ..................... SUCCESS [6.786s]
272 [INFO] org.eclipse.pde.doc.user .......................... SUCCESS [20.372s]



versions from this morning's (10/1) I-build
org.eclipse.platform.doc.isv_4.4.0.v20131001-0519.jar
org.eclipse.jdt.doc.isv_3.10.0.v20130920-0916.jar
org.eclipse.jdt.doc.user_3.10.0.v20130930-0447.jar
org.eclipse.platform.doc.user_4.4.0.v20130806-1450.jar
org.eclipse.pde.doc.user_3.10.0.v20130930-1512.jar
Comment 17 Dani Megert CLA 2013-10-02 06:26:42 EDT
The reason why it "worked" in the I-builds is because there were no changes in the those bundles recently and hence the old version which still had the index got used. The comparator reported the missing files (full log and doc log [1]) but it did not end up in the unanticipated log [2] and hence was not noticed.

[1] http://download.eclipse.org/eclipse/downloads/drops4/I20130924-1130/buildlogs/comparatorlogs/buildtimeComparatorDocBundle.log.txt
[2] http://download.eclipse.org/eclipse/downloads/drops4/I20130924-1130/buildlogs/comparatorlogs/buildtimeComparatorUnanticipated.log.txt

Filed bug 418488 to fix that.