The monero daemon prints the message:

ERROR   blockchain.db.lmdb  src/blockchain_db/lmdb/db_lmdb.cpp:445  !! WARNING: Insufficient free space to extend database !!: 98593996820

The number displayed at the end of that message changes by small amounts each time, for no apparent reason. Anyway, there is plenty of space on the disk: around 153GB to be precise. Should it be relevant: the underlying file system is ZFS, running under Xubuntu 16.04.

Looking at the monero code, this message is generated by the code

  boost::filesystem::space_info si = boost::filesystem::space(path);
    if(si.available < add_size)
      MERROR("!! WARNING: Insufficient free space to extend database !!: " << si.available / 1LL << 20L);

I'm not a C++ programmer, but as near as I can tell: (1) the boost utility returns the space in bytes, (2) the display is dividing this by 2^20. So the calculated value should be in MB, or around 153,000 in this case. The huge number being displayed makes no sense that I can see. But anyway, it certainly ought to be bigger than add_size, so why does the code print this error message?

Anyone have a clue what is going on here?


I'm making this an anser because it's too long and there's code, even though it doesn't actually really answer the question:

The message is buggy, / has precedence over <<, it should use si.available >> 20. I expect boost reports 94026, which is quite small. You could try a simple separate program which just prints this:

#include <iostream> #include <boost/filesystem.hpp> int main() { std::cout << boost::filesystem::space("/home").available << std::endl; return 0; }

Compile it with: g++ filename -lboost_filesystem -lboost_system

Then run it, it should print the amount of space available in /home. If you have the Monero blockchain elsewhere, replace /home with the actual path.

If this does return a wrong number, then it's probably a bug somewhere in boost or ZFS reporting.


Based on the comment below, another program:

#include <stdint.h> #include <stdio.h> #include <boost/filesystem.hpp> int main() { const uint64_t add_size = 1LL << 30; boost::filesystem::space_info si = boost::filesystem::space("/home"); if(si.available < add_size) { printf("not enough\n"); } return 0; }

This uses the same types and code as monerod.

  • Thanks for your reply. I've compiled the program you suggested. It returns the value 156,691,726,336, which corresponds well with the free space of 153GB expected. So boost and ZFS seem to be doing their job. Given the operator-precedence bug that you pointed out, this value would then be shifted 20bits to the left, yielding a really huge number (but still below max-int for 64-bit integers). So the error must lie somewhere else. Hmmm... – Brad Richards Feb 22 '18 at 8:37
  • I added another program which mirrors the monero code. – user36303 Feb 22 '18 at 11:10
  • Solution to problem: RRU (Remove-and-Replace User). The basis of the problem was a typo in the path to the Blockchain - so monerod had placed it on a drive which really was out of space. My bad. The matter was confused, though, by the mistake in the amount of space reported - I will enter this as a bug on GitHub. Thanks for your help! – Brad Richards Feb 23 '18 at 6:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.