dbTalk Databases Forums  

NULL Page error during cursor get operation!!!

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss NULL Page error during cursor get operation!!! in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Herman.Ron@gmail.com
 
Posts: n/a

Default NULL Page error during cursor get operation!!! - 03-12-2006 , 02:26 AM






Hi all,
I have encountered an internal BD problen when trying to retrieve a
certain record by cursor
the action schema is as follows:
1. open a cursor using
Db::cursor(0,&cursorPtr,0)
2. seting cursor position on first group of duplicate keys
cursor->get(&tmpKey,&data,DB_SET)
3. and finally getting the record
cursor->get(&key,&data,DB_NEXT_NODUP) <---- here
the crash happens

few important facts:
these operations work just fine in most cases, but when the secondary
DB reaches 45 records (each one with size of 132 bytes, and using
default page size of 4096 byte) these set of action causes Berkeley DB
to crash, stating NULL internal page error... after briff look at the
crash code area in the Berkeley's code, I've found that the crash
happens when performing "type = TYPE(bdc->internal->page);" in
db_cam.c:801 source code, also, the dbc parameter has `internal` member
and it's `page` and `opd` are both set to NULL at the crash moment.
it's unclear to me how such error could occur, and if so, is it because
of missuse or a BUG in Berkeley's code???

(P.S : additional code will be supplied on demand)

Regards,
Ron Herman


Reply With Quote
  #2  
Old   
Herman.Ron@gmail.com
 
Posts: n/a

Default Re: NULL Page error during cursor get operation!!! - 03-12-2006 , 07:12 AM






also, in addition... when I tried reducing the page size to 512, the
same crash happened after the DB held 5 records... (the same ratio was
kept for both page size and number of records...) my assumption is that
something bad happens when accessing records just after the page ends.

I'm using the latest version (4.4.16) on linux platform

thanks


Reply With Quote
  #3  
Old   
Michael Cahill
 
Posts: n/a

Default Re: NULL Page error during cursor get operation!!! - 03-12-2006 , 05:14 PM



Hi Herman,

There is a bug in 4.4 relating to secondaries with duplicates, where
the duplicate sets become too large to fit on the same page as the
(secondary) keys. I will send you a patch directly to resolve this
problem.

Regards,
Michael.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.