Skip to main content



      Home
Home » Eclipse Projects » EGit / JGit » Deadlock while "Auto Share GIT projects"
Deadlock while "Auto Share GIT projects" [message #1803843] Tue, 12 March 2019 07:33 Go to next message
Eclipse UserFriend
Hey guys,

we have included the EGit feature in our product.

We are creating an IProject programmatically. After the project is created we are copying some resources into the project, and then we perform a build.

Then an exception is thrown because there is a deadlock. The stacktrace is the following:


!ENTRY org.eclipse.core.jobs 4 2 2019-03-12 11:41:56.504
!MESSAGE Deadlock detected. All locks owned by thread main will be suspended.
!STACK 0
java.lang.IllegalStateException
at org.eclipse.core.internal.jobs.DeadlockDetector.reportDeadlock(DeadlockDetector.java:602)
at org.eclipse.core.internal.jobs.DeadlockDetector.lockWaitStart(DeadlockDetector.java:406)
at org.eclipse.core.internal.jobs.LockManager.addLockWaitThread(LockManager.java:157)
at org.eclipse.core.internal.jobs.OrderedLock.doAcquire(OrderedLock.java:171)
at org.eclipse.core.internal.jobs.OrderedLock.acquire(OrderedLock.java:109)
at org.eclipse.core.internal.jobs.OrderedLock.acquire(OrderedLock.java:85)
at org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.java:125)
at org.eclipse.core.internal.resources.Workspace.prepareOperation(Workspace.java:2243)
at org.eclipse.core.internal.resources.Project.touch(Project.java:1319)
at org.eclipse.team.core.RepositoryProvider.map(RepositoryProvider.java:135)
at org.eclipse.egit.core.op.ConnectProviderOperation.connectProject(ConnectProviderOperation.java:165)
at org.eclipse.egit.core.op.ConnectProviderOperation.execute(ConnectProviderOperation.java:111)
at org.eclipse.egit.core.internal.job.JobUtil$1.run(JobUtil.java:55)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
!SUBENTRY 1 org.eclipse.core.jobs 4 2 2019-03-12 11:41:56.505
!MESSAGE Thread Worker-5: Auto share git projects has locks: MultiRule[P/SomeProject], P/SomeProject, OrderedLock (3) and is waiting for lock OrderedLock (0)
!SUBENTRY 1 org.eclipse.core.jobs 4 2 2019-03-12 11:41:56.505
!MESSAGE Thread main has locks: OrderedLock (0) and is waiting for lock P/SomeProject


Is it somehow possible to wait until the "Auto share GIT projects" job is done?
Or is it possible to deactivate the auto sharing for one specific project? We acutally don't need it.
Re: Deadlock while "Auto Share GIT projects" [message #1803865 is a reply to message #1803843] Tue, 12 March 2019 12:08 Go to previous messageGo to next message
Eclipse UserFriend
What does the main thread do? Without stack trace and seeing actual code I cannot answer these questions. Are you creating the project and do other manipulations inside a workspace operation with a proper scheduling rule? If not, do so.
Re: Deadlock while "Auto Share GIT projects" [message #1803884 is a reply to message #1803865] Wed, 13 March 2019 02:50 Go to previous message
Eclipse UserFriend
We are creating some files. I thought that we do this in a job with proper scheduling rule.

However, we already fixed the problem. We used a different approach. Since we do not need the auto-sharing of the project, we deactivate the preference (InstanceScope.INSTANCE.getNode("org.eclipse.egit.core").putBoolean(GitCorePreferences.core_autoShareProjects, false)), before we are building the project. Then we activate it again.

This works fine for us.
Previous Topic:Is it possible to ignore 'message of the day' in egit via SSH
Next Topic:rebase interactive removes projects from workspace
Goto Forum:
  


Current Time: Tue Jul 22 08:41:53 EDT 2025

Powered by FUDForum. Page generated in 0.03817 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top