Derby
  1. Derby
  2. DERBY-2734

LOB finalizers may close the underlying container while there are open streams

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.3.1.4
    • Fix Version/s: 10.3.2.1
    • Component/s: JDBC, Store
    • Labels:
      None
    • Bug behavior facts:
      Regression Test Failure

      Description

      Seen in the Tinderbox: http://dbtg.thresher.com/derby/test/tinderbox_trunk16/jvm1.6/testing/testlog/SunOS-5.10_i86pc-i386/542818-org.apache.derbyTesting.functionTests.suites.All_diff.txt

      The code in LobStreamsTest that failed, looks like this:

      InputStream lStream = rs3.getClob(1).getAsciiStream();
      assertTrue("FAIL - Clob and file contents do not match",
      compareLob2File(fStream, lStream));

      I think the problem is that the Clob object is garbage collected before the stream has been exhausted, and EmbedClob.finalize() closes the container. I think this affects earlier releases as well, but I'm only marking it as a 10.3 issue for now since I haven't verified it.

        Activity

        Knut Anders Hatlen created issue -
        Dag H. Wanvik made changes -
        Field Original Value New Value
        Derby Categories [Regression Test Failure]
        Dag H. Wanvik made changes -
        Component/s Regression Test Failure [ 12310664 ]
        Kristian Waagan made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 10.3.2.1 [ 12312876 ]
        Resolution Fixed [ 1 ]
        Knut Anders Hatlen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Gavin made changes -
        Workflow jira [ 12405213 ] Default workflow, editable Closed status [ 12801547 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Knut Anders Hatlen
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development