Running the java QueueBrowserAutoAckTest in a loop (in no-prefetch mode as it happens, not sure if thats relevant) I eventually hit an error on recovery: 2008-aug-27 18:01:25 info Loaded Module: /home/gordon/work/bdbstore/cpp-1.0.1/lib/.libs/libbdbstore.so 2008-aug-27 18:01:25 info Management enabled 2008-aug-27 18:01:25 debug ManagementBroker restored broker ID: acd2d78e-3e22-43ef-b489-cee6ecd277af 2008-aug-27 18:01:25 debug ManagementBroker boot sequence: 132 2008-aug-27 18:01:25 debug ManagementBroker added package qpid 2008-aug-27 18:01:25 debug ManagementBroker added class qpid.system 2008-aug-27 18:01:25 debug ManagementBroker added class qpid.broker 2008-aug-27 18:01:25 debug ManagementBroker added class qpid.agent 2008-aug-27 18:01:25 debug ManagementBroker added class qpid.vhost 2008-aug-27 18:01:25 debug ManagementBroker added class qpid.queue 2008-aug-27 18:01:25 debug ManagementBroker added class qpid.exchange 2008-aug-27 18:01:25 debug ManagementBroker added class qpid.binding 2008-aug-27 18:01:25 debug ManagementBroker added class qpid.connection 2008-aug-27 18:01:25 debug ManagementBroker added class qpid.link 2008-aug-27 18:01:25 debug ManagementBroker added class qpid.bridge 2008-aug-27 18:01:25 debug ManagementBroker added class qpid.session 2008-aug-27 18:01:25 notice Journal "TplStore": Instantiation 2008-aug-27 18:01:25 debug Journal "TplStore": Journal directory = "/home/gordon/qpid/branches/qpid.0-10/java/build/data/rhm/tpl/"; Base file name = "tpl" 2008-aug-27 18:01:25 info BdbMessageStore module initialized: Journal dir: /home/gordon/qpid/branches/qpid.0-10/java/build/data; Default files per journal: 8; Default jrournal file size: 24(wpgs); Default write cache page size: 32(Kib) 2008-aug-27 18:01:25 debug Configured queue with no-local=0 2008-aug-27 18:01:25 debug Configured queue example.queue with qpid.trace.id='' and qpid.trace.exclude='' i.e. 0 elements 2008-aug-27 18:01:25 notice Journal "example.queue": Instantiation 2008-aug-27 18:01:25 debug Journal "example.queue": Journal directory = "/home/gordon/qpid/branches/qpid.0-10/java/build/data/rhm/jrnl/0009/example.queue/"; Base file name = "JournalData" 2008-aug-27 18:01:25 debug Journal "example.queue": Recover; num_jfiles=8 jfsize_sblks=3072 queue_id = 0x2 wcache_pgsize_sblks=64 wcache_num_pages=32 2008-aug-27 18:01:26 debug Journal "example.queue": Recover file analysis (jid="example.queue"): owi=FALSE frot=TRUE empty=FALSE ffid=0 fro=0x200 (4 dblks) lfid=0 eo=0x180200 (12292 dblks) h_rid=0x1f7c full=FALSE Enqueued records (txn & non-txn): [ fid_00=0 fid_01=0 fid_02=0 fid_03=0 fid_04=0 fid_05=0 fid_06=0 fid_07=0 ] 2008-aug-27 18:01:26 debug Journal "example.queue": Recover phase 1 complete; highest rid found = 0x1f7c; emap.size=0; tmap.size=0; journal now read-only. 2008-aug-27 18:01:26 debug Exception constructed: Queue example.queue: recoverMessages() failed: jexception 0x0406 nlfh::add_rd_subm_cnt_dblks() threw JERR_NFLH_RDOFFSOVFL: Attempted increase read offset past write offset. (_rd_subm_cnt_dblks=0 incr=4 _wr_subm_cnt_dblks=0) (BdbMessageStore.cpp:840) 2008-aug-27 18:01:26 debug Journal "example.queue": Destroyed Queue example.queue: recoverMessages() failed: jexception 0x0406 nlfh::add_rd_subm_cnt_dblks() threw JERR_NFLH_RDOFFSOVFL: Attempted increase read offset past write offset. (_rd_subm_cnt_dblks=0 incr=4 _wr_subm_cnt_dblks=0) (BdbMessageStore.cpp:840) ~XYZ()
Created attachment 315270 [details] journal files from failure scenario
This was a case of non-tx recovery from a journal whose last record exactly coincided with eof and has no outstanding enqueued records (ie nothing to read). Fixed by adjusting initialization parameters for this case. r.2458 on 1.0 branch r.2459 on trunk