Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361210 - Indexing at startup cause hanging Eclipse
Summary: Indexing at startup cause hanging Eclipse
Status: RESOLVED FIXED
Alias: None
Product: DLTK
Classification: Technology
Component: Common (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: dltk.common-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-18 03:24 EDT by maarten meijer CLA
Modified: 2015-10-04 07:35 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description maarten meijer CLA 2011-10-18 03:24:39 EDT
What steps will reproduce the problem?
1. starting Eclipse
2. after index starts it hangs indefinitely
3. 


-- Error Details --
Date: Tue Oct 18 09:02:05 CEST 2011
Message: An exception was thrown while indexing document
Severity: Error
Product: Eclipse 1.4.1.20110909-0613 (org.eclipse.epp.package.rcp.product)
Plugin: org.eclipse.dltk.core.index.sql
Session Data:
eclipse.buildId=M20110909-1335
java.version=1.6.0_26
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.rcp.product
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -clean -product org.eclipse.epp.package.rcp.product -clean -console -data /Users/maarten/Workspaces/workspace-fold1/

Exception Stack Trace:
org.h2.jdbc.JdbcSQLException: General error: java.lang.RuntimeException: File ID mismatch got=0 expected=62 pos=12800 false org.h2.store.DiskFile:/Users/maarten/Workspaces/workspace-fold1/.metadata/.plugins/org.eclipse.dltk.core.index.sql.h2/model.index.db blockCount:0; SQL statement:
DELETE FROM FILES WHERE ID=?; [50000-117]
	at org.h2.message.Message.getSQLException(Message.java:105)
	at org.h2.message.Message.convert(Message.java:274)
	at org.h2.command.Command.executeUpdate(Command.java:231)
	at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:140)
	at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:129)
	at org.eclipse.dltk.internal.core.index.sql.h2.H2FileDao.deleteById(H2FileDao.java:178)
	at org.eclipse.dltk.internal.core.index.sql.SqlIndexer.indexDocument(SqlIndexer.java:137)
	at org.eclipse.dltk.internal.core.index2.SourceModulesRequest.run(SourceModulesRequest.java:78)
	at org.eclipse.dltk.core.search.indexing.AbstractJob.execute(AbstractJob.java:76)
	at org.eclipse.dltk.internal.core.search.processing.JobManager.run(JobManager.java:467)
	at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.RuntimeException: File ID mismatch got=0 expected=62 pos=12800 false org.h2.store.DiskFile:/Users/maarten/Workspaces/workspace-fold1/.metadata/.plugins/org.eclipse.dltk.core.index.sql.h2/model.index.db blockCount:0
	at org.h2.message.Message.throwInternalError(Message.java:185)
	at org.h2.store.DiskFile.getRecord(DiskFile.java:571)
	at org.h2.store.Storage.getRecord(Storage.java:94)
	at org.h2.index.BtreeIndex.getPage(BtreeIndex.java:182)
	at org.h2.index.BtreeNode.findFirst(BtreeNode.java:227)
	at org.h2.index.BtreeIndex.find(BtreeIndex.java:288)
	at org.h2.index.BtreeIndex.find(BtreeIndex.java:274)
	at org.h2.table.TableFilter.next(TableFilter.java:296)
	at org.h2.command.dml.Delete.update(Delete.java:55)
	at org.h2.constraint.ConstraintReferential.updateWithSkipCheck(ConstraintReferential.java:428)
	at org.h2.constraint.ConstraintReferential.checkRowRefTable(ConstraintReferential.java:399)
	at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:273)
	at org.h2.table.Table.fireConstraints(Table.java:768)
	at org.h2.table.Table.fireAfterRow(Table.java:783)
	at org.h2.command.dml.Delete.update(Delete.java:75)
	at org.h2.command.CommandContainer.update(CommandContainer.java:72)
	at org.h2.command.Command.executeUpdate(Command.java:208)
	... 8 more


What steps will reproduce the problem?
1. 
2. 
3. 


-- Error Details --
Date: Tue Oct 18 09:02:05 CEST 2011
Message: An exception was thrown while indexing document
Severity: Error
Product: Eclipse 1.4.1.20110909-0613 (org.eclipse.epp.package.rcp.product)
Plugin: org.eclipse.dltk.core.index.sql
Session Data:
eclipse.buildId=M20110909-1335
java.version=1.6.0_26
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.rcp.product
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -clean -product org.eclipse.epp.package.rcp.product -clean -console -data /Users/maarten/Workspaces/workspace-fold1/

Exception Stack Trace:
org.h2.jdbc.JdbcSQLException: General error: java.lang.RuntimeException: File ID mismatch got=0 expected=62 pos=12800 false org.h2.store.DiskFile:/Users/maarten/Workspaces/workspace-fold1/.metadata/.plugins/org.eclipse.dltk.core.index.sql.h2/model.index.db blockCount:0; SQL statement:
DELETE FROM FILES WHERE ID=?; [50000-117]
	at org.h2.message.Message.getSQLException(Message.java:105)
	at org.h2.message.Message.convert(Message.java:274)
	at org.h2.command.Command.executeUpdate(Command.java:231)
	at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:140)
	at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:129)
	at org.eclipse.dltk.internal.core.index.sql.h2.H2FileDao.deleteById(H2FileDao.java:178)
	at org.eclipse.dltk.internal.core.index.sql.SqlIndexer.indexDocument(SqlIndexer.java:137)
	at org.eclipse.dltk.internal.core.index2.SourceModulesRequest.run(SourceModulesRequest.java:78)
	at org.eclipse.dltk.core.search.indexing.AbstractJob.execute(AbstractJob.java:76)
	at org.eclipse.dltk.internal.core.search.processing.JobManager.run(JobManager.java:467)
	at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.RuntimeException: File ID mismatch got=0 expected=62 pos=12800 false org.h2.store.DiskFile:/Users/maarten/Workspaces/workspace-fold1/.metadata/.plugins/org.eclipse.dltk.core.index.sql.h2/model.index.db blockCount:0
	at org.h2.message.Message.throwInternalError(Message.java:185)
	at org.h2.store.DiskFile.getRecord(DiskFile.java:571)
	at org.h2.store.Storage.getRecord(Storage.java:94)
	at org.h2.index.BtreeIndex.getPage(BtreeIndex.java:182)
	at org.h2.index.BtreeNode.findFirst(BtreeNode.java:227)
	at org.h2.index.BtreeIndex.find(BtreeIndex.java:288)
	at org.h2.index.BtreeIndex.find(BtreeIndex.java:274)
	at org.h2.table.TableFilter.next(TableFilter.java:296)
	at org.h2.command.dml.Delete.update(Delete.java:55)
	at org.h2.constraint.ConstraintReferential.updateWithSkipCheck(ConstraintReferential.java:428)
	at org.h2.constraint.ConstraintReferential.checkRowRefTable(ConstraintReferential.java:399)
	at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:273)
	at org.h2.table.Table.fireConstraints(Table.java:768)
	at org.h2.table.Table.fireAfterRow(Table.java:783)
	at org.h2.command.dml.Delete.update(Delete.java:75)
	at org.h2.command.CommandContainer.update(CommandContainer.java:72)
	at org.h2.command.Command.executeUpdate(Command.java:208)
	... 8 more
Comment 1 Alex Panchenko CLA 2011-10-18 03:33:13 EDT
Looks like h2 database used for indexing was corrupted.
Could you please provide the mentioned folder as zip, to test if it's possible to recover automatically from this kind of db corruption.
Comment 2 maarten meijer CLA 2011-10-18 12:17:10 EDT
I'm not sure if this is the corrupted one, as the problems have gone away.
Also the resulting archive is to big to attach, I'll try find seem other way to send it.
Comment 3 Dawid Pakula CLA 2015-10-04 07:35:41 EDT
Marking as fixed:
1. User is not able to reproduce
2. DLTK no longer run SQL indexer during startup.