Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369484 - Occasional Exception when deleting branches (cannot read config file)
Summary: Occasional Exception when deleting branches (cannot read config file)
Status: NEW
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-24 04:39 EST by Markus Duft CLA
Modified: 2012-01-24 04:39 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Duft CLA 2012-01-24 04:39:36 EST
Build Identifier: 

java.lang.RuntimeException: java.io.IOException: Cannot read file /fast/wamas5/workspaces/wamas-5_git/wamas5/.git/config
	at org.eclipse.jgit.storage.file.FileRepository.getConfig(FileRepository.java:330)
	at org.eclipse.jgit.storage.file.FileRepository.getConfig(FileRepository.java:1)
	at org.eclipse.jgit.api.DeleteBranchCommand.call(DeleteBranchCommand.java:160)
	at org.eclipse.egit.core.op.DeleteBranchOperation$1.run(DeleteBranchOperation.java:122)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2326)
	at org.eclipse.egit.core.op.DeleteBranchOperation.execute(DeleteBranchOperation.java:139)
	at org.eclipse.egit.ui.internal.repository.tree.command.DeleteBranchCommand.deleteBranch(DeleteBranchCommand.java:100)
	at org.eclipse.egit.ui.internal.repository.tree.command.DeleteBranchCommand.access$0(DeleteBranchCommand.java:96)
	at org.eclipse.egit.ui.internal.repository.tree.command.DeleteBranchCommand$1.run(DeleteBranchCommand.java:72)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
	at org.eclipse.egit.ui.internal.repository.tree.command.DeleteBranchCommand.execute(DeleteBranchCommand.java:46)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
	at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:829)
	at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:815)
	at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:805)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: java.io.IOException: Cannot read file /fast/wamas5/workspaces/wamas-5_git/wamas5/.git/config
	at org.eclipse.jgit.storage.file.FileBasedConfig.load(FileBasedConfig.java:152)
	at org.eclipse.jgit.storage.file.FileRepository.loadRepoConfig(FileRepository.java:224)
	at org.eclipse.jgit.storage.file.FileRepository.getConfig(FileRepository.java:328)
	... 47 more
Caused by: java.nio.channels.ClosedByInterruptException
	at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:201)
	at sun.nio.ch.FileChannelImpl.size(FileChannelImpl.java:335)
	at org.eclipse.jgit.util.IO.readFully(IO.java:140)
	at org.eclipse.jgit.util.IO.readFully(IO.java:78)
	at org.eclipse.jgit.storage.file.FileBasedConfig.load(FileBasedConfig.java:136)
	... 49 more


Reproducible: Sometimes

Steps to Reproduce:
1. delete many branches under load.

seems like there is some retry logic missing in case of an IO interruption from the OS.