Hi Andy,
I had already added some extra System.out entries to the code and
determined that the pageId value that is passed to the
pageMgr.valid(pageId) method in the RecordRangeIterator.iterator(...)
method was usually always 0 and then on the failing call was something
huge. I therefore added more trace to the BPTreeNode class to determine
where this value was coming from. I added the following output to:
static int recordsPageId(BPTreeNode node, Record fromRec) method in the
BPTreeNode class:
.
.
// ... then find the id of the next step down, but do not touch
the records buffer page.
int id ;
if ( fromRec == null )
{
// Just get the lowest starting place.
id = node.getPtrBuffer().getLow() ;
}
else
{
// Get the right id based on starting record.
int idx = node.findSlot(fromRec) ;
idx = convert(idx) ;
id = node.getPtrBuffer().get(idx) ;
System.out.println("BPTreeNode: fromRec:"+fromRec+", getting
id from getPtrBuffer().get("+idx+") which returns id:"+id+" for
node:"+node);
}
When I ran my test again I go the following output, where we had lots of
records showing a idx=0 and retruned id=0 (like those below)
BPTreeNode:
fromRec:0000000000000000000000000000000000000000000000000000000000000000,
getting id from getPtrBuffer().get(0) which returns id:0 for node:LEAF: 0
[root/leaf] (size 14) -- *
BPTreeNode:
fromRec:0000000000000000000000000000000000000000000000000000000000000000,
getting id from getPtrBuffer().get(0) which returns id:0 for node:LEAF: 0
[root/leaf] (size 14) -- *
But then we got the following:
BPTreeNode:
fromRec:0000000000000000000000000000000000000000000000000000000000000000,
getting id from getPtrBuffer().get(0) which returns id:117440526 for
node:LEAF: 0 [root/leaf] (size 14) -- *
this id=117440526 then leads to the BlockException("No such block") error.
If there is anything else I can add to assist in debugging this issue
please let me know.
Thanks
Steve Groeger
From: Andy Seaborne <[email protected]>
To: [email protected],
Date: 26/01/2014 19:57
Subject: Re: BlockException: No such block
Steve,
I'm not getting systematic failures, even after running multiple times
for well over 4 hours. I saw one failure but had several runs with no
failure at all. Looks like my setup does not have the right timing.
I've changed the internal exception point to print (stderr) some details
and exit the VM:
if ( ! pageMgr.valid(pageId) ) {
String msg =
"RecordRangeIterator.iterator -- No such block (pageId="+
pageId+
", fromRec="+fromRec+", toRec="+toRec+ ")" ;
System.err.println(msg) ;
System.exit(0) ;
throw new BlockException(msg) ;
}
Do you have some test servers you could run your test code with the
development Jena? Ideally, running multiple tests so we build up a
number of outcomes to see if there is a pattern.
https://repository.apache.org/content/repositories/snapshots/org/apache/jena/
apache-jena/2.11.2-SNAPSHOT for a binary build or use maven directly on
apache-jena-libs.
The other thing that may well be needed is a more sensitive test case.
Running in the debugger is too slow to be practical.
What other patterns of transactions have you tried?
Andy
On 24/01/14 16:00, Steve Groeger wrote:
> Andy,
>
> I am currently running with the TDB being written to my harddrive (of my
> Linux RHEL 64bit machine). This failure can sometimes take up to 3-4
hours
> before it fails.
> I have tried using a RAM disk but it fills up before the failure occurs
as
> I can only give it 10Gb of space and due the test the TDB does get very
> large due to all the creates & deletes.
> I am running on RHEL 6.4 with the following JVM:
> java version "1.6.0"
> Java(TM) SE Runtime Environment (build
> pxa6460sr15-20131017_01(SR15))
> IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux amd64-64
> jvmxa6460sr15-20131016_170922 (JIT enabled, AOT enabled)
> J9VM - 20131016_170922
> JIT - r9_20130920_46510ifx2
> GC - GA24_Java6_SR15_20131016_1337_B170922)
> JCL - 20131015_01
>
> Thanks
> Steve Groeger
> IBM WebSphere Service Registry Development
> MP 211, Hursley
> Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129
> Fax (44) 1962 816800
> Lotus Notes: Steve Groeger/UK/IBM
> Internet: [email protected]
>
>
>
> From: Andy Seaborne <[email protected]>
> To: [email protected],
> Date: 24/01/2014 13:57
> Subject: Re: BlockException: No such block
>
>
>
> On 24/01/14 07:18, Steve Groeger wrote:
>> It took 16690 iterations of the writer thread to obtain this error but
> as
>> you can see the reader thread gets the exception when trying to execute
>> this line:
>
> How long in time did that take? As it may be a timing issue, do you
> have an SSD?
>
> Running
>
> java version "1.7.0_51"
> OpenJDK Runtime Environment (IcedTea 2.4.4)
(7u51-2.4.4-0ubuntu0.13.10.1)
> OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)
>
> Andy
>
>
>
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number
> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU
>
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU