Community
Participate
Working Groups
Result: P2 provisioning operation sporadically fails due to an IllegalArgumentException in touchpoint action 'remove'. Stack trace: -------------------------------------------------------------------------------- !ENTRY org.eclipse.equinox.p2.engine 4 4 2018-02-23 10:09:06.475 !MESSAGE An error occurred while configuring the installed items !SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2018-02-23 10:09:06.476 !MESSAGE session context was:(profile=core, phase=org.eclipse.equinox.internal.p2.engine.phases.Configure, operand=null --> [R]<installable-unit>, action=org.eclipse.equinox.internal.p2.touchpoint.natives.actions.RemoveAction). !SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2018-02-23 10:09:06.476 !MESSAGE Directory is not empty: <path-to-an-existing-directory> !STACK 0 java.lang.IllegalArgumentException: Directory is not empty: <path-to-an-existing-directory> at org.eclipse.equinox.internal.p2.touchpoint.natives.BackupStore.backupDirectory(BackupStore.java:443) at org.eclipse.equinox.internal.p2.touchpoint.natives.BackupStore.backup(BackupStore.java:232) at org.eclipse.equinox.internal.p2.touchpoint.natives.BackupStore.backupAll(BackupStore.java:344) at org.eclipse.equinox.internal.p2.touchpoint.natives.LazyBackupStore.backupAll(LazyBackupStore.java:79) at org.eclipse.equinox.internal.p2.touchpoint.natives.actions.RemoveAction.execute(RemoveAction.java:37) at org.eclipse.equinox.internal.p2.engine.ParameterizedProvisioningAction.execute(ParameterizedProvisioningAction.java:39) at org.eclipse.equinox.internal.p2.engine.Phase.mainPerform(Phase.java:184) at org.eclipse.equinox.internal.p2.engine.Phase.perform(Phase.java:96) at org.eclipse.equinox.internal.p2.engine.PhaseSet.perform(PhaseSet.java:47) at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:77) at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:45) at org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper.executePlan(PlanExecutionHelper.java:42) at org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper.executePlan(PlanExecutionHelper.java:24) at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.executePlan(DirectorApplication.java:974) at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.planAndExecute(DirectorApplication.java:967) at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.performProvisioningActions(DirectorApplication.java:932) at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.run(DirectorApplication.java:1307) at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.start(DirectorApplication.java:1504) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) at org.eclipse.equinox.launcher.Main.run(Main.java:1499) at org.eclipse.equinox.launcher.Main.main(Main.java:1472) -------------------------------------------------------------------------------- Possible cause: Most probably anti-virus is temporary blocking filesystem access for the process and java.io.File.exists() returns false (see https://bugs.java.com/bugdatabase/view_bug.do?bug_id=5003595), so 'file.delete()' on line https://github.com/eclipse/rt.equinox.p2/blob/3eca795499690a83a53e36eb38cf29fd9a6880ad/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java#L281 is skipped.
New Gerrit change created: https://git.eclipse.org/r/128634
Gerrit change https://git.eclipse.org/r/128634 was merged to [master]. Commit: http://git.eclipse.org/c/equinox/rt.equinox.p2.git/commit/?id=d1f871da10232f21e402ca0f3dffeabd65d3e196
Re-opening the bug since the same instability began to re-occur in an environment where an antivirus software is enabled on the eclipse installation directory. There are more file.delete() calls in BackupStore which are also potentially unstable. One solution is to convert the file.delete() calls to a routine which re-tries to delete the file several times. Also it may be good to replace the java.io.File operations in BackupStore with java.nio.file. The nio version is likely more stable or at least should not report bogus results the way File.exists() and File.delete() do.
New Gerrit change created: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/182079
New Gerrit change created: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/182081
New Gerrit change created: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/182080
New Gerrit change created: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/182197
New Gerrit change created: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/182198
New Gerrit change created: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/182199
New Gerrit change created: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/182314
New Gerrit change created: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/182370
New Gerrit change created: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/182539
New Gerrit change created: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/182583
New Gerrit change created: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/182585
Gerrit change https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/182080 was merged to [master]. Commit: http://git.eclipse.org/c/equinox/rt.equinox.p2.git/commit/?id=297545ddd241eca93f6e6423a9cfa800131b5483
Gerrit change https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/182585 was merged to [master]. Commit: http://git.eclipse.org/c/equinox/rt.equinox.p2.git/commit/?id=a57a0ce4a6b964c35a6172f4c043d7bf6057c6dd
FYI, these changes required me to make this change: https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/commit/?id=f87729807f7021fdc3425dc325213c87c6113652 The code there is apparently a workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=427148 It was added for this: https://bugs.eclipse.org/bugs/show_bug.cgi?id=446432 So I think it's fine that the override will no longer kick in. But note that it is specifically the backup/update of the *.exe that was a problem on Windows and specifically when the original *.exe was on a different device/drive as the backup store.
It's a bit hard to follow the code you point to. But I went to great lengths to preserve the in-place backup of eclipse.exe
(In reply to Eclipse Genie from comment #16) > Gerrit change https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/182585 was > merged to [master]. > Commit: > http://git.eclipse.org/c/equinox/rt.equinox.p2.git/commit/ > ?id=a57a0ce4a6b964c35a6172f4c043d7bf6057c6dd This commit caused regression on Windows, see bug 576506.