[jira] Updated: (LUCENE-1566) Large Lucene index can hit false OOM due to Sun JRE issue

2009-07-16 Thread Michael McCandless (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael McCandless updated LUCENE-1566:
---

Attachment: LUCENE-1566.patch

OK I reworked the patch some, tweaking javadocs, changes, etc., and
simplifying the loops that read the bytes inside NIOFSDir &
SimpleFSDir.  I think it's ready to commit.  Simon can you take a
look?  Thanks.


> Large Lucene index can hit false OOM due to Sun JRE issue
> -
>
> Key: LUCENE-1566
> URL: https://issues.apache.org/jira/browse/LUCENE-1566
> Project: Lucene - Java
>  Issue Type: Bug
>  Components: Index
>Affects Versions: 2.4.1
>Reporter: Michael McCandless
>Assignee: Simon Willnauer
>Priority: Minor
> Fix For: 2.9
>
> Attachments: LUCENE-1566.patch, LUCENE-1566.patch, LUCENE-1566.patch, 
> LUCENE_1566_IndexInput.patch, LUCENE_1566_IndexInput_Changes.patch, 
> LUCENE_1566_IndexInput_Changes.patch
>
>
> This is not a Lucene issue, but I want to open this so future google
> diggers can more easily find it.
> There's this nasty bug in Sun's JRE:
>   http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6478546
> The gist seems to be, if you try to read a large (eg 200 MB) number of
> bytes during a single RandomAccessFile.read call, you can incorrectly
> hit OOM.  Lucene does this, with norms, since we read in one byte per
> doc per field with norms, as a contiguous array of length maxDoc().
> The workaround was a custom patch to do large file reads as several
> smaller reads.
> Background here:
>   http://www.nabble.com/problems-with-large-Lucene-index-td22347854.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Updated: (LUCENE-1566) Large Lucene index can hit false OOM due to Sun JRE issue

2009-07-16 Thread Simon Willnauer (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon Willnauer updated LUCENE-1566:


Attachment: LUCENE_1566_IndexInput_Changes.patch

added missing SimpleFSDirectory.

> Large Lucene index can hit false OOM due to Sun JRE issue
> -
>
> Key: LUCENE-1566
> URL: https://issues.apache.org/jira/browse/LUCENE-1566
> Project: Lucene - Java
>  Issue Type: Bug
>  Components: Index
>Affects Versions: 2.4.1
>Reporter: Michael McCandless
>Assignee: Simon Willnauer
>Priority: Minor
> Fix For: 2.9
>
> Attachments: LUCENE-1566.patch, LUCENE-1566.patch, 
> LUCENE_1566_IndexInput.patch, LUCENE_1566_IndexInput_Changes.patch, 
> LUCENE_1566_IndexInput_Changes.patch
>
>
> This is not a Lucene issue, but I want to open this so future google
> diggers can more easily find it.
> There's this nasty bug in Sun's JRE:
>   http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6478546
> The gist seems to be, if you try to read a large (eg 200 MB) number of
> bytes during a single RandomAccessFile.read call, you can incorrectly
> hit OOM.  Lucene does this, with norms, since we read in one byte per
> doc per field with norms, as a contiguous array of length maxDoc().
> The workaround was a custom patch to do large file reads as several
> smaller reads.
> Background here:
>   http://www.nabble.com/problems-with-large-Lucene-index-td22347854.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Updated: (LUCENE-1566) Large Lucene index can hit false OOM due to Sun JRE issue

2009-07-16 Thread Simon Willnauer (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon Willnauer updated LUCENE-1566:


Attachment: LUCENE_1566_IndexInput_Changes.patch

* Set chunkSize to Integer.MAX_VALUE on 64 Bit JVM
* Removed 64bit JVM condition as chunkSize is set to maximum in 64bit case
* Added CHANGES.TXT to patch

@Mike: once you commit this change I will close this issue.

Simon

> Large Lucene index can hit false OOM due to Sun JRE issue
> -
>
> Key: LUCENE-1566
> URL: https://issues.apache.org/jira/browse/LUCENE-1566
> Project: Lucene - Java
>  Issue Type: Bug
>  Components: Index
>Affects Versions: 2.4.1
>Reporter: Michael McCandless
>Assignee: Simon Willnauer
>Priority: Minor
> Fix For: 2.9
>
> Attachments: LUCENE-1566.patch, LUCENE-1566.patch, 
> LUCENE_1566_IndexInput.patch, LUCENE_1566_IndexInput_Changes.patch
>
>
> This is not a Lucene issue, but I want to open this so future google
> diggers can more easily find it.
> There's this nasty bug in Sun's JRE:
>   http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6478546
> The gist seems to be, if you try to read a large (eg 200 MB) number of
> bytes during a single RandomAccessFile.read call, you can incorrectly
> hit OOM.  Lucene does this, with norms, since we read in one byte per
> doc per field with norms, as a contiguous array of length maxDoc().
> The workaround was a custom patch to do large file reads as several
> smaller reads.
> Background here:
>   http://www.nabble.com/problems-with-large-Lucene-index-td22347854.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Updated: (LUCENE-1566) Large Lucene index can hit false OOM due to Sun JRE issue

2009-07-15 Thread Simon Willnauer (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon Willnauer updated LUCENE-1566:


Attachment: LUCENE_1566_IndexInput.patch

@Mike: Thanks for your comments.
I did run my testcase to reproduce the OOM with some other directory 
implementation (SimpleFSDirectory and NIOFSDirectory) and both of them suffer 
from the JVM bug. My testcase is the following.
1. Start JVM with -Xmx2500M (32bit) either 1.5 / 1.6 -- I hit the error with 
all of my VMs
2. index  25000 simple documents and optimize the index once the last 
document is added.
3. open IndexReader with either a SimpleFSDirectory or NIOFSDirectory
4. Catch the error :)

I added a workaround to FSDirectory / NIOFSDirectory / SimpleFSDirectory as 
well as a testcase to test the added code for correctness. The included 
testcase will not trigger the JVM bug as I need such a specific setup to 
trigger it.

Any comments welcome.
simon




> Large Lucene index can hit false OOM due to Sun JRE issue
> -
>
> Key: LUCENE-1566
> URL: https://issues.apache.org/jira/browse/LUCENE-1566
> Project: Lucene - Java
>  Issue Type: Bug
>  Components: Index
>Affects Versions: 2.4.1
>Reporter: Michael McCandless
>Assignee: Simon Willnauer
>Priority: Minor
> Fix For: 2.9
>
> Attachments: LUCENE-1566.patch, LUCENE-1566.patch, 
> LUCENE_1566_IndexInput.patch
>
>
> This is not a Lucene issue, but I want to open this so future google
> diggers can more easily find it.
> There's this nasty bug in Sun's JRE:
>   http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6478546
> The gist seems to be, if you try to read a large (eg 200 MB) number of
> bytes during a single RandomAccessFile.read call, you can incorrectly
> hit OOM.  Lucene does this, with norms, since we read in one byte per
> doc per field with norms, as a contiguous array of length maxDoc().
> The workaround was a custom patch to do large file reads as several
> smaller reads.
> Background here:
>   http://www.nabble.com/problems-with-large-Lucene-index-td22347854.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Updated: (LUCENE-1566) Large Lucene index can hit false OOM due to Sun JRE issue

2009-07-06 Thread Michael McCandless (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael McCandless updated LUCENE-1566:
---

Fix Version/s: 2.9

> Large Lucene index can hit false OOM due to Sun JRE issue
> -
>
> Key: LUCENE-1566
> URL: https://issues.apache.org/jira/browse/LUCENE-1566
> Project: Lucene - Java
>  Issue Type: Bug
>  Components: Index
>Affects Versions: 2.4.1
>Reporter: Michael McCandless
>Assignee: Michael McCandless
>Priority: Minor
> Fix For: 2.9
>
> Attachments: LUCENE-1566.patch, LUCENE-1566.patch
>
>
> This is not a Lucene issue, but I want to open this so future google
> diggers can more easily find it.
> There's this nasty bug in Sun's JRE:
>   http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6478546
> The gist seems to be, if you try to read a large (eg 200 MB) number of
> bytes during a single RandomAccessFile.read call, you can incorrectly
> hit OOM.  Lucene does this, with norms, since we read in one byte per
> doc per field with norms, as a contiguous array of length maxDoc().
> The workaround was a custom patch to do large file reads as several
> smaller reads.
> Background here:
>   http://www.nabble.com/problems-with-large-Lucene-index-td22347854.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Updated: (LUCENE-1566) Large Lucene index can hit false OOM due to Sun JRE issue

2009-07-01 Thread Simon Willnauer (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon Willnauer updated LUCENE-1566:


Attachment: LUCENE-1566.patch

missed to enable asserts in testcase - updated patch to correctly assert offset 
/ length 

> Large Lucene index can hit false OOM due to Sun JRE issue
> -
>
> Key: LUCENE-1566
> URL: https://issues.apache.org/jira/browse/LUCENE-1566
> Project: Lucene - Java
>  Issue Type: Bug
>  Components: Index
>Affects Versions: 2.4.1
>Reporter: Michael McCandless
>Assignee: Simon Willnauer
>Priority: Minor
> Attachments: LUCENE-1566.patch, LUCENE-1566.patch
>
>
> This is not a Lucene issue, but I want to open this so future google
> diggers can more easily find it.
> There's this nasty bug in Sun's JRE:
>   http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6478546
> The gist seems to be, if you try to read a large (eg 200 MB) number of
> bytes during a single RandomAccessFile.read call, you can incorrectly
> hit OOM.  Lucene does this, with norms, since we read in one byte per
> doc per field with norms, as a contiguous array of length maxDoc().
> The workaround was a custom patch to do large file reads as several
> smaller reads.
> Background here:
>   http://www.nabble.com/problems-with-large-Lucene-index-td22347854.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Updated: (LUCENE-1566) Large Lucene index can hit false OOM due to Sun JRE issue

2009-06-29 Thread Simon Willnauer (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon Willnauer updated LUCENE-1566:


Attachment: LUCENE-1566.patch

I was able to reproduce the bug on my machine using several JVMs. The attached 
patch is what I got ready by now - I though I get it out there as soon as 
possible for discussion.
Test pass on my side!

> Large Lucene index can hit false OOM due to Sun JRE issue
> -
>
> Key: LUCENE-1566
> URL: https://issues.apache.org/jira/browse/LUCENE-1566
> Project: Lucene - Java
>  Issue Type: Bug
>  Components: Index
>Affects Versions: 2.4.1
>Reporter: Michael McCandless
>Assignee: Simon Willnauer
>Priority: Minor
> Attachments: LUCENE-1566.patch
>
>
> This is not a Lucene issue, but I want to open this so future google
> diggers can more easily find it.
> There's this nasty bug in Sun's JRE:
>   http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6478546
> The gist seems to be, if you try to read a large (eg 200 MB) number of
> bytes during a single RandomAccessFile.read call, you can incorrectly
> hit OOM.  Lucene does this, with norms, since we read in one byte per
> doc per field with norms, as a contiguous array of length maxDoc().
> The workaround was a custom patch to do large file reads as several
> smaller reads.
> Background here:
>   http://www.nabble.com/problems-with-large-Lucene-index-td22347854.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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