Bug 409609 - Connection failure does not stop scanner discovery
Summary: Connection failure does not stop scanner discovery
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: RDT.sync (show other bugs)
Version: 7.0   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: 7.0.1   Edit
Assignee: John Eblen CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2013-05-31 12:22 EDT by Greg Watson CLA
Modified: 2015-06-23 16:35 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Watson CLA 2013-05-31 12:22:31 EDT
If the connection fails for some reason (e.g. the user goes off line) the indexer will continue to try to run the scanner discovery. This results in continuous errors being logged to the error iog. Indexing should be terminated at this point.

org.eclipse.core.runtime.CoreException: Error running Sync Builtin Specs Detector
	at org.eclipse.ptp.internal.rdt.sync.cdt.core.SyncGCCBuiltinSpecsDetector.runProgramForLanguage(SyncGCCBuiltinSpecsDetector.java:179)
	at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runForLanguage(AbstractBuiltinSpecsDetector.java:623)
	at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runForEachLanguage(AbstractBuiltinSpecsDetector.java:496)
	at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector$1.runInWorkspace(AbstractBuiltinSpecsDetector.java:430)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: org.eclipse.core.runtime.CoreException: Error opening connection.
	at org.eclipse.ptp.internal.rdt.sync.cdt.core.remotemake.SyncCommandLauncher.execute(SyncCommandLauncher.java:225)
	at org.eclipse.cdt.internal.core.BuildRunnerHelper.build(BuildRunnerHelper.java:238)
	at org.eclipse.ptp.internal.rdt.sync.cdt.core.SyncGCCBuiltinSpecsDetector.runProgramForLanguage(SyncGCCBuiltinSpecsDetector.java:170)
	... 5 more
Caused by: org.eclipse.ptp.remote.core.exception.RemoteConnectionException: Session.connect: java.net.UnknownHostException: trestles.sdsc.edu
	at org.eclipse.ptp.internal.remote.remotetools.core.RemoteToolsConnection.open(RemoteToolsConnection.java:412)
	at org.eclipse.ptp.internal.rdt.sync.cdt.core.remotemake.SyncCommandLauncher.execute(SyncCommandLauncher.java:222)
	... 7 more
Comment 1 John Eblen CLA 2013-05-31 13:10:52 EDT
Do the runs eventually stop? If so, I think I know what may be happening. There is a flag that is set after the first run that prevents additional runs. However, additional runs already queued will still proceed.
Comment 2 John Eblen CLA 2013-05-31 15:17:54 EDT
I added a lock to prevent multiple threads from running scanner discovery at the same time. Please test and see if this helps. You may still have multiple runs, but there will hopefully be fewer of them.
Comment 3 Greg Watson CLA 2015-06-23 16:35:38 EDT
Closing.