Community
Participate
Working Groups
If a task repository opens the secure store on a non-UI thread while task repository credentials are accessed concurrently on the UI thread a dead lock can occur: "Worker-0" prio=10 tid=0x00000000416d3800 nid=0x7da1 in Object.wait() 0x00007f5256bf1000 java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00007f52982597a0> (a org.eclipse.ui.internal.Semaphore) at org.eclipse.ui.internal.Semaphore.acquire(Semaphore.java:43) - locked <0x00007f52982597a0> (a org.eclipse.ui.internal.Semaphore) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:168) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4113) at org.eclipse.equinox.internal.security.ui.storage.DefaultPasswordProvider.getPassword(DefaultPasswordProvider.java:47) at org.eclipse.equinox.internal.security.storage.PasswordProviderModuleExt.getPassword(PasswordProviderModuleExt.java:35) at org.eclipse.equinox.internal.security.storage.SecurePreferencesRoot.getModulePassword(SecurePreferencesRoot.java:254) at org.eclipse.equinox.internal.security.storage.SecurePreferencesRoot.getPassword(SecurePreferencesRoot.java:219) at org.eclipse.equinox.internal.security.storage.SecurePreferences.put(SecurePreferences.java:224) at org.eclipse.equinox.internal.security.storage.SecurePreferencesWrapper.put(SecurePreferencesWrapper.java:110) at org.eclipse.mylyn.tasks.core.TaskRepository.addAuthInfo(TaskRepository.java:258) - locked <0x00007f527a6857a8> (a java.lang.Object) at org.eclipse.mylyn.tasks.core.TaskRepository.setCredentials(TaskRepository.java:763) - locked <0x00007f527b0c47a0> (a org.eclipse.mylyn.tasks.core.TaskRepository) at com.atlassian.connector.eclipse.internal.jira.ui.MigrateToSecureStorageJob.migrateToSecureStorage(MigrateToSecureStorageJob.java:62) at com.atlassian.connector.eclipse.internal.jira.ui.MigrateToSecureStorageJob.run(MigrateToSecureStorageJob.java:45) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) "main" prio=10 tid=0x0000000040f5e800 nid=0x7d87 waiting for monitor entry 0x00007f52a6c75000 java.lang.Thread.State: BLOCKED (on object monitor) at org.eclipse.mylyn.tasks.core.TaskRepository.getAuthInfo(TaskRepository.java:394) - waiting to lock <0x00007f527a6857a8> (a java.lang.Object) at org.eclipse.mylyn.tasks.core.TaskRepository.getCredentials(TaskRepository.java:513) - locked <0x00007f527b0af498> (a org.eclipse.mylyn.tasks.core.TaskRepository) at org.eclipse.mylyn.tasks.core.TaskRepository.getUserName(TaskRepository.java:653) at org.eclipse.mylyn.tasks.core.TaskRepository.getUserName(TaskRepository.java:643) at com.tasktop.resources.ui.TasktopResourcesUiPlugin$5.run(TasktopResourcesUiPlugin.java:281) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) - locked <0x00007f529b8ff020> (a org.eclipse.swt.widgets.RunnableLock) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3468) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3115) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) 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:368) 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:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311) at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Steffen, Is there a chance it's fixed for Mylyn 3.4 (and Helios release)? It's quite urgent for us, as otherwise we would need to asap revert all changes we made to keep passwords secure of our connectors. Cheers, Wojtek
Created attachment 170706 [details] retrieve username without opening secure store
Created attachment 170707 [details] mylyn/context/zip
Created attachment 170710 [details] removed locking when accessing secure store and legacy fall back
Created attachment 170711 [details] mylyn/context/zip
I have committed the patches which should fix the dead lock and password prompting on startup. Wojtek, please let me know in case anything else need to be done here.
Thanks Steffen! I hope it will suffice. Now I am dogfooding Mylyn from trunk every day (with our securely stored passwords), so in case there some other problems or changes required, I'll report them immediately.