Bug 202822 - [dstore] various synchronization issues
Summary: [dstore] various synchronization issues
Status: VERIFIED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 2.0.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-10 12:44 EDT by David McKnight CLA
Modified: 2007-11-27 15:38 EST (History)
1 user (show)

See Also:
xuanchen: review+


Attachments
patch to merge dstore synch changes from IBM RSE (21.32 KB, patch)
2007-09-11 12:11 EDT, David McKnight CLA
no flags Details | Diff
updated patch to avoid array copy issue (22.21 KB, patch)
2007-09-12 15:09 EDT, David McKnight CLA
no flags Details | Diff
patch to remove println (683 bytes, patch)
2007-09-13 14:59 EDT, David McKnight CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David McKnight CLA 2007-09-10 12:44:48 EDT
There are a few synchronization issues for dstore that were found in the IBM version of RSE.  These need to be merged here.
Comment 1 David McKnight CLA 2007-09-11 12:11:04 EDT
Created attachment 78074 [details]
patch to merge dstore synch changes from IBM RSE
Comment 2 David McKnight CLA 2007-09-11 12:12:42 EDT
Xuan, could you review this?
Comment 3 Xuan Chen CLA 2007-09-12 00:19:18 EDT
Dave,

I applied the patch, and tried the following scenario in the linux system dmcknigh3:

Go to the folder /home/tester, and launch a command shell.
Input command "ls -Rpal" in the command shell.
I got the result lines printed out in the shell window.
Then I issue this command again.  I got the following errors (actually, 4 of them) in the console of my first eclipse instance:

java.lang.ArrayIndexOutOfBoundsException
	at java.lang.System.arraycopy(Native Method)
	at java.util.ArrayList.toArray(Unknown Source)
	at org.eclipse.rse.subsystems.shells.core.model.RemoteCommandShell.listOutput(RemoteCommandShell.java:130)
	at org.eclipse.rse.shells.ui.view.SystemViewRemoteOutputAdapter.getChildren(SystemViewRemoteOutputAdapter.java:355)
	at org.eclipse.rse.internal.ui.view.SystemTableViewProvider.getElements(SystemTableViewProvider.java:162)
	at org.eclipse.rse.internal.ui.view.SystemTableViewProvider.getChildren(SystemTableViewProvider.java:108)
	at org.eclipse.rse.shells.ui.view.SystemCommandsView.updateChildren(SystemCommandsView.java:140)
	at org.eclipse.rse.internal.shells.ui.view.CommandsViewPage.updateOutput(CommandsViewPage.java:549)
	at org.eclipse.rse.internal.shells.ui.view.CommandsViewWorkbook.updateOutput(CommandsViewWorkbook.java:188)
	at org.eclipse.rse.internal.shells.ui.view.SystemCommandsViewPart.updateOutput(SystemCommandsViewPart.java:626)
	at org.eclipse.rse.internal.shells.ui.view.SystemCommandsViewPart.systemResourceChanged(SystemCommandsViewPart.java:750)
	at org.eclipse.rse.ui.internal.model.SystemResourceChangeManager.notify(SystemResourceChangeManager.java:74)
	at org.eclipse.rse.ui.internal.model.SystemRegistry.fireEvent(SystemRegistry.java:2553)
	at org.eclipse.rse.internal.subsystems.shells.servicesubsystem.OutputRefreshJob.runInUIThread(OutputRefreshJob.java:83)
	at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:94)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1144)

I removed the patch, and tried this scenario several times.  But did not see any errors.  

/home/tester is a pretty big folder.
Comment 4 David McKnight CLA 2007-09-12 15:09:49 EDT
Created attachment 78224 [details]
updated patch to avoid array copy issue

I've updated the patch to avoid the array copy issue.
Comment 5 Xuan Chen CLA 2007-09-12 15:49:22 EDT
Got the updated fix, and ran the same scenario again.  Things are better now.
Comment 6 Martin Oberhuber CLA 2007-09-12 17:18:19 EDT
The patch contains several System.out.println()
Are these really necessary?
I generally don't like seeing System.out prints in our commercial product.
Comment 7 Martin Oberhuber CLA 2007-09-12 17:20:11 EDT
CommandMiner now returns version "8.0.0" 
it was "6.4.0" in RSE 2.0
Can this a backward compatibility issue?
Comment 8 David McKnight CLA 2007-09-12 18:12:50 EDT
I've removed the printlns I had added.  The version moved to 8.0.0 since it should have changed a while back.  At the moment, nothing depends on this miner's version so it's safe.
Comment 9 Martin Oberhuber CLA 2007-09-13 14:41:50 EDT
The dstore daemon still prints
   "not doing spirit"
is this intentional?
Comment 10 David McKnight CLA 2007-09-13 14:59:08 EDT
Created attachment 78370 [details]
patch to remove println
Comment 11 David McKnight CLA 2007-09-13 14:59:46 EDT
That one was missed.  I've attached a patch with it removed.  Can I put this in cvs?
Comment 12 Martin Oberhuber CLA 2007-09-13 15:20:17 EDT
yes, go ahead