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 194597 - ClosedChannelException from lucene.store.NIOFSDirectory$NIOFSIndexInput.readInternal
Summary: ClosedChannelException from lucene.store.NIOFSDirectory$NIOFSIndexInput.readI...
Status: RESOLVED WORKSFORME
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords: RANDOM
Depends on:
Blocks: 194351
  Show dependency tree
 
Reported: 2011-01-21 18:30 UTC by Tomas Danek
Modified: 2011-12-20 19:02 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 176050


Attachments
stacktrace (2.71 KB, text/plain)
2011-01-21 18:30 UTC, Tomas Danek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Danek 2011-01-21 18:30:08 UTC
Build: NetBeans IDE Dev (Build 110119-6fd80576f2f1)
VM: Java HotSpot(TM) 64-Bit Server VM, 17.1-b03-307, Java(TM) SE Runtime Environment, 1.6.0_22-b04-307-10M3261
OS: Mac OS X

User Comments:
musilt2: reindexed local repo in wanted to browse node structure




Stacktrace: 
java.nio.channels.ClosedChannelException
   at sun.nio.ch.FileChannelImpl.ensureOpen(FileChannelImpl.java:88)
   at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:613)
   at org.apache.lucene.store.NIOFSDirectory$NIOFSIndexInput.readInternal(NIOFSDirectory.java:168)
   at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:160)
   at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
   at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:79)
Comment 1 Tomas Danek 2011-01-21 18:30:12 UTC
Created attachment 105252 [details]
stacktrace
Comment 2 Jesse Glick 2011-01-22 00:05:19 UTC
Not clear there is anything to be done about it; I am presuming it is unreproducible. Might or might not be solved by a Lucene upgrade.
Comment 3 Tomas Danek 2011-01-24 07:47:52 UTC
In fact, this one comes from  preintegration testing of new version of lucerne and mvn indexer. Tomas Z. was interested to take a look at this stracktrace. 
Anyway RANDOM kw is correct.
Comment 4 Tomas Zezula 2011-01-24 18:47:24 UTC
Does not seem to be Lucene 3.x specific. The Directory implementations are "same" in 2.9 and 3.0.
Maybe related to Thread.interrupt() Doesn't maven do it? If so, index should use SimpleFSDirectory as described (by red color) in Javadoc here: http://lucene.apache.org/java/3_0_3/api/core/org/apache/lucene/store/NIOFSDirectory.html

The SimpleFSDirectory is slower if multiple threads are querying the same index, but this is not the case of NB.
Comment 5 Jesse Glick 2011-01-24 19:27:32 UTC
(In reply to comment #4)
> Maybe related to Thread.interrupt() Doesn't maven do it?

I don't think so, but not sure.

> index should use SimpleFSDirectory

OK - do you want to make the change, or assign to me?
Comment 6 Tomas Zezula 2011-01-24 19:31:16 UTC
I can do it.
But I would first try to reproduce it with Tomas Musil.
Comment 7 Tomas Danek 2011-01-27 10:40:00 UTC
I was not able to reproduce in #20100127 even after a lot of attempts:(
(In reply to comment #6)
> I can do it.
> But I would first try to reproduce it with Tomas Musil.
Comment 8 Jesse Glick 2011-01-27 13:17:39 UTC
OK. Probably random and unusual. The Maven indexer should probably react to IOException's like this more gracefully, perhaps by discarding the potentially corrupt index and starting over.
Comment 9 Jesse Glick 2011-12-20 19:02:16 UTC
Only one report, probably not worth investigating.