From: Andy C. <an...@ca...> - 2005-03-22 22:05:58
|
Hi all. I have installed fb2 (as a service) on my windows 2000 pc (amd xp 1400, 512k ram). I have a reproducable method of corrupting a db, and I get the following message: Message: database file appears corrupt () wrong page type page 0 is of wrong type (expected 5, found 1) However... setting up to corrupt the db is easy on my pc, but I dont know if I can setup my full app on one of the developers pc's. I can get you the database, before and after, if it would help (its about 16 meg uncompressed). With a little work I might be able to pull out the code and make a small app that recreates the problem... but I cant be sure. So, I'm wondering... Whats the best way for me to help you? In general, here is the process: I have a createdb app that fires off a "create database" call. Then it uses gfix to disable forced writes... (humm.. I'll try the process using forced writes to see if it makes a difference). Then it uses isql to fire off 3 sql scripts. Then it runs ImportPricing (which dynamicly generates many tables based on the structure of some paradox tables) Then it runs 14 more sql scripts via isql. This process seems to work, after ward I can backup the database just fine. In our main application we have a batch process that seems to hose the tables though. during the process I get the above error. As well, I can no longer backup the database (I get the same error). Your humble tester, -Andy |
From: Andy C. <an...@ca...> - 2005-03-22 22:19:24
|
> > I have a createdb app that fires off a "create database" call. Then it > uses gfix to disable forced writes... (humm.. I'll try the process using > forced writes to see if it makes a difference). > Using forced writes didnt make a difference. It still corrupts the db. -Andy |
From: Andy C. <an...@ca...> - 2005-03-22 22:52:18
|
Andy Colson wrote: >> >> I have a createdb app that fires off a "create database" call. Then >> it uses gfix to disable forced writes... (humm.. I'll try the process >> using forced writes to see if it makes a difference). >> > > Using forced writes didnt make a difference. It still corrupts the db. > > -Andy Progress... (well, a little) I was able to extract the sql that is run duing the batch and generate a sql script. If I run the script with sqlWin it corrupts the db, however, when I run the script with isql it works fine. When I get home I'm going to make sure I dont have any stray gds*.dll's or fbclient.dll's laying around, and run it a few times on my laptop just to make sure its reproducable. then I can post it and see if anyone else gets the problem. -Andy |
From: Pavel C. <pc...@ib...> - 2005-03-23 13:54:06
|
Hi, I forwarded the initial report to firebird-devel. Andy Colson wrote: > Progress... (well, a little) > > I was able to extract the sql that is run duing the batch and generate a > sql script. > > If I run the script with sqlWin it corrupts the db, however, when I run > the script with isql it works fine. > > When I get home I'm going to make sure I dont have any stray gds*.dll's > or fbclient.dll's laying around, and run it a few times on my laptop > just to make sure its reproducable. > > then I can post it and see if anyone else gets the problem. Great, please send it to firebird-devel because all db corruption issues as top priority ones should be handled there. best regards Pavel Cisar |
From: Andy C. <an...@ca...> - 2005-03-23 16:43:51
|
Pavel Cisar wrote: > Hi, > > I forwarded the initial report to firebird-devel. > > Andy Colson wrote: > >> Progress... (well, a little) >> >> I was able to extract the sql that is run duing the batch and generate >> a sql script. >> >> If I run the script with sqlWin it corrupts the db, however, when I >> run the script with isql it works fine. >> >> When I get home I'm going to make sure I dont have any stray >> gds*.dll's or fbclient.dll's laying around, and run it a few times on >> my laptop just to make sure its reproducable. >> >> then I can post it and see if anyone else gets the problem. > > > Great, please send it to firebird-devel because all db corruption issues > as top priority ones should be handled there. > > best regards > Pavel Cisar Shoot... Things got a little more complicated. I setup fb2 on my laptop at home, created a new db, and ran my script, and it worked fine. No problems at all. Then I tried the batch function in our application, and at least that still crashed the db. (Interesting side note, after the app crashes the db then I can create a new database and just run the script and it will crash. but If I restart the fb service I can no longer crash with the script alone, I have to run the batch function at least once.) (another interesting node: on my pc at work it always crashed at the same spot (giveing me the same table name. At home it crashed later in the process (a new spot, and always that spot)). So, I guess we have a couple options. I can try to pull out the code and make a little test app, or I can setup the application on one of the developers machines. I assume they'd prefer a little test app, so I'll start working on that. As soon as I get something I'll post to firebird-devel list. -Andy |
From: Pavel C. <pc...@ib...> - 2005-03-23 17:20:49
|
Andy Colson wrote: > Shoot... Things got a little more complicated. I setup fb2 on my > laptop at home, created a new db, and ran my script, and it worked fine. > No problems at all. > > Then I tried the batch function in our application, and at least that > still crashed the db. > > (Interesting side note, after the app crashes the db then I can create a > new database and just run the script and it will crash. but If I > restart the fb service I can no longer crash with the script alone, I > have to run the batch function at least once.) > > (another interesting node: on my pc at work it always crashed at the > same spot (giveing me the same table name. At home it crashed later in > the process (a new spot, and always that spot)). If the new spot gives you the same error then this is definitely somehow connected to tables (header page is assigned to hold table data in Pointer Page). It would be good to know if header page was overwritten by table data or not (in this case only the Pointer Page was mangled. My personal guess is that the page number was not set at all, so it's still zero and zero means header page). Can you try to run gstat -h on corrupted database? If it fails or show weird results, then header was overwritten. I guess that in your narrow-down attempt you should concentrate on table/data operations. > So, I guess we have a couple options. I can try to pull out the code > and make a little test app, or I can setup the application on one of the > developers machines. > > I assume they'd prefer a little test app, so I'll start working on that. > > As soon as I get something I'll post to firebird-devel list. Thanks a lot. best regards --Pavel |
From: Andy C. <an...@ca...> - 2005-03-23 18:55:07
|
Pavel Cisar wrote: > > If the new spot gives you the same error then this is definitely somehow > connected to tables (header page is assigned to hold table data in > Pointer Page). It would be good to know if header page was overwritten > by table data or not (in this case only the Pointer Page was mangled. My > personal guess is that the page number was not set at all, so it's still > zero and zero means header page). Can you try to run gstat -h on > corrupted database? If it fails or show weird results, then header was > overwritten. gstat -h worked fine. Here's some output: D:\dbs>gbak -b IOWACITY.IB x.bak gbak: ERROR:database file appears corrupt () gbak: ERROR: wrong page type gbak: ERROR: page 0 is of wrong type (expected 5, found 1) gbak: ERROR:gds_$compile_request failed gbak:Exiting before completion due to errors D:\dbs>gstat -h IOWACITY.IB Database "IOWACITY.IB" Database header page information: Flags 0 Checksum 12345 Generation 1972 Page size 4096 ODS version 11.0 type 0200 Oldest transaction 1966 Oldest active 1967 Oldest snapshot 1967 Next transaction 1970 Bumped transaction 1 Sequence number 0 Next attachment ID 0 Implementation ID 16 Shadow count 0 Page buffers 0 Next header page 0 Database dialect 3 Creation date Mar 22, 2005 16:36:45 Attributes Variable header data: *END* |