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 20540 - All file systems are not in the repository during setting deserialization
Summary: All file systems are not in the repository during setting deserialization
Status: VERIFIED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P4 blocker (vote)
Assignee: David Konecny
URL:
Keywords:
: 19088 20515 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-02-14 11:25 UTC by Damian Frach
Modified: 2008-12-22 20:47 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
A patch that slows down startup by 25% (1.24 KB, patch)
2002-02-19 10:29 UTC, David Strupl
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Damian Frach 2002-02-14 11:25:20 UTC
All file systems are not in the repository during setting deserialization.

After the IDE restart all file systems are not in the repository during setting 
deserialization. After while all file systems are in the repository.

Breakpoints deserialization is implemented as setting deserialization. Because 
JSP and servlet breakpoints need their FSs for correct deserialization (there 
is stored important information), the correct JSP/servlet breakpoint 
deserialization is impossible after the IDE restart.
Comment 1 _ ttran 2002-02-14 15:40:55 UTC
Davide, Automount?
Comment 2 David Strupl 2002-02-14 16:04:52 UTC
I'll look at it.
Comment 3 Damian Frach 2002-02-15 09:40:21 UTC
*** Issue 20515 has been marked as a duplicate of this issue. ***
Comment 4 David Strupl 2002-02-15 10:15:15 UTC
Could you please attach stack trace of the moment when your FileObject
is being deserialized? I need it to check from where the
deserialization was triggered to make sure the filesystems are there.
Thanks.
Comment 5 Damian Frach 2002-02-15 12:12:30 UTC
Ohhh, now I see, breakpoints are deserialized during debug module 
installation. This is probably change from the Pilsen.
Sorry for confussion.


*********** Exception occurred ************
Fri Feb 15 13:01:41 CET 2002: 
org.openide.filesystems.FileStateInvalidException: <no message>
org.openide.filesystems.FileStateInvalidException
	at 
org.openide.filesystems.AbstractFileObject$Invalid.getFileSystem
(AbstractFileObject.java:831)
	at 
org.netbeans.modules.web.core.jsploader.JspCompileUtil.getContextRoot
(JspCompileUtil.java:187)
[catch] at 
org.netbeans.modules.web.core.jsploader.JspDataObject.addWebContextLis
tener(JspDataObject.java:762)
	at 
org.netbeans.modules.web.core.jsploader.JspDataObject.getPlugin
(JspDataObject.java:609)
	at 
org.netbeans.modules.web.core.jsploader.JspDataObject.getServletDataOb
ject(JspDataObject.java:634)
	at 
org.netbeans.modules.web.core.jsploader.JspDataObject.getServletEditor
(JspDataObject.java:889)
	at 
org.netbeans.modules.web.core.jsploader.ServletEditor$JspEnv.findClone
ableOpenSupport(ServletEditor.java:409)
	at org.openide.text.PositionRef$Manager.readObject
(PositionRef.java:208)
	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:324)
	at java.io.ObjectStreamClass.invokeReadObject
(ObjectStreamClass.java:809)
	at java.io.ObjectInputStream.readSerialData
(ObjectInputStream.java:1733)
	at java.io.ObjectInputStream.readOrdinaryObject
(ObjectInputStream.java:1636)
	at java.io.ObjectInputStream.readObject0
(ObjectInputStream.java:1264)
	at java.io.ObjectInputStream.readObject
(ObjectInputStream.java:322)
	at org.openide.text.PositionRef.readObject
(PositionRef.java:98)
	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:324)
	at java.io.ObjectStreamClass.invokeReadObject
(ObjectStreamClass.java:809)
	at java.io.ObjectInputStream.readSerialData
(ObjectInputStream.java:1733)
	at java.io.ObjectInputStream.readOrdinaryObject
(ObjectInputStream.java:1636)
	at java.io.ObjectInputStream.readObject0
(ObjectInputStream.java:1264)
	at java.io.ObjectInputStream.readObject
(ObjectInputStream.java:322)
	at org.openide.text.DocumentLine.readObject
(DocumentLine.java:267)
	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:324)
	at java.io.ObjectStreamClass.invokeReadObject
(ObjectStreamClass.java:809)
	at java.io.ObjectInputStream.readSerialData
(ObjectInputStream.java:1733)
	at java.io.ObjectInputStream.readOrdinaryObject
(ObjectInputStream.java:1636)
	at java.io.ObjectInputStream.readObject0
(ObjectInputStream.java:1264)
	at java.io.ObjectInputStream.defaultReadFields
(ObjectInputStream.java:1830)
	at java.io.ObjectInputStream.readSerialData
(ObjectInputStream.java:1756)
	at java.io.ObjectInputStream.readOrdinaryObject
(ObjectInputStream.java:1636)
	at java.io.ObjectInputStream.readObject0
(ObjectInputStream.java:1264)
	at java.io.ObjectInputStream.defaultReadFields
(ObjectInputStream.java:1830)
	at java.io.ObjectInputStream.readSerialData
(ObjectInputStream.java:1756)
	at java.io.ObjectInputStream.readOrdinaryObject
(ObjectInputStream.java:1636)
	at java.io.ObjectInputStream.readObject0
(ObjectInputStream.java:1264)
	at java.io.ObjectInputStream.defaultReadFields
(ObjectInputStream.java:1830)
	at java.io.ObjectInputStream.readSerialData
(ObjectInputStream.java:1756)
	at java.io.ObjectInputStream.readOrdinaryObject
(ObjectInputStream.java:1636)
	at java.io.ObjectInputStream.readObject0
(ObjectInputStream.java:1264)
	at java.io.ObjectInputStream.defaultReadFields
(ObjectInputStream.java:1830)
	at java.io.ObjectInputStream.defaultReadObject
(ObjectInputStream.java:450)
	at org.netbeans.modules.debugger.CoreBreakpoint.readObject
(CoreBreakpoint.java:124)
	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:324)
	at java.io.ObjectStreamClass.invokeReadObject
(ObjectStreamClass.java:809)
	at java.io.ObjectInputStream.readSerialData
(ObjectInputStream.java:1733)
	at java.io.ObjectInputStream.readOrdinaryObject
(ObjectInputStream.java:1636)
	at java.io.ObjectInputStream.readObject0
(ObjectInputStream.java:1264)
	at java.io.ObjectInputStream.readObject
(ObjectInputStream.java:322)
	at java.util.HashMap.readObject(HashMap.java:973)
	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:324)
	at java.io.ObjectStreamClass.invokeReadObject
(ObjectStreamClass.java:809)
	at java.io.ObjectInputStream.readSerialData
(ObjectInputStream.java:1733)
	at java.io.ObjectInputStream.readOrdinaryObject
(ObjectInputStream.java:1636)
	at java.io.ObjectInputStream.readObject0
(ObjectInputStream.java:1264)
	at java.io.ObjectInputStream.defaultReadFields
(ObjectInputStream.java:1830)
	at java.io.ObjectInputStream.defaultReadObject
(ObjectInputStream.java:450)
	at org.netbeans.modules.debugger.BreakpointGroup.readObject
(BreakpointGroup.java:92)
	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:324)
	at java.io.ObjectStreamClass.invokeReadObject
(ObjectStreamClass.java:809)
	at java.io.ObjectInputStream.readSerialData
(ObjectInputStream.java:1733)
	at java.io.ObjectInputStream.readOrdinaryObject
(ObjectInputStream.java:1636)
	at java.io.ObjectInputStream.readObject0
(ObjectInputStream.java:1264)
	at java.io.ObjectInputStream.defaultReadFields
(ObjectInputStream.java:1830)
	at java.io.ObjectInputStream.defaultReadObject
(ObjectInputStream.java:450)
	at org.netbeans.modules.debugger.CoreBreakpoint.readObject
(CoreBreakpoint.java:124)
	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:324)
	at java.io.ObjectStreamClass.invokeReadObject
(ObjectStreamClass.java:809)
	at java.io.ObjectInputStream.readSerialData
(ObjectInputStream.java:1733)
	at java.io.ObjectInputStream.readOrdinaryObject
(ObjectInputStream.java:1636)
	at java.io.ObjectInputStream.readObject0
(ObjectInputStream.java:1264)
	at java.io.ObjectInputStream.readArray
(ObjectInputStream.java:1593)
	at java.io.ObjectInputStream.readObject0
(ObjectInputStream.java:1261)
	at java.io.ObjectInputStream.defaultReadFields
(ObjectInputStream.java:1830)
	at java.io.ObjectInputStream.readSerialData
(ObjectInputStream.java:1756)
	at java.io.ObjectInputStream.readOrdinaryObject
(ObjectInputStream.java:1636)
	at java.io.ObjectInputStream.readObject0
(ObjectInputStream.java:1264)
	at java.io.ObjectInputStream.defaultReadFields
(ObjectInputStream.java:1830)
	at java.io.ObjectInputStream.defaultReadObject
(ObjectInputStream.java:450)
	at 
org.netbeans.modules.debugger.support.DebuggerSupport.readObject
(DebuggerSupport.java:91)
	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:324)
	at java.io.ObjectStreamClass.invokeReadObject
(ObjectStreamClass.java:809)
	at java.io.ObjectInputStream.readSerialData
(ObjectInputStream.java:1733)
	at java.io.ObjectInputStream.readOrdinaryObject
(ObjectInputStream.java:1636)
	at java.io.ObjectInputStream.readObject0
(ObjectInputStream.java:1264)
	at java.io.ObjectInputStream.readObject
(ObjectInputStream.java:322)
	at org.openide.options.SystemOption.readExternal
(SystemOption.java:241)
	at org.openide.util.SharedClassObject$WriteReplace.readObject
(SharedClassObject.java:732)
	at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at java.io.ObjectStreamClass.invokeReadObject
(ObjectStreamClass.java:809)
	at java.io.ObjectInputStream.readSerialData
(ObjectInputStream.java:1733)
	at java.io.ObjectInputStream.readOrdinaryObject
(ObjectInputStream.java:1636)
	at java.io.ObjectInputStream.readObject0
(ObjectInputStream.java:1264)
	at java.io.ObjectInputStream.readObject
(ObjectInputStream.java:322)
	at 
org.openide.loaders.XMLSettingsSupport$SettingsRecognizer.readSerial
(XMLSettingsSupport.java:400)
	at 
org.openide.loaders.XMLSettingsSupport$SettingsRecognizer.instanceCrea
te(XMLSettingsSupport.java:430)
	at 
org.openide.loaders.InstanceDataObject$SettingsInstance.instanceCreate
(InstanceDataObject.java:1221)
	at org.openide.loaders.FolderLookup$ICItem.getInstance
(FolderLookup.java:352)
	at org.openide.util.lookup.AbstractLookup$R.allInstances
(AbstractLookup.java:447)
	at org.openide.util.lookup.ProxyLookup$R.computeResult
(ProxyLookup.java:351)
	at org.openide.util.lookup.ProxyLookup$R.allInstances
(ProxyLookup.java:302)
	at org.openide.util.lookup.ProxyLookup$R.computeResult
(ProxyLookup.java:351)
	at org.openide.util.lookup.ProxyLookup$R.allInstances
(ProxyLookup.java:302)
	at org.openide.util.SharedClassObject.findObject
(SharedClassObject.java:495)
	at 
org.netbeans.modules.debugger.support.DebuggerSupport.initBreakpoints
(DebuggerSupport.java:484)
	at 
org.netbeans.modules.debugger.support.DebuggerSupport.getBreakpoints
(DebuggerSupport.java:387)
	at 
org.netbeans.modules.debugger.support.DebuggerModule.restored
(DebuggerModule.java:239)
	at 
org.netbeans.modules.debugger.multisession.EnterpriseModule.restored
(EnterpriseModule.java:53)
	at org.netbeans.core.modules.NbInstaller.loadCode
(NbInstaller.java:300)
	at org.netbeans.core.modules.NbInstaller.load
(NbInstaller.java:225)
	at org.netbeans.core.modules.ModuleManager.enable
(ModuleManager.java:537)
	at org.netbeans.core.modules.ModuleList.installNew
(ModuleList.java:474)
	at org.netbeans.core.modules.ModuleList.trigger
(ModuleList.java:418)
	at org.netbeans.core.modules.ModuleSystem.scanForNewAndRestore
(ModuleSystem.java:263)
	at org.netbeans.core.NonGui.run(NonGui.java:523)
	at org.netbeans.core.Main.run(Main.java:213)
	at org.openide.TopManager.initializeTopManager
(TopManager.java:120)
	at org.openide.TopManager.getDefault(TopManager.java:81)
	at org.netbeans.core.Main.main(Main.java:346)
	at org.netbeans.core.TopThreadGroup.run
(TopThreadGroup.java:87)
	at java.lang.Thread.run(Thread.java:536)


Comment 6 Damian Frach 2002-02-15 12:39:00 UTC
*** Issue 19088 has been marked as a duplicate of this issue. ***
Comment 7 David Strupl 2002-02-15 12:44:07 UTC
I said attach not paste! ;-)

Anyway - is it still a problem? Do you need to deserialize stuff
during new module installation?
Comment 8 David Strupl 2002-02-15 16:12:37 UTC
Jesse, should we ensure that when module.restored() is called all
filesystems (that the module could see when the ide was exiting) are
in the repository? We do not do it right now.
Comment 9 Jesse Glick 2002-02-18 14:05:16 UTC
I guess it would be nice for it to be more predictable. Unfortunately
the APIs were never very clear on what would or would not be available
during ModuleInstall calls. We guarantee Lookup I guess. Note that a
module can listen to changes in the Repository, but this is probably
not reliable enough, not to mention tricky.

If it is possible to ensure that AutomountSupport finishes before
module code is loaded, that would probably be better. I.e. by
modulesClassPathInitialized time.
Comment 10 David Strupl 2002-02-18 14:21:41 UTC
But what if a module adds a filesystem by specifing an entry in
automount directory? If we ensure finishing mounting before modules
are installed the automount would refresh several times during startup.
Comment 11 Jesse Glick 2002-02-18 14:54:32 UTC
Why would it refresh several times? (I don't know much about how
AutomountSupport is implemented.) In principle, since all module
layers are merged at once, you should be able to get the complete
Repository once at modulesClassPathInitialized time, then refresh it
after that only if something really changes.
Comment 12 David Strupl 2002-02-19 10:29:26 UTC
Created attachment 4740 [details]
A patch that slows down startup by 25%
Comment 13 David Strupl 2002-02-19 10:31:00 UTC
I have tried to simply force the automount to finish sooner. It slows
down the startup significantly. Maybe I am doing something wrong.
Opinions?
Comment 14 Petr Nejedly 2002-02-19 10:44:38 UTC
In fact, it is not right to try to have all FSes back online
before ModuleInstalls get called. Module provided FS implementation
may not work before module has got its restored()
BTW: I do not see (not tested yet) why should it slow down the startup
that much. AutoMount take typpically about 700ms to finish
and it takes the time at the end of the startup sequence anyway.
Interference with FolderLookup?
Comment 15 Jesse Glick 2002-02-19 11:12:32 UTC
"Module provided FS implementation may not work before module has got
its restored()" - this I don't agree with; layer-supplied objects are
supposed to be usable as soon as the module's classloader is ready,
even before restored() has been called. This is true of lookup
objects, it should be the same for mounts I guess.

BTW Petr is there any document available that shows how to compare two
runs of the IDE (e.g. during startup) and "subtract" them to find out
where the additional time is coming from? I couldn't figure out how to
do this with OptimizeIt!, maybe HAT makes it easier?
Comment 16 David Strupl 2002-02-26 08:40:52 UTC
I am donwgrading the priority of this bug. I was tempted to close it
since Damian and I found a workaround for his specific case. But as
Jesse suggests it could be possible. So I am leaving it opened with P4.
Comment 17 David Strupl 2002-06-25 07:32:30 UTC
It would be dangerous to change the startup sequence for 3.4. However
if there is a reasonable patch please attach it here and we will
consider applying it.
Comment 18 Petr Nejedly 2002-06-25 08:18:26 UTC
Some comments I forgot to attach earlier:

> "Module provided FS implementation may not work before module has
> got its restored()" - this I don't agree with; layer-supplied
> objects are supposed to be usable as soon as the module's
> classloader is ready, even before restored() has been called.

I had user-mounted FS in mind, not module-mounted...

> Petr is there any document available that shows how to compare two
> runs of the IDE (e.g. during startup) and "subtract" them to find
> out where the additional time is coming from? I couldn't figure out
> how to do this with OptimizeIt!, maybe HAT makes it easier?

Run with -J-Dorg.netbeans.log.startup=print and compare both outputs
But it's like x11perf without x11perfcomp, no automatic comparison.
Comment 19 Jesse Glick 2002-06-25 13:04:47 UTC
Petr - OK, so user-mounted filesystems. I still think these ought to
be prepared to be deserialized as soon as layers are ready.
ModuleInstall.restored() is done as a last step.
Comment 20 Marek Grummich 2002-07-22 08:53:37 UTC
Target milestone was changed from '3.4' to TBD.
Comment 21 Marek Grummich 2002-07-22 08:59:54 UTC
Target milestone was changed from '3.4' to TBD.
Comment 22 David Konecny 2003-03-20 13:25:32 UTC
Closing as WONTFIX. The original problem was resolved somehow. The
patch DavidS wrote (and which makes sense to me) has very negative
impact on startup and so I will not commit it. From this point of view
it seems to me that it is not possible (easily without sideeffects) to
finish automount before the module's code is called.

Feel free to reopen (or better file new separate issue) if you
disagree. I think this case should be resolved as part of the IDE
Bootstrap Sequence cleanup. A few things said in this issue are worth
documenting somewhere, eg. what should be expected to work in module
before Module.restore was called, etc.
Comment 23 Marian Mirilovic 2003-07-25 18:39:03 UTC
Without new informations for long time - verifying.