[jira] [Commented] (LUCENE-7527) Facing unsafe memory access operation error while calling searcherManager.maybeReopen()

2016-11-04 Thread Michael McCandless (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-7527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15636375#comment-15636375
 ] 

Michael McCandless commented on LUCENE-7527:


Please, triple check absolutely all places that close or release a searcher 
back to {{SearcherManager}} in your application.  If any of those mess up, e.g. 
releasing twice, that explains this crash.

Yes, NIOFS will be worse performance than MMapDirectory, but if you temporarily 
switch to it, then you should see {{AlreadyClosedException}} instead of JVM 
crashes, making it easier to debug where the extra releases are happening.  
Once you debug that then you can switch back to MMapDirectory.


> Facing unsafe memory access operation error while calling 
> searcherManager.maybeReopen()
> ---
>
> Key: LUCENE-7527
> URL: https://issues.apache.org/jira/browse/LUCENE-7527
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: core/search
>Affects Versions: 3.5
>Reporter: Jagmohan Singh
>
> We are getting below error while calling searcherManager.maybeReopen() 
> method. We are using MMAP implementation to read NFS index directory mounted 
> against 3 servers. We have a different process to update the indices and 3 
> other processes to read from the same index. What we believe is that this 
> issue occurs when we call maybeReopen() method during heavy writes to the 
> indices and MMap implementation is not able to coop with it..
> Caused by: java.lang.InternalError: a fault occurred in a recent unsafe 
> memory access operation in compiled Java code
> at java.security.AccessController.doPrivileged(Native Method)
> at 
> org.apache.lucene.store.MMapDirectory.cleanMapping(MMapDirectory.java:158)
> at 
> org.apache.lucene.store.MMapDirectory$MMapIndexInput.close(MMapDirectory.java:389)
> at 
> org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:690)
> at 
> org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:593)
> at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:359)
> at 
> org.apache.lucene.index.SegmentInfos.readCurrentVersion(SegmentInfos.java:480)
> at 
> org.apache.lucene.index.DirectoryReader.isCurrent(DirectoryReader.java:901)
> at 
> org.apache.lucene.index.DirectoryReader.doOpenNoWriter(DirectoryReader.java:471)
> at 
> org.apache.lucene.index.DirectoryReader.doOpenIfChanged(DirectoryReader.java:450)
> at 
> org.apache.lucene.index.DirectoryReader.doOpenIfChanged(DirectoryReader.java:391)
> at 
> org.apache.lucene.index.IndexReader.openIfChanged(IndexReader.java:497)
> at 
> org.apache.lucene.search.SearcherManager.maybeReopen(SearcherManager.java:162)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-7527) Facing unsafe memory access operation error while calling searcherManager.maybeReopen()

2016-11-02 Thread Jagmohan Singh (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-7527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15630268#comment-15630268
 ] 

Jagmohan Singh commented on LUCENE-7527:


Michael thanks for replying. We have mounts in different location and NIOFS 
will surely degrade more. The exception is coming while i am trying to call 
maybeReopen() method explicitly under SearcherManager as i want to get the 
latest data before i could do any search. After calling  maybeReopen() we do 
call acquire() and then search and then release at the end of search call.

> Facing unsafe memory access operation error while calling 
> searcherManager.maybeReopen()
> ---
>
> Key: LUCENE-7527
> URL: https://issues.apache.org/jira/browse/LUCENE-7527
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: core/search
>Affects Versions: 3.5
>Reporter: Jagmohan Singh
>
> We are getting below error while calling searcherManager.maybeReopen() 
> method. We are using MMAP implementation to read NFS index directory mounted 
> against 3 servers. We have a different process to update the indices and 3 
> other processes to read from the same index. What we believe is that this 
> issue occurs when we call maybeReopen() method during heavy writes to the 
> indices and MMap implementation is not able to coop with it..
> Caused by: java.lang.InternalError: a fault occurred in a recent unsafe 
> memory access operation in compiled Java code
> at java.security.AccessController.doPrivileged(Native Method)
> at 
> org.apache.lucene.store.MMapDirectory.cleanMapping(MMapDirectory.java:158)
> at 
> org.apache.lucene.store.MMapDirectory$MMapIndexInput.close(MMapDirectory.java:389)
> at 
> org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:690)
> at 
> org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:593)
> at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:359)
> at 
> org.apache.lucene.index.SegmentInfos.readCurrentVersion(SegmentInfos.java:480)
> at 
> org.apache.lucene.index.DirectoryReader.isCurrent(DirectoryReader.java:901)
> at 
> org.apache.lucene.index.DirectoryReader.doOpenNoWriter(DirectoryReader.java:471)
> at 
> org.apache.lucene.index.DirectoryReader.doOpenIfChanged(DirectoryReader.java:450)
> at 
> org.apache.lucene.index.DirectoryReader.doOpenIfChanged(DirectoryReader.java:391)
> at 
> org.apache.lucene.index.IndexReader.openIfChanged(IndexReader.java:497)
> at 
> org.apache.lucene.search.SearcherManager.maybeReopen(SearcherManager.java:162)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-7527) Facing unsafe memory access operation error while calling searcherManager.maybeReopen()

2016-10-29 Thread Michael McCandless (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-7527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15617848#comment-15617848
 ] 

Michael McCandless commented on LUCENE-7527:


This can happen if your application mis-uses the {{IndexReader}} lifecycle by 
closing an {{IndexReader}} while searches are still running.

Triple check all your code to make sure you always {{acquire}} a searcher from 
{{SearcherManager}} and then always release it, only once, via {{release}}, and 
that you never directly close a searcher (just the {{SearcherManager}} once all 
searching is finished).

Though it is odd you hit it inside {{cleanMapping}}.

You could also try switching to {{NIOFSDirectory}} ... performance may be worse 
in some cases, but maybe it'll throw {{AlreadyClosedException}} instead of 
crashing your JVM.

Also, 3.5 is really ancient at this point.  It could be you are hitting an 
already fixed bug.

> Facing unsafe memory access operation error while calling 
> searcherManager.maybeReopen()
> ---
>
> Key: LUCENE-7527
> URL: https://issues.apache.org/jira/browse/LUCENE-7527
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: core/search
>Affects Versions: 3.5
>Reporter: Jagmohan Singh
>
> We are getting below error while calling searcherManager.maybeReopen() 
> method. We are using MMAP implementation to read NFS index directory mounted 
> against 3 servers. We have a different process to update the indices and 3 
> other processes to read from the same index. What we believe is that this 
> issue occurs when we call maybeReopen() method during heavy writes to the 
> indices and MMap implementation is not able to coop with it..
> Caused by: java.lang.InternalError: a fault occurred in a recent unsafe 
> memory access operation in compiled Java code
> at java.security.AccessController.doPrivileged(Native Method)
> at 
> org.apache.lucene.store.MMapDirectory.cleanMapping(MMapDirectory.java:158)
> at 
> org.apache.lucene.store.MMapDirectory$MMapIndexInput.close(MMapDirectory.java:389)
> at 
> org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:690)
> at 
> org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:593)
> at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:359)
> at 
> org.apache.lucene.index.SegmentInfos.readCurrentVersion(SegmentInfos.java:480)
> at 
> org.apache.lucene.index.DirectoryReader.isCurrent(DirectoryReader.java:901)
> at 
> org.apache.lucene.index.DirectoryReader.doOpenNoWriter(DirectoryReader.java:471)
> at 
> org.apache.lucene.index.DirectoryReader.doOpenIfChanged(DirectoryReader.java:450)
> at 
> org.apache.lucene.index.DirectoryReader.doOpenIfChanged(DirectoryReader.java:391)
> at 
> org.apache.lucene.index.IndexReader.openIfChanged(IndexReader.java:497)
> at 
> org.apache.lucene.search.SearcherManager.maybeReopen(SearcherManager.java:162)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org