detail.php
OW2 Forge: Detail: 313837 AssertionError: buffersWaitingForce (-1) < 0 when combining sync and async puts on the same thread.

Advanced - Powered by Google


   
Log In
New Account
  
 
Home
My Page
Project Tree
Project Openings
High-speed ObjectWeb Logger
          
 
 
Summary
Tracker
Lists
Tasks
News
CVS
Files
SVN
                
 

Tracker: Bugs

Submit New | Browse | Admin | ExportToXml

[ #313837 ] AssertionError: buffersWaitingForce (-1) < 0 when combining sync and async puts on the same thread.

Date:
2009-06-04 17:20
Priority:
5
Submitted By:
Taylor Davis (tydavis)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
AssertionError: buffersWaitingForce (-1) < 0 when combining sync and async puts on the same thread.

Detailed description:
We have an application that writes out variable size blocks of data. HOWL uses a fixed size buffer so we split our data into several smaller blocks and write all of this out asynchronously except for the last block which is written out synchronously. The logic goes something like this: public long write(byte[] data) throws Exception { // for this test chunkSize is calculate to be 1/4 the configured buffer size. byte[][] blocks = split(data, chunkSize); for (int i = 0; i < blocks.length - 1; i++) { _logger.put(blocks[i], false); } return _logger.put(blocks[blocks.length - 1], true); } The resulting AssertionError only occurs periodically so the test is run from the cmdline within a loop that greps the output for the Error. HOWL is configured with the following settings: bufferSize=1K checksumEnabled=true adler32Checksum=true flushPartialBuffers=true The testcase writes out 5000 records each of which is 756 bytes. Each "write task" is encapsulated in a Runnable that is submitted to an ExecutorService. The error will usually occur within no more than 10 iterations of the testcase. Here is the exception we are getting: ERROR; (04 Jun 2009 09:47:46,668); [pool-2-thread-7]; (HowlLogTest.java:173); Error putting data. java.lang.AssertionError: buffersWaitingForce (-1) < 0 at org.objectweb.howl.log.LogBufferManager.releaseBuffer(LogBufferManager.java:566) at org.objectweb.howl.log.LogBufferManager.force(LogBufferManager.java:522) at org.objectweb.howl.log.LogBufferManager.put(LogBufferManager.java:707) at org.objectweb.howl.log.Logger.put(Logger.java:207) at org.objectweb.howl.log.Logger.put(Logger.java:181) at com.ml.ion.jpm.impl.HowlLogTest$FixedBlockJournal.put(HowlLogTest.java:169) at com.ml.ion.jpm.impl.HowlLogTest$1.run(HowlLogTest.java:100) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:637) I've attached the test case we used to flush out the error. Note also that we found the problem occurred more often when run from the cmdline using mvn rather than from within an IDE.

Add A Comment:

Please login

Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item

Copyright © 1999-2008, OW2 Consortium | contact | You have a difficulty, a problem ? Please report an issue using your OW2 forge account credentials