Corrupt log file, but how does db keep working?

We recently had a fairly devastating outage involving a hard drive failure, but are a little mystified about the mechanics of what went on with berkeleydb which I hope someone here can clear up.
A hard drive running a production instance failed because of a disk error, and we had to do a hard reboot to get the system to come back up and right itself (we are running RedHat Enterprise). We actually had three production environments running on that machine, and two came back just fine, but in one, we would get this during recovery:
BDBStorage> Running recovery.
BerkeleyDB> : Log file corrupt at LSN: [4906][8294478]
BerkeleyDB> : PANIC: Invalid argument
BerkeleyDB> : /usr/local/BerkeleyDB.4.8/lib/libdb_java-4.8.so(__os_stack+0x20) [0x2c23af2380]
BerkeleyDB> : /usr/local/BerkeleyDB.4.8/lib/libdb_java-4.8.so(__os_abort+0x15) [0x2c23aee9c9]
BerkeleyDB> : /usr/local/BerkeleyDB.4.8/lib/libdb_java-4.8.so(__env_panic+0xef) [0x2c23a796f9]
BerkeleyDB> : /usr/local/BerkeleyDB.4.8/lib/libdb_java-4.8.so(__env_attach_regions+0x788) [0x2c23aae82c]
BerkeleyDB> : /usr/local/BerkeleyDB.4.8/lib/libdb_java-4.8.so(__env_open+0x130) [0x2c23aad1e7]
BerkeleyDB> : /usr/local/BerkeleyDB.4.8/lib/libdb_java-4.8.so(__env_open_pp+0x2e7) [0x2c23aad0af]
BerkeleyDB> : /usr/local/BerkeleyDB.4.8/lib/libdb_java-4.8.so [0x2c23949dc7]
BerkeleyDB> : /usr/local/BerkeleyDB.4.8/lib/libdb_java-4.8.so(Java_com_sleepycat_db_internal_db_1javaJNI_DbEnv_1open+0xbc) [0x2c239526ea]
BerkeleyDB> : [0x2a99596e77]
We thought, well, perhaps this is related to the disk error, it corrupted a log file and then died. Luckily (or so we thought) we diligently do backups twice a day, and keep a week's worth around. These are made using the standard backup procedure described in the developer's guide, and whenever we've had to restore them, they have been just fine (we've been using our basic setup for something like 9 years now). However, as we retrieved backup after backup, going back three or four days, they all had similar errors, always starting with [4096]. Then we noticed an odd log file, numbered with 4096, which sat around in our logs directory ever since it was created. Eventually we found a good backup, but the customer lost several days' worth of work.
My question here is, how could a log file be corrupted for days and days but not be noticed, say during a checkpoint (which we run every minute or so)? Doesn't a checkpoint itself basically scan the logs, and shouldn't that have hit the corrupt part not long after it was written? The system was running without incident, getting fairly heavy use, so it really mystifies me as to how that issue could be sitting around for days and days like that.
For now all we can promise the customer is that we will automatically restore every backup as soon as it's made, and if something like this happens, we immediately try a graceful shutdown, and if that doesn't come back up, we automatically go back to the 12-hour-old backup. And perhaps we should be doing that anyway, but still, I would like to understand what happened here. Any ideas?

Please note, I don't want to make it sound like I'm somehow blaming berkeleydb for the outage-- we realize in hindsight there were better things to do than go back to an old backup, but the customer wanted an immediate answer, even if it was suboptimal. I just feel like I am missing something major about how the system works.

Similar Messages

  • Time Machine and File Vault - How does it REALLY work?

    Good afternoon,
    I ran some tests and I can't figure out exactly how Time Machine behaves with Filevault.. here's what I did:
    I ran a backup manually. It backed up about 265megabytes. This was right after iTunes downloaded an update for my iPhone. This is weird, because that is stored in Library/iTunes/iPhone Software updates, which is in my FileVault user data.
    I ran a second backup right after. It backed up 726Kb. Sounds like not much has changed.
    Then, I copied a folder (mp3 album) from my NAS to a folder called Time Machine Test in my home folder.. 91megabytes of files.
    I started a backup. Sure enough, it backed up about 91megabytes.
    After the backup completed, I mounted the Sparsebundle file, and my files were there. I could copy them back properly.
    Can someone explain to me exactly what TM can backup while logged in, and what gets backed up only when I log off?
    It seems to me like actual files are being backed up, while the complete encrypted sparsebundle is backed up at logoff only. But if that's the case, why isn't there an option to restore individual files other than by mountaing the TM volume manually?
    Thanks

    infrid wrote: We shouldn't accept this as a price we pay for using other operating system features. Gepeto is quite right : it's unnacceptable, and Apple should sort it out.
    Hmm. I guess it depends on whether you want your Time Machine backups to be encrypted or not.
    If you use a whole disk encryption solution like PGP, Time Machine works fine when logged-in but all your data is backed-up as though encryption were not present, because one you have booted, the encryption is invisible to applications including Time Machine.
    If you enable FileVault, and remove your Home Directory from the exclusions, TM will back up the files in the same way when you're logged in but they will be unencrypted on the backup drive.
    With FileVault enabled and Home Directory excluded, it is not the FILES that are being backed up, but the encrypted VOLUME which is essentially one big file containing all the individual files in your Home Directory. It's similar to a TrueCrypt encrypted volume in this sense. It needs to be backed up unmounted which is why it only happens when you log off.
    The only thing Apple could do would be to create an encrypted volume for the TM backup and synchronize that with your FileVault volume. Not quote the same thing as Time Machine though.
    Message was edited by: Gledders

  • I am trying to save a mp3 file but firefox does not allow me to save it...it allows me to play the file but not download and asave it to my computer. How do I enable it to save mp3 files on my computer?

    I am trying to save a mp3 file but firefox does not allow me to save it...it allows me to play the file but not download and asave it to my computer. How do I enable Firefox to save mp3 files on my computer?

    Go to Options>Applications tab > search MPEG Layer 3 audio(audio/mpeg) > use "Save File" option on drop down menu.

  • TS3988 Each time I log into iCloud, I check, Keep me logged in, but this does not work.  I have to reenter user name etc each time I try to go back to my iCloud account.

    Each time I log into iCloud, I check, Keep me logged in, but this does not work.  I have to reenter user name and password etc each time I try to go back to my iCloud account.

    Hi,
    In Keychain Access app in the Menu for the App is Keychain First Aid.
    If you open this is the tick box for Synchronising the Login password with the so called Login Keychain ticked ?
    9:49 pm      Monday; March 16, 2015
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • I recently had to completely restore my laptop, so I lost the music on my itunes. It's still on my iphone, but how can I keep the music I already have and continue to add more music from the newly set up itunes again?

    I recently had to completely restore my laptop, so I lost the music on my itunes. It's still on my iphone, but how can I keep the music I already have and continue to add more music from the newly set up itunes again? Is there actually a way to do this? I can't help but wonder what the stupid icloud is for if my music is still somewhere in the 'cloud' but it's zero help for restoring music when it's lost on a computer....any help even a site that get's around apple would be great!

    It has always been very basic to always maintain a backup copy of your computer.
    Have you failed to do this?
    If so, not good, you can transfer itunes purchases from the iphone to your computer.  File>Devices>Transfer Purchases
    You can also redownload some itunes purchases in some countries:
    Download past purchases - Apple Support

  • Corrupt LOG File MaxDB 7.5 (Netweaver 04)

    At the Installation the LOG went full. LOG-Mode = SINGLE.
    Then I have added a new LOG File. Nothing happens. After rebooting the maschine,
    the database doesnt come up, in krnldiag there is following:
    2004-11-14 22:46:30  7579     11000 vattach  '/sapdb/XI3/sapdata/DISKD0001' devno 1 T58 succeeded
    2004-11-14 22:46:30  7520     11597 IO       Open '/sapdb/XI3/saplog/DISKL001' successfull, fd: 16
    2004-11-14 22:46:30  7633     12821 TASKING  Thread 7633 starting
    2004-11-14 22:46:30  7632     11565 startup  DEVi started
    2004-11-14 22:46:30  7520     11597 IO       Open '/sapdb/XI3/saplog/DISKL001' successfull, fd: 17
    2004-11-14 22:46:30  7634     12821 TASKING  Thread 7634 starting
    2004-11-14 22:46:30  7633     11565 startup  DEVi started
    2004-11-14 22:46:30  7579     11000 vattach  '/sapdb/XI3/saplog/DISKL001' devno 2 T58 succeeded
    2004-11-14 22:46:30  7520     11597 IO       Open '/data2/sapdb/XI3/DISKL002' successfull, fd: 19
    2004-11-14 22:46:30  7635     12821 TASKING  Thread 7635 starting
    2004-11-14 22:46:30  7634     11565 startup  DEVi started
    2004-11-14 22:46:30  7520     11597 IO       Open '/data2/sapdb/XI3/DISKL002' successfull, fd: 20
    2004-11-14 22:46:30  7636     12821 TASKING  Thread 7636 starting
    2004-11-14 22:46:30  7635     11565 startup  DEVi started
    2004-11-14 22:46:30  7579     11000 vattach  '/data2/sapdb/XI3/DISKL002' devno 3 T58 succeeded
    2004-11-14 22:46:30  7579 ERR    30 IOMan    Log volume configuration corrupted: Linkage missmatch between volume 1 and 2
    2004-11-14 22:46:30  7579     11000 vdetach  '/sapdb/XI3/sapdata/DISKD0001' devno 1 T58
    2004-11-14 22:46:30  7520     12822 TASKING  Thread 7631 joining
    2004-11-14 22:46:30  7636     11565 startup  DEVi started
    2004-11-14 22:46:30  7631     11566 stop     DEVi stopped
    2004-11-14 22:46:30  7520     12822 TASKING  Thread 7632 joining
    2004-11-14 22:46:30  7579 ERR    16 Admin    RestartFilesystem failed with 'I/O error'
    2004-11-14 22:46:30  7579 ERR     8 Admin    ERROR 'disk_not_accessibl' CAUSED EMERGENCY SHUTDOWN
    2004-11-14 22:46:30  7579     12696 DBSTATE  Change DbState to 'SHUTDOWN'(25)
    Is there any way to delete the corrupt LOG files in order to add new one? The data file is ok.
    Thanks
    Helmut

    Thread was also opened on the Mailing list:
    Here is the answer
    Hi,
    in most situations an "add log volume" does not solve
    a log full situation, because the added logvolume is
    accessible first at the moment, when the write position
    on the log is at the end of the old logvolume.
    If a LOGFULL occurs, the save log!
    All "parts" of the LogVolume are numbered and each one
    has stored the identifying number of it's predecessor and
    it successor in it's header-page. The message
         "Linkage missmatch between volume"
    means, that these values does not match any more.
    Did you somehow changed the contents of this file/device?
    If so: can you revert the change? Then the restart should
    work again. do a logbackup and your database will run again.
    If this doesn't work for you, you could patch the
    header pages of the logvolume (I assume you do not really
    want this).
    Another way to solve the situation is to do a data backup
    in admin-mode, reinstall the database and recover the
    databackup, because the removal of a logvolume is not
    supported.
    kind regards, Martin

  • I have a corrupted music file.  How do I clear it / re-download?

    I have a corrupted music file.  How do I clear it / re-download?

    Same with me. But mine is a video (teh art of flight). It freezes in the middle when I play doesnt matter which device I use to play = on iTunes, iPad 2, iphone 4s = it just freezes in the middle.

  • How does one keep the photo description attached to a photo in iphoto when that photo copies to a disc or flash drive

    how does one keep the photo description attached to a photo in iphoto when that photo copies to a disc or flash drive?
    the metadata transfers ok, it is the description of that photo that does not transfer.

    Use the File -> Export command and note the settings to write the metadata to the file on export.
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue.

  • My ipod touch is stuck on the apple logo and after a while a white screen comes up and it restarts and the same thing all over agan. this happened to me before and after a while it turns on but why does it keep on doing this?

    my ipod touch is stuck on the apple logo and after a while a white screen comes up and it restarts and the same thing all over agan. this happened to me before and after a while it turns on but why does it keep on doing this?

    Try connecting the iPod Touch to your computer and restore it.  http://support.apple.com/kb/HT1414

  • HT201209 iTunes will not use the redeemed gift cards on my account, I have a $30 credit and when I try to purchase a song it goes right to my credit card on file. Why does this keep happening

    iTunes will not use the redeemed gift cards on my account, I have a $30 credit and when I try to purchase a song it goes right to my credit card on file. Why does this keep happening???

    Any time you've changed anything in your billing, it does this once to very things.

  • How do you use Airport extreme at hotels etc, when traveling? I can plug my computer into the Airport with my ethernet but how does Airport pickup signal?

    How do you use Airport extreme at hotels etc, when traveling? I can plug my computer into the Airport with my ethernet but how does Airport pickup signal? What equipment & devices do I need to travel with to make this possible?

    You may mean the AirPort Express.....not AirPort Extreme.....as the Express is a popular travel router.
    The whole idea behind using this device is that the hotel must provide an Ethernet jack in the hotel room. Then you connect the AirPort Express to the Ethernet jack with an Ethernet cable and configure it to provide your own wireless network in the room. You still have to agree to terms, pay the fees, etc.
    The problem with this approach is that it is getting very difficult to find hotels in North America that prrovide an Ethernet jack....most have moved to wireless networks and the others are not far behind.
    So, if the hotel is already providing a wireless signal, the AirPort Express is of no use in that situation.
    If you normally stay at the same hotels, and know that they provide Ethernet ports, an AirPort Express might make sense in terms of convenience.

  • I want to create a document/spreadsheet (whichever) that I can send to agencies to type in information for work projects. Any ideas? I have an Excel file but it does not convert over very well and I am having trouble making changes to it.

    Need to create a new spreadsheet or be able to edit the one I have.
    I use this spreadsheet as a work order form for social service agencies. They enter name address etc., and then there are various work projects that they can select as well.
    The one I have from the organization I work with is an excel file but it does not convert over very well. Instead of being 7 pages it is more like 11 or so because things run off the page.  I am trying to delete certain things and move them over but not working out very well so thought it might be easier to start over fresh.
    Is numbers the program to use? If so, any useful tips?

    If the form is going to be used on an iPad, Numbers is the only game in town.
    Numbers is available for Macs only (and iOS devices). Excel is available for PCs and Macs. If you are in a mixed environment of Windows PCs and Macs and you are using this document as an electronic form, Excel is probably the better choice. Otherwise you will need to export to Excel for the PC users then import from Excel to retrieve their data. The import/export process is not perfect. A file that has been exported then reimported will not be the same as the original file. I would assume social services agencies are almost entirely PC-based. 
    If the form is to be printed or turned into a PDF for distribution and use by the social services agencies, either Excel or Numbers would do the job but right now Excel might be the better choice. I would have recommended Numbers '09 but I cannot recommend Numbers 3 for anything thsat requires printing until they give us the layout and printing functionality we used to have (editing in Print View, ability to set margins, etc).
    If everything else in your department/operation/agency is Windows PC and Microsoft Office based, you would be better off sticking with the standard.
    I hope that helps.

  • I have finally figured out how to export an iphoto album so that I can maintain the proper order of the photos after burning the file. How do I keep each individual photo title and description after exporting and burning?

    I have finally figured out how to export an iphoto album so that I can maintain the proper order of the photos after burning the file. How do I keep each individual photo title and description after exporting and burning?  Presently after exporting and burning each photo is identified by the file name rather than each individual title description.  

    File name and Title are not the same thing.
    Filename is attached to the Jpeg file in the Finder.
    Title is attached to the photo within the Jpeg file - as is the description. These are written to the Exif and IPTC metadata on export.
    So: File -> Export. Kind: Jpeg or Tiff and Check the box at 'Title and Keywords'. This will write the Title, keywords and descriptions (though not explicitly stated) to the metadata. This can then be viewed in any app that understand this material.
    You can choose, if you wish, to also use the Title as a Filename - that's an option at File Name
    Regards
    TD

  • I am trying to export a Numbers spreadsheet to a csv file, but it does not put the commas in

    I am trying to export a Numbers spreadsheet to a csv file, but it does not put the commas in.  I want to use it with an HTML table generator tool, but the tool is looking for commas.   The Export to CSV exports it as a spreadsheet with all the formatting removed, and no commas.
    Here is the html table tool:
    http://www.textfixer.com/html/csv-convert-table.php

    Numbers '09 create CSV files with comma separated values if and only if your system is using decimal period.
    If the system is using decimal comma, the CSV files are created using semi-colon as separator.
    Yvan KOENIG (VALLAURIS, France)  dimanche 11 décembre 2011 11:11:25
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • HT2518 I don't have .psd files but how do I migrate my Photoshop Elements catalog with tags from Windows

    I don't have .psd files but how do I migrate my Photoshop Elements catalog with tags from Windows?

    That's really disappointing, I purchased the download version.
    I refuse to pay another £55
    Thanks for your help anyway

Maybe you are looking for