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

Bug 324934

Summary: Stale NFS file handle
Product: Community Reporter: Nicolas Bros <nicolas.bros>
Component: CI-JenkinsAssignee: Eclipse Webmaster <webmaster>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Nicolas Bros CLA 2010-09-10 05:19:01 EDT
The modisco-integration build on hudson.eclipse.org failed with:

ERROR: IOException encountered while reading "/opt/public/modeling/mdt/modisco/buckminster/install/configuration/org.eclipse.core.runtime/.mainData.24".
java.io.IOException: Stale NFS file handle
	at java.io.RandomAccessFile.readBytes(Native Method)
	at java.io.RandomAccessFile.read(RandomAccessFile.java:315)
	at org.eclipse.core.internal.registry.BufferedRandomInputStream.fillBuffer(BufferedRandomInputStream.java:57)
	at org.eclipse.core.internal.registry.BufferedRandomInputStream.read(BufferedRandomInputStream.java:64)
	at java.io.DataInputStream.readInt(DataInputStream.java:353)
	at org.eclipse.core.internal.registry.TableReader.basicLoadConfigurationElement(TableReader.java:196)
	at org.eclipse.core.internal.registry.TableReader.loadConfigurationElement(TableReader.java:184)
	at org.eclipse.core.internal.registry.RegistryObjectManager.load(RegistryObjectManager.java:411)
	at org.eclipse.core.internal.registry.RegistryObjectManager.basicGetObject(RegistryObjectManager.java:270)
	at org.eclipse.core.internal.registry.RegistryObjectManager.getObject(RegistryObjectManager.java:262)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.getConfigurationElement(ConfigurationElementHandle.java:26)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.getAttribute(ConfigurationElementHandle.java:34)
	at org.eclipse.jdt.internal.launching.environments.ExecutionEnvironment.getId(ExecutionEnvironment.java:185)
	at org.eclipse.pde.internal.core.TargetPlatformHelper.getKnownExecutionEnvironments(TargetPlatformHelper.java:304)
	at org.eclipse.pde.internal.core.MinimalState.setExecutionEnvironments(MinimalState.java:254)
	at org.eclipse.pde.internal.core.MinimalState.initializePlatformProperties(MinimalState.java:231)
	at org.eclipse.pde.internal.core.MinimalState.internalResolveState(MinimalState.java:225)
	at org.eclipse.pde.internal.core.MinimalState.resolveState(MinimalState.java:201)
	at org.eclipse.pde.internal.core.PDEState.readTargetState(PDEState.java:126)
	at org.eclipse.pde.internal.core.PDEState.<init>(PDEState.java:100)
	at org.eclipse.pde.internal.core.PDEState.<init>(PDEState.java:92)
	at org.eclipse.pde.internal.core.target.provisional.LoadTargetDefinitionJob.handleReload(LoadTargetDefinitionJob.java:448)
	at org.eclipse.pde.internal.core.target.provisional.LoadTargetDefinitionJob.loadPlugins(LoadTargetDefinitionJob.java:284)
	at org.eclipse.pde.internal.core.target.provisional.LoadTargetDefinitionJob.runInWorkspace(LoadTargetDefinitionJob.java:141)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
	at org.eclipse.buckminster.pde.internal.PDETargetPlatform.setTargetActive(PDETargetPlatform.java:143)
	at org.eclipse.buckminster.pde.internal.PDETargetPlatform.refresh(PDETargetPlatform.java:384)
	at org.eclipse.buckminster.pde.internal.PDETargetPlatform.locationsChanged(PDETargetPlatform.java:361)
	at org.eclipse.buckminster.core.materializer.P2Materializer.materialize(P2Materializer.java:326)
	at org.eclipse.buckminster.core.materializer.MaterializerJob.run(MaterializerJob.java:64)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Denis Roy CLA 2010-09-10 10:48:52 EDT
If I am not mistaken, you are running build jobs on build.eclipse.org _and_ hudson.eclipse.org.  If that is correct, since /opt/public is a shared resource between all the Hudson servers, is it possible that one build may have altered/erased a file that the other build was expecting to see?

If I look right now, the file you have mentioned does not exist.

What does that file do?
Comment 2 Nicolas Bros CLA 2010-09-10 11:04:13 EDT
Makes sense! I hadn't thought of that.

> What does that file do?
I don't know exactly, but it is in the Buckminster install configuration, so it is very possible that two instances of Buckminster running concurrently are trying to access this file at the same time, causing conflicts.
Comment 3 Denis Roy CLA 2010-09-10 11:23:38 EDT
> two instances of Buckminster running concurrently are
> trying to access this file at the same time, causing conflicts.

FWIW, access is not the problem.  A Stale NFS file handle would occur under this scenario:

- server A opens file, acquires file handle, but does not request an exclusive lock
- server B deletes file since it's not locked
- server A attempts any file operation on the file, even closing it.  File handle is stale.