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 259027 - Huge amount of Exceptions "Unexpected file object in cache" in unit test
Summary: Huge amount of Exceptions "Unexpected file object in cache" in unit test
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Remote (show other bugs)
Version: 8.2
Hardware: PC Solaris
: P2 normal (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-27 08:02 UTC by Alexander Simon
Modified: 2016-06-30 01:52 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2016-04-27 08:02:33 UTC
Please fix exception. It increases log in 10 times.
For example see tests result "cnd-test-solaris.sparc/13259/consoleFull".

    [junit] INFO: Exception occurred:
    [junit] java.lang.Exception: Unexpected file object in cache, found RemotePlainFile, expected link: r_tester@spb-avtovo.ru.oracle.com:/tmp/tmp.jrJLNms769/dir_or_link/file [valid]
    [junit] 	at org.netbeans.modules.remote.impl.fs.RemoteFileObjectFactory.reportUnexpectedPrevFileObject(RemoteFileObjectFactory.java:314)
    [junit] 	at org.netbeans.modules.remote.impl.fs.RemoteFileObjectFactory.createRemoteLinkChild(RemoteFileObjectFactory.java:307)
    [junit] 	at org.netbeans.modules.remote.impl.fs.RemoteLinkBase.transform(RemoteLinkBase.java:403)
    [junit] 	at org.netbeans.modules.remote.impl.fs.RemoteLinkBase.transform(RemoteLinkBase.java:378)
    [junit] 	at org.netbeans.modules.remote.impl.fs.RemoteLinkBase.fileChanged(RemoteLinkBase.java:330)
    [junit] 	at org.openide.filesystems.FCLSupport$DispatchEventWrapper.dispatchEventImpl(FCLSupport.java:178)
    [junit] 	at org.openide.filesystems.FCLSupport$DispatchEventWrapperSingle.dispatchAllEventsSync(FCLSupport.java:224)
    [junit] 	at org.openide.filesystems.FCLSupport$DispatchEventWrapper.dispatchEvent(FCLSupport.java:137)
    [junit] 	at org.openide.filesystems.FCLSupport.dispatchEvent(FCLSupport.java:105)
    [junit] 	at org.openide.filesystems.FileObject$ED.dispatch(FileObject.java:1398)
    [junit] 	at org.openide.filesystems.FileSystem$EventDispatcher.run(FileSystem.java:795)
    [junit] 	at org.openide.filesystems.EventControl.dispatchEvent(EventControl.java:84)
    [junit] 	at org.openide.filesystems.FileSystem.dispatchEvent(FileSystem.java:554)
    [junit] 	at org.openide.filesystems.FileObject.dispatchEvent(FileObject.java:644)
    [junit] 	at org.openide.filesystems.FileObject.fireFileChangedEvent(FileObject.java:612)
    [junit] 	at org.netbeans.modules.remote.impl.fs.RemoteFileObject.fireFileChangedEvent(RemoteFileObject.java:173)
    [junit] 	at org.netbeans.modules.remote.impl.fs.RemoteFileObjectBase.fireFileChangedEvent(RemoteFileObjectBase.java:134)
    [junit] 	at org.netbeans.modules.remote.impl.fs.RemoteDirectory.updateChildren(RemoteDirectory.java:1338)
    [junit] 	at org.netbeans.modules.remote.impl.fs.RemoteDirectory.getDirectoryStorageImpl(RemoteDirectory.java:1164)
    [junit] 	at org.netbeans.modules.remote.impl.fs.RemoteDirectory.refreshDirectoryStorage(RemoteDirectory.java:545)
    [junit] 	at org.netbeans.modules.remote.impl.fs.RemoteDirectory.refreshImpl(RemoteDirectory.java:1696)
    [junit] 	at org.netbeans.modules.remote.impl.fs.RemoteFileObjectBase.refreshImpl(RemoteFileObjectBase.java:556)
    [junit] 	at org.netbeans.modules.remote.impl.fs.RemoteDirectory.refreshImpl(RemoteDirectory.java:1699)
    [junit] 	at org.netbeans.modules.remote.impl.fs.RemoteFileObjectBase.refreshImpl(RemoteFileObjectBase.java:556)
    [junit] 	at org.netbeans.modules.remote.impl.fs.RemoteFileObjectBase.refresh(RemoteFileObjectBase.java:581)
    [junit] 	at org.netbeans.modules.remote.impl.fs.RemoteFileObjectBase.refresh(RemoteFileObjectBase.java:592)
    [junit] 	at org.netbeans.modules.remote.impl.fs.RemoteFileObject.refresh(RemoteFileObject.java:253)
    [junit] 	at org.netbeans.modules.remote.impl.fs.RemoteLinksChangeLinkTestCase2$1.run(RemoteLinksChangeLinkTestCase2.java:134)
    [junit] 	at java.lang.Thread.run(Thread.java:745)
    [junit]
Comment 1 Alexander Simon 2016-04-27 08:06:02 UTC
Example of test:
org.netbeans.modules.remote.impl.fs.RemoteLinksChangeLinkTestCase2
Comment 2 Alexander Simon 2016-06-23 07:08:58 UTC
Vladimir, please fix it ASAP. Our build server cannot manage huge build logs for long time.
Comment 3 Alexander Simon 2016-06-23 07:12:18 UTC
work around:
https://hg.netbeans.org/cnd-main/rev/1ee0b8102aef
- temporary disable log.
Comment 4 Vladimir Kvashin 2016-06-23 13:39:02 UTC
I'm not sure that the problem is just in the logger. And that's why I haven't fixed it before. I need some time to investigate. I'll do this today.
Comment 6 Quality Engineering 2016-06-24 01:46:42 UTC
Integrated into 'main-silver', will be available in build *201606240002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/1ee0b8102aef
User: Alexander Simon <alexvsimon@netbeans.org>
Log: wirk around Bug #259027 Huge amount of Exceptions "Unexpected file object in cache" in unit test
- temporary disable log.
Comment 7 Alexander Simon 2016-06-27 07:26:25 UTC
See the same in the log:
http://enum.ru.oracle.com:8080/hudson/job/cnd-test-solaris10.x86/12690/consoleFull
Comment 8 Vladimir Kvashin 2016-06-27 12:28:12 UTC
It seems I fixed only 2/3 stacks that led to the problem. I'll fix other 1/3 shortly.
Comment 9 Vladimir Kvashin 2016-06-27 15:03:49 UTC
Should be fixed in 
http://hg.netbeans.org/cnd-main/rev/59b5c17eec24
Comment 10 Quality Engineering 2016-06-28 02:26:47 UTC
Integrated into 'main-silver', will be available in build *201606280002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/59b5c17eec24
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: Suppress "Unexpected file object in cache" message for certain tests (Fixing #259027 - Huge amount of Exceptions "Unexpected file object in cache" in unit test)
Comment 11 Alexander Simon 2016-06-28 06:54:25 UTC
See the same in the log:
http://enum.ru.oracle.com:8080/hudson/job/cnd-test-solaris10.x86/12698/consoleFull
Comment 12 Vladimir Kvashin 2016-06-29 16:07:56 UTC
I just forgot about one more test case that does a lot of perversive changes in file system and this needs this warning to be switched off.

Fixed
http://hg.netbeans.org/cnd-main/rev/6bfee1f8f2f1

I checked, raw console log of build #12704 does not contain "Unexpected file object in cache" string.
Comment 13 Quality Engineering 2016-06-30 01:52:13 UTC
Integrated into 'main-silver', will be available in build *201606300002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/6bfee1f8f2f1
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: Suppress "Unexpected file object in cache" message for more tests (Fixing #259027 - Huge amount of Exceptions "Unexpected file object in cache" in unit test)