“Failed to write block” on OS X #2712

issue adavies42 opened this issue on May 30, 2013
  1. adavies42 commented at 2:21 AM on May 30, 2013: none

    Bitcon QT v0.8.1-beta, OS X 10.7.5

    The app doesn’t seem to be able to run for more than a day or so before crashing with a “Failed to write block” error. I was able to run the prior version for weeks at a time.

  2. gavinandresen commented at 2:36 AM on May 30, 2013: contributor

    Sounds like your hard disk or hard disk controller is failing.

  3. goldbit89 commented at 2:37 AM on May 30, 2013: none

    yea i agree, i just upgraded today to 8.2 and all i keep getting during install is same error as i listed in issue: 2707 below.never had a problem with client until today.

  4. adavies42 commented at 2:43 AM on May 30, 2013: none

    @gavinandresen

    Sounds like your hard disk or hard disk controller is failing.

    Possible, I suppose, but I haven’t seen any other signs of it.

    My wallet.dat is on a mounted disk image; everything else is on the main drive (same as the OS, etc.).

    Where do I find the log that tells me what’s actually going wrong?

  5. Diapolo commented at 10:24 AM on May 30, 2013: none

    Search for debug.log in your Bitcoin data-dir.

  6. fanquake commented at 10:49 AM on May 30, 2013: member

    @adavies42 ~/Library/Application Support/Bitcoin/

  7. goldbit89 commented at 5:20 AM on May 31, 2013: none

    @adavies42 did you ever get your error fixed and if so how did you resolve? I have the same issue on issue 2707.

  8. adavies42 commented at 5:09 AM on June 1, 2013: none

    OK, it crashed again. It’s a bit hard to analyze the log, since it doesn’t have any timestamps, but it looks like the problem starts after it fails to open a couple of the blk*.dat files: I get

    Unable to open file /Users/adavies/Library/Application Support/Bitcoin/blocks/blk00000.dat
    ERROR: CBlock::ReadFromDisk() : OpenBlockFile failed
    

    about fifty times, then

    Unable to open file /Users/adavies/Library/Application Support/Bitcoin/blocks/blk00007.dat
    ERROR: CBlock::WriteToDisk() : OpenBlockFile failed
    *** Failed to write block
    

    once, then

    socket error accept failed: 24
    

    about 400,000 times. (I think that last continued until I accepted the dialog and let the app quit.)

    Why is it trying to access blk00000.dat? That hasn’t been modified since December 19, according the timestamp on the file.

    (And why do I have blk{0001..4}.dat in ~/Library/Application Support/Bitcoin and blk{00000..7}.dat in ~/Library/Application Support/Bitcoin/blocks? The ones directly in Bitcoin, not Bitcoin/blocks, haven’t been modified since May 12. Are they a relic from an earlier version or something?)

  9. goldbit89 commented at 5:20 AM on June 1, 2013: none

    @adavies42 i fixed mine by installing the zip version of 8.2 , for whatever reason some if not all of bitcoin folders and files have been locked, i couldnt even remove them with being the admin. so i just installed 8.2 zip in another location and it located everything needed to get back on and with newest update.

  10. fanquake commented at 5:52 AM on June 1, 2013: member

    @goldbit89 If you run the tidy_datadir script ( contrib/tidy_datadir.sh ), it will detect and remove all of the obsolete DB files from your datadir.

  11. laanwj commented at 2:46 PM on November 12, 2013: member

    Looks like a problem running out of file descriptors. This should be fixed with #2557 and #2568.

  12. laanwj closed this on Nov 12, 2013

  13. gsn2dd commented at 8:55 AM on March 3, 2014: none

    FIXED!

    Beware of other programs using the file in my case an auto backup program locking the files.

  14. jrsikors cross-referenced this on Mar 27, 2018 from issue Error Loading BLKINDEX.dat by kosstick
  15. bitcoin locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-19 16:55 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me