This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 60279 - cvslite problem with enabling/disabling module
Summary: cvslite problem with enabling/disabling module
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@platform
URL:
Keywords:
: 62053 (view as bug list)
Depends on: 64457
Blocks:
  Show dependency tree
 
Reported: 2005-06-20 13:45 UTC by Peter Pis
Modified: 2008-12-22 20:38 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ArrayStoreException (2.63 KB, text/plain)
2005-06-20 13:46 UTC, Peter Pis
Details
ClassCastException (2.73 KB, text/plain)
2005-07-14 15:37 UTC, Peter Pis
Details
ClassCastException2 (890 bytes, text/plain)
2005-09-12 15:44 UTC, Peter Pis
Details
IOException (3.78 KB, text/plain)
2005-09-15 10:44 UTC, Peter Pis
Details
deadlock (17.63 KB, text/plain)
2005-11-11 14:52 UTC, Jiri Rechtacek
Details
Null Pointer Exception (1.29 KB, text/plain)
2005-11-11 14:53 UTC, Jiri Rechtacek
Details
IllegalStateException (829 bytes, text/plain)
2005-12-03 07:11 UTC, Peter Pis
Details
IOException (6.56 KB, text/plain)
2005-12-12 09:39 UTC, Peter Pis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Pis 2005-06-20 13:45:24 UTC
Product Version       = NetBeans IDE Dev (Build 200506191800)
Operating System      = Windows XP version 5.1 running on x86
Java; VM; Vendor      = 1.5.0_04; Java HotSpot(TM) Client VM 1.5.0_04-b05; Sun
Microsystems Inc.
Java Home             = d:\Java\jdk1.5.0_04\jre
System Locale; Encod. = en_GB (nb); Cp1252

Steps:
1. Start NB.
2. Register new CVS versioned directory, check out sources, open project from it.
3. Modify some file, save it and commit it.
4. Install nbm-s for new cvslite support.
5. Check out sources, open project.
6. Modify some file, save it and commit it.
7. Now disable cvslite support.
8. Switch to "Versioning" view, try to invoke some "CVS" popup menu action.

Exception is thrown.
Comment 1 Peter Pis 2005-06-20 13:46:20 UTC
Created attachment 22794 [details]
ArrayStoreException
Comment 2 Peter Pis 2005-07-14 15:37:34 UTC
Created attachment 23105 [details]
ClassCastException
Comment 3 Maros Sandor 2005-09-01 10:18:33 UTC
Versioning views now close automatically when old/new module uninstalls.

/shared/data/ccvs/repository/vcscore/nbproject/project.properties,v  <-- 
project.properties
new revision: 1.4; previous revision: 1.3
/shared/data/ccvs/repository/vcscore/src/org/netbeans/modules/vcscore/VcsModule.java,v
 <--  VcsModule.java
new revision: 1.6; previous revision: 1.5
Comment 4 Peter Pis 2005-09-12 15:44:05 UTC
Reopening. Exception is thrown. ClassCastException2.
Comment 5 Peter Pis 2005-09-12 15:44:35 UTC
Created attachment 24706 [details]
ClassCastException2
Comment 6 Maros Sandor 2005-09-12 16:26:46 UTC
Catching errors from already uninstalled component.

/shared/data/ccvs/repository/javacvs/cvsmodule/src/org/netbeans/modules/versioning/system/cvss/CvsVersioningSystem.java,v
 <--  CvsVersioningSystem.java
new revision: 1.24; previous revision: 1.23
Comment 7 Peter Pis 2005-09-15 10:43:41 UTC
Reopening.
Comment 8 Peter Pis 2005-09-15 10:44:45 UTC
Created attachment 24826 [details]
IOException
Comment 9 Peter Pis 2005-09-15 10:45:18 UTC
See attached exception. (IOException)
Comment 10 _ pkuzel 2005-09-15 17:21:35 UTC
*** Issue 62053 has been marked as a duplicate of this issue. ***
Comment 11 _ pkuzel 2005-09-15 17:22:35 UTC
I think that on switching off vcscore IDE must be restarted. Filesystem vcscore
provides is too deep in infractructure so it is probably referenced by many UI
nodes => unreleased by disabling the module.
Comment 12 Maros Sandor 2005-09-20 15:42:08 UTC
Fixed by closing VcsOutput when vcscore uninstalls.
Personally I think switching of modules is quite fragile now and we should, as
Petr suggested, recommend users to restart IDE after such operation. Sometimes
random ClassCastExceptions appear out of places when everything is perfectly
safe during normal operation. I suspect this to be a classloader issue, leaving
open (see dependency).

/shared/data/ccvs/repository/vcscore/src/org/netbeans/modules/vcscore/VcsModule.java,v
 <--  VcsModule.java
new revision: 1.8; previous revision: 1.7
/shared/data/ccvs/repository/vcscore/nbproject/project.properties,v  <-- 
project.properties
new revision: 1.7; previous revision: 1.6
Comment 13 Maros Sandor 2005-09-29 10:25:08 UTC
Interaction between VCScore/generic and rest of IDE is quite complex and it is
hard if not impossible to uninstall them from running IDE ompletely. I'm closing
this as fixed because:
a) we fixed most of apparent issues related to lingering UI components of
installed modules
b) we should not invest too much effort to get old modules working in this rare
scenario
c) restarting IDE automatically is not a good idea afterall, a warning is sufficient

/shared/data/ccvs/repository/javacvs/cvsmodule/src/org/netbeans/modules/versioning/system/cvss/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.20; previous revision: 1.19
Comment 14 Peter Pis 2005-10-07 13:24:15 UTC
NB 200510061800. SunOS,

Steps:
1. Install VCS generic.
2. Turn on NetBeans CVS Support again.
Exception

java.lang.IllegalStateException: Already disabled:
StandardModule:org.netbeans.modules.vcs.profiles.teamware jarFile:
/space/NetBeans/5.0/user/modules/org-netbeans-modules-vcs-profiles-teamware.jar
	at org.netbeans.core.startup.ModuleList$Listener.stepDisable(ModuleList.java:1610)
	at org.netbeans.core.startup.ModuleList$Listener.access$2100(ModuleList.java:1223)
	at org.netbeans.core.startup.ModuleList$5.run(ModuleList.java:1455)
	at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:96)
	at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:450)
	at org.netbeans.core.startup.ModuleList$Listener.run(ModuleList.java:1430)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:471)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:904)
Comment 15 Maros Sandor 2005-10-12 10:13:32 UTC
I cannot reproduce it. Also, there is no trace of CVS in the stacktrace. Please
evaluate.
Comment 16 Jan Chalupa 2005-10-21 14:03:13 UTC
Cannot reproduce the last mentioned problem. A candidate for WONTFIX unless a
reliably reproducible scenario is provided.

Yarda, Jesse, note pkuzel's comment regarding enforced IDE restart when
cvslite/vcsgeneric modules are enabled/disabled. Also see Petr's RFE (issue
#64457). It seems impossible to uninstall vcsgeneric cleanly (especially after
it's been actively used during IDE session) and replace it with cvslite. Restart
might be an option, but we've never supported this scenario and the
corresponding API is missing. Do you think it's a good idea in general?
Comment 17 Jesse Glick 2005-10-24 16:40:20 UTC
You can add needsrestart="true" to the NBM of either cvslite or vcsgeneric or
both. (There is a project.properties key for this, and I think the GUI dialog
shows it too.) It is better to fix the underlying problems if possible. Since
VCS integrations are supposed to work thru Filesystems, I think masterfs would
be responsible for detaching old impls. Whether we want to spend time fixing
such a thing is another question.
Comment 18 Jan Chalupa 2005-10-24 20:16:21 UTC
Adding needsrestart="true" to the NBM is fine. However, I'm afraid that in this
case, the IDE would need to be restarted every time the vcsgeneric or cvslite
modules are (re-)enabled (i.e. not only when it is installed from the NBM for
the fist time).
Comment 19 Jiri Rechtacek 2005-11-11 14:50:40 UTC
During testing switch Versioning vs. Version Control I got (multiple) a deadlock
probably caused vcscore.registry.FSRegistry.getRegistered (see the attached
thread dump), also a NPE thrown by GroupUtils.getDefaultGroupInstance(). No
problem with IllegalStateException: Already disabled I got.
Reassigned back to vcs.
Btw: Module Manager should block user's action during enabling/disabling modules
to avoid a mass caused fast enable<->disable several module at the same time.
Comment 20 Jiri Rechtacek 2005-11-11 14:52:19 UTC
Created attachment 26864 [details]
deadlock
Comment 21 Jiri Rechtacek 2005-11-11 14:53:01 UTC
Created attachment 26865 [details]
Null Pointer Exception
Comment 22 Jiri Rechtacek 2005-11-11 14:55:19 UTC
Info about build where I got the deadlock:
>Log Session: Friday, November 11, 2005 3:04:24 PM GMT+01:00
>System Info:
  Product Version         = NetBeans IDE Dev (Build 051110)
  Operating System        = Linux version 2.6.12 running on i386
  Java; VM; Vendor; Home  = 1.6.0-ea; Java HotSpot(TM) Client VM 1.6.0-ea-b58;
Sun Microsystems Inc.; /space/shared/java/jdk1.6.0/jre
Comment 23 Martin Entlicher 2005-11-14 11:37:53 UTC
The deadlock is really ugly - FSRegistry.getRegistered(), which contains
synchronization is called in two threads in parallel and one thread is waiting
for the other.

We would have to assure that SharedClassObject.findObject() is not called under
any lock... uff...
Comment 24 Martin Entlicher 2005-11-14 12:37:43 UTC
The deadlock should not occur any more after this fix - vcscore module version
1.16.9:

/cvs/vcscore/src/org/netbeans/modules/vcscore/registry/RecognizedFS.java,v  <--
 RecognizedFS.java
new revision: 1.6; previous revision: 1.5

/cvs/vcscore/src/org/netbeans/modules/vcscore/registry/FSRegistry.java,v  <-- 
FSRegistry.java
new revision: 1.9; previous revision: 1.8

/cvs/vcscore/nbproject/project.properties,v  <--  project.properties
new revision: 1.13; previous revision: 1.12

The NPE is not a fault of VCS modules IMHO - it just should have the settings
ready when it's enabled. I did not reproduce it anyway.


Moving back to core to resolve the IllegalStateException in the module system.
Comment 25 Jiri Rechtacek 2005-11-14 12:54:08 UTC
Works for me on my custom build 051113 (iff the reported deadlock didn't
appeared), I'll assure if works on the last build and close as WORKSFORME.
Comment 26 Jiri Rechtacek 2005-11-14 14:19:12 UTC
Added Progress Panel to avoid simultaneous actions enable/disable/uninstall. No
problem switch Versioning vs. Version control except the reported deadlock. IMHO
can be closed as WORKSFORME.

Checking in autoupdate/src/org/netbeans/modules/autoupdate/Bundle.properties;
/shared/data/ccvs/repository/autoupdate/src/org/netbeans/modules/autoupdate/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.168; previous revision: 1.167
done
Checking in
autoupdate/src/org/netbeans/modules/autoupdate/catalog/Bundle.properties;
/shared/data/ccvs/repository/autoupdate/src/org/netbeans/modules/autoupdate/catalog/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.8; previous revision: 1.7
done
Checking in autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleBean.java;
/shared/data/ccvs/repository/autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleBean.java,v
 <--  ModuleBean.java
new revision: 1.5; previous revision: 1.4
done
Checking in
autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleCatalogAction.java;
/shared/data/ccvs/repository/autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleCatalogAction.java,v
 <--  ModuleCatalogAction.java
new revision: 1.2; previous revision: 1.1
done
Checking in
autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleNodeUtils.java;
/shared/data/ccvs/repository/autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleNodeUtils.java,v
 <--  ModuleNodeUtils.java
new revision: 1.4; previous revision: 1.3
done
Checking in
autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleSelectionPanel.java;
/shared/data/ccvs/repository/autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleSelectionPanel.java,v
 <--  ModuleSelectionPanel.java
new revision: 1.17; previous revision: 1.16
done
RCS file:
/shared/data/ccvs/repository/autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleUpdaterProgress.form,v
done
Checking in
autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleUpdaterProgress.form;
/shared/data/ccvs/repository/autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleUpdaterProgress.form,v
 <--  ModuleUpdaterProgress.form
initial revision: 1.1
done
RCS file:
/shared/data/ccvs/repository/autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleUpdaterProgress.java,v
done
Checking in
autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleUpdaterProgress.java;
/shared/data/ccvs/repository/autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleUpdaterProgress.java,v
 <--  ModuleUpdaterProgress.java
initial revision: 1.1
done
Comment 27 Peter Pis 2005-12-03 07:11:42 UTC
Created attachment 27513 [details]
IllegalStateException
Comment 28 Peter Pis 2005-12-03 07:13:34 UTC
Reopening -> IllegalStateException

1. Start NB.
2. Install All VCS generic modules.
3. Enable VCS generic.
4. Enable new CVS support.

Comment 29 Peter Pis 2005-12-03 07:15:59 UTC
Reassigning to VCSgeneric
Comment 30 Peter Pis 2005-12-03 09:10:28 UTC
Last problem reproduced in NB build 051203.
Comment 31 Martin Entlicher 2005-12-08 20:07:23 UTC
The IllegalStateException is thrown from core. There seems to be some unexpected
state of enabled/disabled modules.
Comment 32 Martin Entlicher 2005-12-08 20:20:22 UTC
So this seems to be fixed, there is already issue #66587 submitted for the
IllegalStateException.
Comment 33 Peter Pis 2005-12-12 09:39:32 UTC
Created attachment 27728 [details]
IOException
Comment 34 Peter Pis 2005-12-12 09:42:57 UTC
NB 200512111900.

1. Install VCS generics modules.
2. Enable new CVS support.

Informational exception is thrown, please evaluate.
Comment 35 Peter Pis 2005-12-17 07:14:37 UTC
It's ok now... there was filed issue #70507 for deadlock mentioned here. Verified.