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-2254) Assert during log file switch: log file position exceeded max log file size
Date Wed, 11 May 2011 22:05:48 GMT

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

Knut Anders Hatlen commented on DERBY-2254:
-------------------------------------------

I wouldn't worry too much about the performance impact of the patch. I'd trust the runtime
compiler to do the right thing and inline the setter method. And even if it doesn't, it looks
like the new code only adds two calls to the setter method per log record, and that cost should
be negligible compared to the cost of writing the log record to disk. I'm not sure we have
any good tests for this. We have the bank_tx load and the sr_update load in org.apache.derbyTesting.perf.clients.Runner
that will produce a lot of log records, but you'll probably have to run with derby.system.durability=test
or with the in-memory backend so that the changes aren't overshadowed by the tests waiting
for the log being flushed to disk on commit.

> Assert during log file switch: log file position exceeded max log file size
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-2254
>                 URL: https://issues.apache.org/jira/browse/DERBY-2254
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.3.1.4
>         Environment: Solaris 10, Java SE 6 build 104 
>            Reporter: Olav Sandstaa
>            Assignee: Rick Hillegas
>              Labels: derby_triage10_5_2
>         Attachments: d2254.zip, derby-2254-01-ab-accountForMoreOverhead.diff, derby-2254-01-ac-accountForMoreOverhead.diff
>
>
> When running simple tpc-b like transactions against a embedded Derby based on a SANE
build of trunk the following assertion occurs for the background thread and all user threads:
>    org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED log file position
exceeded max log file size
> This seems to occur during a switch to a new log file.
> derby.log contains the following call stack for the background thread:
> Exception trace: 
> org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED log file position
exceeded max log file size
> 	at org.apache.derby.shared.common.sanity.SanityManager.ASSERT(SanityManager.java:120)
> 	at org.apache.derby.impl.store.raw.log.LogCounter.makeLogInstantAsLong(LogCounter.java:120)
> 	at org.apache.derby.impl.store.raw.log.LogToFile.switchLogFile(LogToFile.java:1900)
> 	at org.apache.derby.impl.store.raw.log.LogToFile.appendLogRecord(LogToFile.java:3530)
> 	at org.apache.derby.impl.store.raw.log.FileLogger.logAndDo(FileLogger.java:345)
> 	at org.apache.derby.impl.store.raw.xact.Xact.logAndDo(Xact.java:1185)
> 	at org.apache.derby.impl.store.raw.log.LogToFile.checkpointWithTran(LogToFile.java:1540)
> 	at org.apache.derby.impl.store.raw.log.LogToFile.checkpoint(LogToFile.java:1357)
> 	at org.apache.derby.impl.store.raw.RawStore.checkpoint(RawStore.java:439)
> 	at org.apache.derby.impl.store.raw.log.LogToFile.performWork(LogToFile.java:3416)
> 	at org.apache.derby.impl.services.daemon.BasicDaemon.serviceClient(BasicDaemon.java:331)
> 	at org.apache.derby.impl.services.daemon.BasicDaemon.work(BasicDaemon.java:668)
> 	at org.apache.derby.impl.services.daemon.BasicDaemon.run(BasicDaemon.java:394)
> 	at java.lang.Thread.run(Thread.java:619)
> 2007-01-17 23:09:48.638 GMT Thread[derby.rawStoreDaemon,5,derby.daemons] Cleanup action
starting
> org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED log file position
exceeded max log file size
> 	at org.apache.derby.shared.common.sanity.SanityManager.ASSERT(SanityManager.java:120)
> 	at org.apache.derby.impl.store.raw.log.LogCounter.makeLogInstantAsLong(LogCounter.java:120)
> 	at org.apache.derby.impl.store.raw.log.LogToFile.switchLogFile(LogToFile.java:1900)
> 	at org.apache.derby.impl.store.raw.log.LogToFile.appendLogRecord(LogToFile.java:3530)
> 	at org.apache.derby.impl.store.raw.log.FileLogger.logAndDo(FileLogger.java:345)
> 	at org.apache.derby.impl.store.raw.xact.Xact.logAndDo(Xact.java:1185)
> 	at org.apache.derby.impl.store.raw.log.LogToFile.checkpointWithTran(LogToFile.java:1540)
> 	at org.apache.derby.impl.store.raw.log.LogToFile.checkpoint(LogToFile.java:1357)
> 	at org.apache.derby.impl.store.raw.RawStore.checkpoint(RawStore.java:439)
> 	at org.apache.derby.impl.store.raw.log.LogToFile.performWork(LogToFile.java:3416)
> 	at org.apache.derby.impl.services.daemon.BasicDaemon.serviceClient(BasicDaemon.java:331)
> 	at org.apache.derby.impl.services.daemon.BasicDaemon.work(BasicDaemon.java:668)
> 	at org.apache.derby.impl.services.daemon.BasicDaemon.run(BasicDaemon.java:394)
> 	at java.lang.Thread.run(Thread.java:619)
> Cleanup action completed
> For my user threads the call stack is similar:
> Database Class Loader started - derby.database.classpath=''
> 2007-01-17 23:09:36.401 GMT Thread[Thread-51,5,main] (XID = 12632406), (SESSIONID = 51),
(DATABASE = /export/home/tmp/derby-db), (DRDAID = null), Cleanup action starting
> 2007-01-17 23:09:36.401 GMT Thread[Thread-51,5,main] (XID = 12632406), (SESSIONID = 51),
(DATABASE = /export/home/tmp/derby-db), (DRDAID = null), Failed Statement is: UPDATE accounts
SET abal = abal + ? WHERE aid = ? AND bid = ?
> org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED log file position
exceeded max log file size
> 	at org.apache.derby.shared.common.sanity.SanityManager.ASSERT(SanityManager.java:120)
> 	at org.apache.derby.impl.store.raw.log.LogCounter.makeLogInstantAsLong(LogCounter.java:120)
> 	at org.apache.derby.impl.store.raw.log.LogToFile.switchLogFile(LogToFile.java:1900)
> 	at org.apache.derby.impl.store.raw.log.LogToFile.appendLogRecord(LogToFile.java:3530)
> 	at org.apache.derby.impl.store.raw.log.FileLogger.logAndDo(FileLogger.java:345)
> 	at org.apache.derby.impl.store.raw.xact.Xact.logAndDo(Xact.java:1185)
> 	at org.apache.derby.impl.store.raw.data.LoggableActions.doAction(LoggableActions.java:221)
> 	at org.apache.derby.impl.store.raw.data.LoggableActions.actionUpdate(LoggableActions.java:85)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.doUpdateAtSlot(StoredPage.java:8521)
> 	at org.apache.derby.impl.store.raw.data.BasePage.updateAtSlot(BasePage.java:1108)
> 	at org.apache.derby.impl.store.access.conglomerate.GenericConglomerateController.replace(GenericConglomerateController.java:479)
> 	at org.apache.derby.impl.sql.execute.RowChangerImpl.updateRow(RowChangerImpl.java:523)
> 	at org.apache.derby.impl.sql.execute.UpdateResultSet.collectAffectedRows(UpdateResultSet.java:566)
> 	at org.apache.derby.impl.sql.execute.UpdateResultSet.open(UpdateResultSet.java:260)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:358)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1182)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1652)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(EmbedPreparedStatement.java:299)
> 	at com.sun.derby.perf.clients.tpcb.DBConnection.performTransaction(DBConnection.java:595)
> 	at com.sun.derby.perf.clients.tpcb.Client.run(Client.java:218)
> After this it seems like no user threads are able to connect to the database (not surpricing).
> This happend using a SANE build and I am unsure by just looking at the assertion in the
code whether this situation would have been fatal also if I had been using an INSANE build.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message