Mantis - Resin
Viewing Issue Advanced Details
596 minor always 12-29-05 09:47 01-03-06 11:21
ferg  
 
urgent  
closed 3.0.17  
fixed  
none    
none 3.0.18  
0000596: Block allocation issues with session store
(rep by Keith Fetterman)

The following traces are showing up in the logs

java.lang.Exception: Stack trace
    at java.lang.Thread.dumpStack(Thread.java:1158)
    at com.caucho.db.store.Block.allocate(Block.java:113)
    at com.caucho.db.store.Transaction.readBlock(Transaction.java:280)
    at com.caucho.db.store.Store.writeFragmentLong(Store.java:1023)
    at com.caucho.db.store.Inode.writeFragmentAddr(Inode.java:609)
    at com.caucho.db.store.Inode.append(Inode.java:293)
    at com.caucho.db.store.BlobOutputStream.flushBlock(BlobOutputStream.java:192)
    at com.caucho.db.store.BlobOutputStream.write(BlobOutputStream.java:125)
    at com.caucho.db.table.BlobColumn.setStream(BlobColumn.java:186)
    at com.caucho.db.table.BlobColumn.set(BlobColumn.java:274)
    at com.caucho.db.sql.UpdateQuery.execute(UpdateQuery.java:124)
    at com.caucho.db.jdbc.PreparedStatementImpl.execute(PreparedStatementImpl.java:349)
    at com.caucho.db.jdbc.PreparedStatementImpl.executeUpdate(PreparedStatementImpl.java:325)
    at com.caucho.server.cluster.FileBacking.storeSelfUpdate(FileBacking.java:477)
    at com.caucho.server.cluster.FileBacking.storeSelf(FileBacking.java:437)
    at com.caucho.server.cluster.FileStore.store(FileStore.java:154)
    at com.caucho.server.cluster.ClusterObject.store(ClusterObject.java:385)
    at com.caucho.server.session.SessionImpl.finish(SessionImpl.java:805)
    at com.caucho.server.connection.AbstractHttpRequest.finish(AbstractHttpRequest.java:2302)
    at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:216)
    at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
    at com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:419)
    at com.caucho.server.port.TcpConnection.run(TcpConnection.java:388)
    at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:490)
    at com.caucho.util.ThreadPool.run(ThreadPool.java:423)
    at java.lang.Thread.run(Thread.java:595)

The corresponding code is:

     if (_useCount > 32 && log.isLoggable(Level.FINE)) {
        Thread.dumpStack();
        log.fine("using " + this + " " + _useCount + " times");
      }

Notes
(0000630)
ferg   
01-03-06 11:21   
WriteBlock was improperly overriding the free() method, breaking the database block reference count.