JDK-6661452 : Jbroker fatal error dialog during automation in Vista
  • Type: Bug
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 6u10
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_vista
  • CPU: generic
  • Submitted: 2008-02-11
  • Updated: 2011-02-16
  • Resolved: 2008-02-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6u10Resolved
Related Reports
Duplicate :  
Relates :  
Description
Tested build :6u10b10 PIT
Platform :Vista

Automation of Java webstart is blocked because of the error dialog
jbroker fatal error dialog during debug.
ExclusiveOpen got Windows Error:32 

This Windows error is: ERROR_SHARING_VIOLATION "The process cannot access the
file because it is being used by another process."

I am not able to reproduce this manually.This comes randomly for different tests.

Before respin,automation on Vista was completed blocked  because of another error dialog 
jbroker fatal error dialog during debug.
Loadmaps could not open C:\Program Files\Java\jre\lib\kernel.map.

This was solved by modifying the script not to delete this file (C:\Program Files\Java\jre\lib\kernel.map).But after that I have got this new error dialog which is coming randomly.

VNC Details
urti069.india.sun.com
Password:vnc123

Comments
SUGGESTED FIX The LogFprintf routine in security.cpp must also avoid messagebox creation, and I decided none of the new code should terminate jbroker: let DownloadManager decide the disposition of errors in all (new) cases. The fix for the "automation" aspect of this bug is out for review. It remains to be seen if there are any underlying issues.
12-02-2008

SUGGESTED FIX Something like the code shown below must replace the current jbroker.cpp moveFile code to eliminate the change in user experience by jbroker. In addition if there is a *bug* to do with the SecurelyCopyPath code that is causing Windows error 32, that should be fixed too. int moveFile(char* fromPath, char* toPath, char * userLocalLowDir, bool isFile) { int ret = 1; char sourcePath[MAX_PATH]; // get source path for entry lookup in kernel.map int localLowLen = strlen(userLocalLowDir); strcpy(sourcePath, fromPath+localLowLen+1); int copyResult = SecurelyCopyPath(userLocalLowDir, sourcePath, toPath, isFile); // Every error is returned back to the client. To get // details see the "-verbose" cmd line option. if (copyResult != SC_OK) { ret = 0; } else { // make sure the file can be accessed by all users // set it to the same DACL as java.exe has DWORD result = SetNamedSecurityInfo(toPath, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, pJavaDACL, NULL); if (result != ERROR_SUCCESS) { ret = 0; } } return ret; }
12-02-2008

EVALUATION This error is Windows saying "you can't do this operation because another process is either 1) "in a directory that some other process is trying to operate on", or 2) "trying to operate on a file that some other process has open." Examples of this would be doing a "cwd" into the high-privilege install area (e.g. java/jre6/bin), or trying to copy, read, write, or any other operation on the files involved with jbroker, either "source" or "destination" paths (i.e. under the user's app data or under the target install directories). A script deleting file kernel.map would constitute sabotage of jbroker: if it can't read that file it cannot begin to function. If automated tests arrange other operations on files that jbroker is attempting to securely move from the user install area to the permanent (high privilege) install area, that will also sabotage this program. I'm puzzled why only update msgs for this bug came from Bugster: I never saw the "created hot P1,etc" msg.
12-02-2008