Bug 787321

Summary: Race condition: Pdebuild fails due to build.xml generation and build start race.
Product: [Fedora] Fedora Reporter: Severin Gehwolf <sgehwolf>
Component: eclipseAssignee: Alexander Kurtakov <akurtako>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: akurtako, andjrobins, kdaniel, overholt, rgrunber, sgehwolf, swagiaal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-10 14:17:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Severin Gehwolf 2012-02-04 00:07:04 UTC
Description of problem:
I am trying to build a new version of Fedora Packager for Eclipse. The package uses buildscripts/pdebuild in order to build the plug-in from source. The exact call to the script (in the build section of the .spec) is as follows:

%{eclipse_base}/buildscripts/pdebuild \
                -f org.fedoraproject.eclipse.packager \
                -o `pwd`/orbit \
                -d "rpm-editor rpmstubby changelog jgit egit"

Note that it has 5 dependencies (which get installed into the system's dropins directory). If I try to build the package I get errors similar to the following:

http://koji.fedoraproject.org/koji/getfile?taskID=3760801&name=build.log

This is very verbose, but it boils down to this error:

Adding reference: ant.targets
      [ant] Exiting /usr/lib/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_3.8.0.v20120119-1950/scripts/genericTargets.xml.
  [antcall] Exiting /usr/lib/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_3.8.0.v20120119-1950/templates/package-build/customTargets.xml.
  [antcall] Exiting /usr/lib/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_3.8.0.v20120119-1950/templates/package-build/customTargets.xml.
      [ant] Exiting /usr/lib/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_3.8.0.v20120119-1950/templates/package-build/customTargets.xml.
  [antcall] Exiting /usr/lib/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_3.8.0.v20120119-1950/scripts/build.xml.
BUILD FAILED
/usr/lib/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_3.8.0.v20120119-1950/scripts/build.xml:35: The following error occurred while executing this line:
/usr/lib/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_3.8.0.v20120119-1950/scripts/build.xml:94: The following error occurred while executing this line:
/usr/lib/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_3.8.0.v20120119-1950/templates/package-build/customTargets.xml:90: The following error occurred while executing this line:
/usr/lib/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_3.8.0.v20120119-1950/templates/package-build/customTargets.xml:35: The following error occurred while executing this line:
/usr/lib/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_3.8.0.v20120119-1950/templates/package-build/customTargets.xml:19: The following error occurred while executing this line:
/usr/lib/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_3.8.0.v20120119-1950/scripts/genericTargets.xml:72: The following error occurred while executing this line:
java.io.FileNotFoundException: /builddir/build/BUILD/eclipse-fedorapackager-0.3.0/build/features/org.fedoraproject.eclipse.packager/build.xml (No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:138)
	at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:278)
	at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:178)
	at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:82)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:393)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)

Version-Release number of selected component (if applicable):
Eclipse rawhide


Attempt to build eclipse-fedorapackager 0.3.0. SRPM is available here:
http://fedorapeople.org/~jerboaa/rpm/eclipse-fedorapackager/eclipse-fedorapackager-0.3.0-1.fc17.src.rpm

Try removing some (all?) of the -d dependencies and you'll get past the above error. Actual bundle not resolved problems will show up.

I surmise this may be happening due to a race condition of the copy process and kicking off the build task.

Thoughts?

Comment 1 Severin Gehwolf 2012-02-04 00:19:45 UTC
I should mention that the koji build sometimes fails and sometimes passes. For example today, I've attempted 5 builds of eclipse-fedorapackager, 2 of which succeeded and the other 3 failed. There was no change in the .spec file.

Here is a build failure example:
http://koji.fedoraproject.org/koji/taskinfo?taskID=3759411

And a successful build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=3759750

Comment 2 Severin Gehwolf 2012-02-10 14:17:46 UTC
Nevermind. The feature ID changed from org.fedoraproject.eclipse.packager to org.fedoraproject.eclipse.packager.feature. Yay to helpful error messages :)