Derby
  1. Derby
  2. DERBY-5624

System can run out of stack space while processing DropOnCommit requests.

    Details

    • Urgency:
      Urgent
    • Issue & fix info:
      High Value Fix, Patch Available, Repro attached

      Description

      The system currently recursively calls xact.notifyObservers() from DropOnCommit.update(). It does this because in some cases
      new observers can be added while processing the list of notifyObservers and those were being missed before the change, causing
      Assertions in the tests and possibly files not properly dropped on commit.

      Multiple users on the Derby user list have had failures running SYSCS_UTIL.SYSCS_COMPRESS_TABLE(), running out of stack track
      with a heavily recursive stack trace of the form (see more detail from these reports in subsequent comments):
      Caused by: java.lang.StackOverflowError
      at java.lang.ThreadLocal.get(ThreadLocal.java:125)
      at java.lang.StringCoding.deref(StringCoding.java:46)
      at java.lang.StringCoding.encode(StringCoding.java:258)
      at java.lang.String.getBytes(String.java:946)
      at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
      at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228)
      at java.io.File.exists(File.java:733)
      at org.apache.derby.impl.store.raw.data.StreamFileContainer.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.apache.derby.impl.store.raw.data.StreamFileContainer.privExists(Unknown Source)
      at org.apache.derby.impl.store.raw.data.StreamFileContainer.open(Unknown Source)
      at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openStreamContainer(Unknown Source)
      at org.apache.derby.impl.store.raw.xact.Xact.openStreamContainer(Unknown Source)
      at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.dropStreamContainer(Unknown Source)
      at org.apache.derby.impl.store.raw.xact.Xact.dropStreamContainer(Unknown Source)
      at org.apache.derby.impl.store.raw.data.DropOnCommit.update(Unknown Source)
      at java.util.Observable.notifyObservers(Observable.java:142)
      at org.apache.derby.iapi.store.raw.xact.RawTransaction.notifyObservers(Unknown Source)
      at org.apache.derby.impl.store.raw.data.DropOnCommit.update(Unknown Source)
      at java.util.Observable.notifyObservers(Observable.java:142)
      at org.apache.derby.iapi.store.raw.xact.RawTransaction.notifyObservers(Unknown Source)
      at org.apache.derby.impl.store.raw.data.DropOnCommit.update(Unknown Source)
      at java.util.Observable.notifyObservers(Observable.java:142)
      at org.apache.derby.iapi.store.raw.xact.RawTransaction.notifyObservers(Unknown Source)
      at org.apache.derby.impl.store.raw.data.DropOnCommit.update(Unknown Source)
      at java.util.Observable.notifyObservers(Observable.java:142)

      1. error-stacktrace_mod.out
        10 kB
        Myrna van Lunteren
      2. largedatasuite_mod.out
        24 kB
        Myrna van Lunteren
      3. DERBY-5624.patch
        2 kB
        Mike Matrigali

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Mike Matrigali
              Reporter:
              Mike Matrigali
            • Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development