You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Dipali Sunkersett (JIRA)" <de...@db.apache.org> on 2006/08/09 09:54:13 UTC

[jira] Created: (DERBY-1653) Database gets corrupt after throwing NPE while reading Binary Stream data, in chunks

Database gets corrupt after throwing NPE while reading Binary Stream data, in chunks
------------------------------------------------------------------------------------

                 Key: DERBY-1653
                 URL: http://issues.apache.org/jira/browse/DERBY-1653
             Project: Derby
          Issue Type: Bug
    Affects Versions: 10.1.3.1
         Environment: Linux (Debian) Kernel 2.6.16
            Reporter: Dipali Sunkersett
            Priority: Critical


One of the component of our project pushes large text (as a binary stream) into Derby DB. The other component retrieves these texts in chunks and process one text at a time to perform some manipulation. After fetching and processing roughly 30K texts, we get an NPE and the whole DB gets corrupt after that. We can not connect to that DB again. We use the "org.apache.derby.jdbc.EmbeddedDriver" for connecton. The stack trace is as below:

java.lang.NullPointerException

        at org.apache.derby.impl.store.raw.data.BasePage.releaseExclusive(Unknown Source)

        at org.apache.derby.impl.store.raw.data.CachedPage.releaseExclusive(Unknown Source)

        at org.apache.derby.impl.store.raw.data.StoredPage.releaseExclusive(Unknown Source)

        at org.apache.derby.impl.store.raw.data.BasePage.unlatch(Unknown Source)

        at org.apache.derby.impl.store.raw.data.OverflowInputStream.fillByteHolder(Unknown Source)

        at org.apache.derby.impl.store.raw.data.BufferedByteHolderInputStream.available(Unknown Source)

        at java.io.FilterInputStream.available(FilterInputStream.java:146)

        at java.io.FilterInputStream.available(FilterInputStream.java:146)

        at sun.nio.cs.StreamDecoder$CharsetSD.inReady(StreamDecoder.java:490)

        at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:451)

        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)

        at java.io.InputStreamReader.read(InputStreamReader.java:167)

        at java.io.BufferedReader.fill(BufferedReader.java:136)

        at java.io.BufferedReader.readLine(BufferedReader.java:299)

        at java.io.BufferedReader.readLine(BufferedReader.java:362)

        at com.irm.dag.occcalc.command.CorpusWordPhraseOccCalc.calculateOccurrences(CorpusWordPhraseOccCalc.java:128)

        at com.irm.dag.occcalc.command.CorpusOccCalc.calculate(CorpusOccCalc.java:44)

        at com.irm.dag.occcalc.test.WrapperForOccurrenceCalculator.main(WrapperForOccurrenceCalculator.java:56)




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1653) Database gets corrupt after throwing NPE while reading Binary Stream data, in chunks

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-1653:
--------------------------------------

    Priority: Major  (was: Critical)

Lowering priority because of lack of respond...

> Database gets corrupt after throwing NPE while reading Binary Stream data, in chunks
> ------------------------------------------------------------------------------------
>
>                 Key: DERBY-1653
>                 URL: https://issues.apache.org/jira/browse/DERBY-1653
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.1.3.1
>         Environment: Linux (Debian) Kernel 2.6.16
>            Reporter: Dipali Sunkersett
>
> One of the component of our project pushes large text (as a binary stream) into Derby DB. The other component retrieves these texts in chunks and process one text at a time to perform some manipulation. After fetching and processing roughly 30K texts, we get an NPE and the whole DB gets corrupt after that. We can not connect to that DB again. We use the "org.apache.derby.jdbc.EmbeddedDriver" for connecton. The stack trace is as below:
> java.lang.NullPointerException
>         at org.apache.derby.impl.store.raw.data.BasePage.releaseExclusive(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.CachedPage.releaseExclusive(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.StoredPage.releaseExclusive(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.BasePage.unlatch(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.OverflowInputStream.fillByteHolder(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.BufferedByteHolderInputStream.available(Unknown Source)
>         at java.io.FilterInputStream.available(FilterInputStream.java:146)
>         at java.io.FilterInputStream.available(FilterInputStream.java:146)
>         at sun.nio.cs.StreamDecoder$CharsetSD.inReady(StreamDecoder.java:490)
>         at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:451)
>         at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
>         at java.io.InputStreamReader.read(InputStreamReader.java:167)
>         at java.io.BufferedReader.fill(BufferedReader.java:136)
>         at java.io.BufferedReader.readLine(BufferedReader.java:299)
>         at java.io.BufferedReader.readLine(BufferedReader.java:362)
>         at com.irm.dag.occcalc.command.CorpusWordPhraseOccCalc.calculateOccurrences(CorpusWordPhraseOccCalc.java:128)
>         at com.irm.dag.occcalc.command.CorpusOccCalc.calculate(CorpusOccCalc.java:44)
>         at com.irm.dag.occcalc.test.WrapperForOccurrenceCalculator.main(WrapperForOccurrenceCalculator.java:56)

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


[jira] Updated: (DERBY-1653) Database gets corrupt after throwing NPE while reading Binary Stream data, in chunks

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1653?page=all ]

Andrew McIntyre updated DERBY-1653:
-----------------------------------

    Component/s: Store

> Database gets corrupt after throwing NPE while reading Binary Stream data, in chunks
> ------------------------------------------------------------------------------------
>
>                 Key: DERBY-1653
>                 URL: http://issues.apache.org/jira/browse/DERBY-1653
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.1.3.1
>         Environment: Linux (Debian) Kernel 2.6.16
>            Reporter: Dipali Sunkersett
>            Priority: Critical
>
> One of the component of our project pushes large text (as a binary stream) into Derby DB. The other component retrieves these texts in chunks and process one text at a time to perform some manipulation. After fetching and processing roughly 30K texts, we get an NPE and the whole DB gets corrupt after that. We can not connect to that DB again. We use the "org.apache.derby.jdbc.EmbeddedDriver" for connecton. The stack trace is as below:
> java.lang.NullPointerException
>         at org.apache.derby.impl.store.raw.data.BasePage.releaseExclusive(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.CachedPage.releaseExclusive(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.StoredPage.releaseExclusive(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.BasePage.unlatch(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.OverflowInputStream.fillByteHolder(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.BufferedByteHolderInputStream.available(Unknown Source)
>         at java.io.FilterInputStream.available(FilterInputStream.java:146)
>         at java.io.FilterInputStream.available(FilterInputStream.java:146)
>         at sun.nio.cs.StreamDecoder$CharsetSD.inReady(StreamDecoder.java:490)
>         at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:451)
>         at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
>         at java.io.InputStreamReader.read(InputStreamReader.java:167)
>         at java.io.BufferedReader.fill(BufferedReader.java:136)
>         at java.io.BufferedReader.readLine(BufferedReader.java:299)
>         at java.io.BufferedReader.readLine(BufferedReader.java:362)
>         at com.irm.dag.occcalc.command.CorpusWordPhraseOccCalc.calculateOccurrences(CorpusWordPhraseOccCalc.java:128)
>         at com.irm.dag.occcalc.command.CorpusOccCalc.calculate(CorpusOccCalc.java:44)
>         at com.irm.dag.occcalc.test.WrapperForOccurrenceCalculator.main(WrapperForOccurrenceCalculator.java:56)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (DERBY-1653) Database gets corrupt after throwing NPE while reading Binary Stream data, in chunks

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden resolved DERBY-1653.
-----------------------------------

    Resolution: Cannot Reproduce

Resolving  this issue CNR because we were not able to get more information from the user. It can be reopened if we get more info.


> Database gets corrupt after throwing NPE while reading Binary Stream data, in chunks
> ------------------------------------------------------------------------------------
>
>                 Key: DERBY-1653
>                 URL: https://issues.apache.org/jira/browse/DERBY-1653
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.1.3.1
>         Environment: Linux (Debian) Kernel 2.6.16
>            Reporter: Dipali Sunkersett
>
> One of the component of our project pushes large text (as a binary stream) into Derby DB. The other component retrieves these texts in chunks and process one text at a time to perform some manipulation. After fetching and processing roughly 30K texts, we get an NPE and the whole DB gets corrupt after that. We can not connect to that DB again. We use the "org.apache.derby.jdbc.EmbeddedDriver" for connecton. The stack trace is as below:
> java.lang.NullPointerException
>         at org.apache.derby.impl.store.raw.data.BasePage.releaseExclusive(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.CachedPage.releaseExclusive(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.StoredPage.releaseExclusive(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.BasePage.unlatch(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.OverflowInputStream.fillByteHolder(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.BufferedByteHolderInputStream.available(Unknown Source)
>         at java.io.FilterInputStream.available(FilterInputStream.java:146)
>         at java.io.FilterInputStream.available(FilterInputStream.java:146)
>         at sun.nio.cs.StreamDecoder$CharsetSD.inReady(StreamDecoder.java:490)
>         at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:451)
>         at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
>         at java.io.InputStreamReader.read(InputStreamReader.java:167)
>         at java.io.BufferedReader.fill(BufferedReader.java:136)
>         at java.io.BufferedReader.readLine(BufferedReader.java:299)
>         at java.io.BufferedReader.readLine(BufferedReader.java:362)
>         at com.irm.dag.occcalc.command.CorpusWordPhraseOccCalc.calculateOccurrences(CorpusWordPhraseOccCalc.java:128)
>         at com.irm.dag.occcalc.command.CorpusOccCalc.calculate(CorpusOccCalc.java:44)
>         at com.irm.dag.occcalc.test.WrapperForOccurrenceCalculator.main(WrapperForOccurrenceCalculator.java:56)

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


[jira] Commented: (DERBY-1653) Database gets corrupt after throwing NPE while reading Binary Stream data, in chunks

Posted by "Sunitha Kambhampati (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1653?page=comments#action_12426962 ] 
            
Sunitha Kambhampati commented on DERBY-1653:
--------------------------------------------

It would be helpful if you can provide more information
-- can you attach the derby.log from when the error happened
-- have you tried to stop all processes and then start up again and try to access the database.
-- will it be possible to attach the corrupt database to the JIRA?
-- which jvm are you using. 

Thanks.

> Database gets corrupt after throwing NPE while reading Binary Stream data, in chunks
> ------------------------------------------------------------------------------------
>
>                 Key: DERBY-1653
>                 URL: http://issues.apache.org/jira/browse/DERBY-1653
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.1.3.1
>         Environment: Linux (Debian) Kernel 2.6.16
>            Reporter: Dipali Sunkersett
>            Priority: Critical
>
> One of the component of our project pushes large text (as a binary stream) into Derby DB. The other component retrieves these texts in chunks and process one text at a time to perform some manipulation. After fetching and processing roughly 30K texts, we get an NPE and the whole DB gets corrupt after that. We can not connect to that DB again. We use the "org.apache.derby.jdbc.EmbeddedDriver" for connecton. The stack trace is as below:
> java.lang.NullPointerException
>         at org.apache.derby.impl.store.raw.data.BasePage.releaseExclusive(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.CachedPage.releaseExclusive(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.StoredPage.releaseExclusive(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.BasePage.unlatch(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.OverflowInputStream.fillByteHolder(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.BufferedByteHolderInputStream.available(Unknown Source)
>         at java.io.FilterInputStream.available(FilterInputStream.java:146)
>         at java.io.FilterInputStream.available(FilterInputStream.java:146)
>         at sun.nio.cs.StreamDecoder$CharsetSD.inReady(StreamDecoder.java:490)
>         at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:451)
>         at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
>         at java.io.InputStreamReader.read(InputStreamReader.java:167)
>         at java.io.BufferedReader.fill(BufferedReader.java:136)
>         at java.io.BufferedReader.readLine(BufferedReader.java:299)
>         at java.io.BufferedReader.readLine(BufferedReader.java:362)
>         at com.irm.dag.occcalc.command.CorpusWordPhraseOccCalc.calculateOccurrences(CorpusWordPhraseOccCalc.java:128)
>         at com.irm.dag.occcalc.command.CorpusOccCalc.calculate(CorpusOccCalc.java:44)
>         at com.irm.dag.occcalc.test.WrapperForOccurrenceCalculator.main(WrapperForOccurrenceCalculator.java:56)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1653) Database gets corrupt after throwing NPE while reading Binary Stream data, in chunks

Posted by "Mike Matrigali (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1653?page=all ]

Mike Matrigali updated DERBY-1653:
----------------------------------


We could really use some more information about this report.  Could you define what you mean when you
say the "whole DB gets corrupt"?  Does it mean you can no longer access the db in the current application,,
if so what happens if you shut down, start a new jvm and try to access it.?

This has the feel of a stream getting closed because a non hold cursor and commit by a different statement
affecting the open cursor in a way the application is not expecting.  

Getting a NPE is bad, but it is critical if  this error causes the db to not be able to be rebooted.

> Database gets corrupt after throwing NPE while reading Binary Stream data, in chunks
> ------------------------------------------------------------------------------------
>
>                 Key: DERBY-1653
>                 URL: http://issues.apache.org/jira/browse/DERBY-1653
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.1.3.1
>         Environment: Linux (Debian) Kernel 2.6.16
>            Reporter: Dipali Sunkersett
>            Priority: Critical
>
> One of the component of our project pushes large text (as a binary stream) into Derby DB. The other component retrieves these texts in chunks and process one text at a time to perform some manipulation. After fetching and processing roughly 30K texts, we get an NPE and the whole DB gets corrupt after that. We can not connect to that DB again. We use the "org.apache.derby.jdbc.EmbeddedDriver" for connecton. The stack trace is as below:
> java.lang.NullPointerException
>         at org.apache.derby.impl.store.raw.data.BasePage.releaseExclusive(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.CachedPage.releaseExclusive(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.StoredPage.releaseExclusive(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.BasePage.unlatch(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.OverflowInputStream.fillByteHolder(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.BufferedByteHolderInputStream.available(Unknown Source)
>         at java.io.FilterInputStream.available(FilterInputStream.java:146)
>         at java.io.FilterInputStream.available(FilterInputStream.java:146)
>         at sun.nio.cs.StreamDecoder$CharsetSD.inReady(StreamDecoder.java:490)
>         at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:451)
>         at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
>         at java.io.InputStreamReader.read(InputStreamReader.java:167)
>         at java.io.BufferedReader.fill(BufferedReader.java:136)
>         at java.io.BufferedReader.readLine(BufferedReader.java:299)
>         at java.io.BufferedReader.readLine(BufferedReader.java:362)
>         at com.irm.dag.occcalc.command.CorpusWordPhraseOccCalc.calculateOccurrences(CorpusWordPhraseOccCalc.java:128)
>         at com.irm.dag.occcalc.command.CorpusOccCalc.calculate(CorpusOccCalc.java:44)
>         at com.irm.dag.occcalc.test.WrapperForOccurrenceCalculator.main(WrapperForOccurrenceCalculator.java:56)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira