Hi Simon / John,

Thank you for replies.

> You are able to repeatably corrupt the db under SQLite 3.5.9? It would
> be worthwhile publishing a script that can do that.
 > "was getting error often" or "did get error ONCE"??
I am running application which uses the db over the NFS. If I move the db
over the local drive then it's working fine.
So I m observing this bug in NFS environment frequently.
In the same test environment (in which I am getting db corrupted), if I use
the sqlite-3.6.4 and above it works perfectly fine.


> I think you should get the latest version and test thoroughly.
I tested the application with sqlite-3.6.4 and above upto sqlite-3.6.15 but
didn't observe corrpted db error.
So it lead me to suspect that there is some bug in sqlite-3.5.9 which is
getting touched by my application.

> What is the "it" that was corrupting the db when you ran (what?) with
> 3.5.9 but is no longer corrupting the db with 3.6.4?? Did you run enough
> tests with 3.6.4 for long enough ?
John, I am running my application using sqlite-3.5.9 and if I place the db
file over the NFS then when it inserts data into the the db, then at some
point it gives 'disk image malformed' message.
Now when the same application (without any modification) I try with
sqlite-3.6.4 and above then I am not observing the 'disk image malformed
message'.

> Consider that the cause may be closer to home ... in an earlier message
> you wrote "I am using sqlite-3.5.9 and observing a 'disk image
> malformed' error nfs, on doing 'PRAGMA integrity_check' I got following
> messages...". Is that "nfs" what I think it is? What exactly is the
> environment: simultaneous users? db file on a network share? threads?
> unsafe pragma usage?
Yes, 'disk image malformed' message I am observing on NFS.
Environment:
CentOS 4.4
nfs-utils-lib-1.0.6-3
system-config-nfs-1.2.8-1
nfs-utils-1.0.6-70.EL4
nfs-utils-lib-devel-1.0.6-3
nfs-utils-1.0.6-70.EL4
- db is on NFS drive, but not shared by thread/processes/users
- not using thread

Some interesting information:
When I debuged the sqlite-3.5.9 code, and observed that it's getting
corrupted at following condition...
- in sqlite3BtreeInitPage() it returns with SQLITE_CORRUPT_BKPT based on
some condition (see below)...

SQLITE_PRIVATE int sqlite3BtreeInitPage(
 MemPage *pPage,        /* The page to be initialized */
 MemPage *pParent       /* The parent.  Might be NULL */
){
     ...
     if( pPage->nCell==0 && pParent!=0 && pParent->pgno!=1 ){
     /* All pages must have at least one cell, except for root pages */
     return SQLITE_CORRUPT_BKPT;
     }
     ...
}

I would appreciate your help in debuging this bug.
Thank you.
-Hiral

On Thu, Jun 18, 2009 at 6:58 PM, John Machin <sjmac...@lexicon.net> wrote:

> On 18/06/2009 10:40 PM, hiral wrote:
> > Hi Simon,
> >
> > Thank you for your quick reply.
> >
> > I am sorry for more general questions.
> >
> > As I mentioned I was getting corrupted db error with sqlite-3.5.9,
>
> "was getting error often" or "did get error ONCE"??
>
> > but when
> > I tried with sqlite-3.6.4 it is no more corrupting the db.
>
> What is the "it" that was corrupting the db when you ran (what?) with
> 3.5.9 but is no longer corrupting the db with 3.6.4?? Did you run enough
> tests with 3.6.4 for long enough ?
>
> > -- so was it a bug with sqlite-3.5.9 ? and got fixed in sqlite-3.6.4
>
> Consider that the cause may be closer to home ... in an earlier message
> you wrote "I am using sqlite-3.5.9 and observing a 'disk image
> malformed' error nfs, on doing 'PRAGMA integrity_check' I got following
> messages...". Is that "nfs" what I think it is? What exactly is the
> environment: simultaneous users? db file on a network share? threads?
> unsafe pragma usage?
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to