db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6398) SYSCS_FREEZE_DATABASE locks-up if there are large records that haven't been flushed to the disk
Date Tue, 05 Nov 2013 13:12:19 GMT

    [ https://issues.apache.org/jira/browse/DERBY-6398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13813905#comment-13813905

Knut Anders Hatlen commented on DERBY-6398:

Thanks for that extra information, Marty. I'm afraid I still haven't been able to reproduce

I'll summarize what I've figured out so far, in case that gives anyone ideas on how to trigger

The hang happens in a code path that is followed only if auto-commit is enabled. Furthermore,
the call to FileLogger.flushAll() from Xact.prepareCommit() seems to happen only if the previous
commit on the same transaction object was a non-synchronous commit. That is, a commit performed
by calling Xact.commitNoSync().

Most of the commitNoSync() calls seem to come in nested transactions, or in transactions that
happen in a background thread, so they would most likely not use the same transaction object
as the one used when auto-committing the syscs_freeze_database() call. Exactly how this could
happen, is still unclear to me.

If this actually is what's causing the problem, a fix might be to do a synchronous commit
before freezing the database when in auto-commit mode. Marty's observation that the hang can
be avoided by updating a small record before invoking the freeze command, is consistent with
that theory.

> SYSCS_FREEZE_DATABASE locks-up if there are large records that haven't been flushed to
the disk
> -----------------------------------------------------------------------------------------------
>                 Key: DERBY-6398
>                 URL: https://issues.apache.org/jira/browse/DERBY-6398
>             Project: Derby
>          Issue Type: Bug
>          Components: Miscellaneous
>    Affects Versions:
>         Environment: Reliably demonstrated on Windows 7 with JDK 1.6.0_31
>            Reporter: Marty Backe
>             Fix For:
>         Attachments: report.txt
> If after writing a record that contains a large data column (>100KB), the FREEZE command
is issued, the command never returns (Derby appears to be dead-locked).
> E.g. sqlStatement.executeUpdate("CALL SYSCS_UTIL.SYSCS_FREEZE_DATABASE()");
> If the CALL SYSCS_UTIL.SYSCS_CHECKPOINT_DATABASE() command is first used before calling
FREEZE, it does not lock-up.
> It's my opinion that calling FREEZE should never result in a dead-locked Derby instance.

This message was sent by Atlassian JIRA

View raw message