Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with MDB in the mnist example #1298

Closed
moegitree opened this issue Oct 16, 2014 · 19 comments
Closed

Problems with MDB in the mnist example #1298

moegitree opened this issue Oct 16, 2014 · 19 comments

Comments

@moegitree
Copy link

When I tried to do the dataset praparation in Mnist example and execute " ./examples/mnist/create_mnist.sh ", it turns out some failures like this:

Creating lmdb...
F1016 14:22:01.290793 9722 convert_mnist_data.cpp:132] Check failed: mdb_put(mdb_txn, mdb_dbi, &mdb_key, &mdb_data, 0) == 0 (-30792 vs. 0) mdb_put failed
*** Check failure stack trace: ***
Aborted (core dumped)
F1016 14:22:01.431432 9724 convert_mnist_data.cpp:132] Check failed: mdb_put(mdb_txn, mdb_dbi, &mdb_key, &mdb_data, 0) == 0 (-30792 vs. 0) mdb_put failed
*** Check failure stack trace: ***
Aborted (core dumped)
Done.

How can I fix this problem?
thanks

@sguada
Copy link
Contributor

sguada commented Oct 16, 2014

@moegitree I just tried the mnist example and it works, could you pull again. Make sure you do make clean, delete the db in ./examples/mnist/` and try again

@scottlittle
Copy link

@sguada I am having the same problem. If you make clean, there will be no build folder that is referenced by the create_mnist script.

@sguada
Copy link
Contributor

sguada commented Oct 23, 2014

Then you have to make again.

Sergio

2014-10-22 16:51 GMT-07:00 Scott Little notifications@github.com:

@sguada https://github.com/sguada I am having the same problem. If you
make clean, there will be no build folder that is referenced by the
create_mnist script.


Reply to this email directly or view it on GitHub
#1298 (comment).

@scottlittle
Copy link

@moegitree How much free disk space do you have? I read that mdb_put errors happen when there isn't enough space. I have 100 GB of free space. According to the MNIST website, there should be around 10 MB of data.

@sguada
Copy link
Contributor

sguada commented Oct 23, 2014

@moegitree I have also experience some errors with LMDB when using conver_imageset.
@kmatzen could you take a look at this error?

@stas-sl
Copy link

stas-sl commented Nov 5, 2014

Same issue

@kmatzen
Copy link
Contributor

kmatzen commented Nov 5, 2014

  /** Environment mapsize reached */
#define MDB_MAP_FULL  (-30792)

mapsize is set to 1TB. It might be worthwhile inspecting the resulting mapsize after the environment has been opened.

You could try the following after the call to mdb_env_open to make sure it's equal to 1099511627776. If not, then mdb_env_set_mapsize is returning MDB_SUCCESS without actually updating the map size.

    MDB_envinfo envinfo;
    CHECK_EQ(MDB_SUCCESS, mdb_env_info(mdb_env, &envinfo));
    LOG(INFO) << "MAPSIZE " << envinfo.me_mapsize;

I can't reproduce the bug. Can you send instructions?

@stas-sl
Copy link

stas-sl commented Nov 6, 2014

I changed mapsize to 1073741824 (1GB) and it works now.

CHECK_EQ(mdb_env_set_mapsize(mdb_env, 1073741824), MDB_SUCCESS)  // 1GB
         << "mdb_env_set_mapsize failed";

It seems that 1TB is too huge. I'm running 32-bit Ubuntu, maybe that's the cause.

@kmatzen
Copy link
Contributor

kmatzen commented Nov 6, 2014

That's probably the case since mdb_env_set_mapsize takes a size_t. But didn't your compiler report something like warning: integer constant is too large for its type?

@stas-sl
Copy link

stas-sl commented Nov 6, 2014

Yes, it did report, but I didn't notice that.

@Cheng-Wang
Copy link

I have same problem, I am using it for training imageNet, 1GB seems too small for ImageNet. My free disk is 1.1TB, I also tried 300GB, 500GB, all failed. I have no idea.

@Cheng-Wang
Copy link

Hi, @moegitree I have same problem, have you fix your problem?

@danielhers
Copy link

I am also using Ubuntu 32 bit and got this error. Changing the 1099511627776 to 1073741824 in examples/mnist/convert_mnist_data.cpp fixed it.

@Kukanani
Copy link

Can we add a compile flag for this? It seems to be a common issue (I just had to come here to fix it).

@jeremyfix
Copy link

Same issue fixed with your modification of the mnist script on my Ubuntu 32 bits, 14.04 ;

@SRQ91
Copy link

SRQ91 commented Apr 7, 2016

I have the exact same error and tried the same fix by chaning value to 1gb, but the error is still there and exactly the same. What can be the problem?

@SRQ91
Copy link

SRQ91 commented Apr 7, 2016

Exact output:

`Creating lmdb...

F0407 08:02:22.195675 24302 convert_mnist_data.cpp:138] Check failed: mdb_put(mdb_txn, mdb_dbi, &mdb_key, &mdb_data, 0) == 0 (-30792 vs. 0) mdb_put failed

*** Check failure stack trace: ***

@ 0xb69ae060  (unknown)

@ 0xb69adf5c  (unknown)

@ 0xb69adb78  (unknown)

@ 0xb69aff98  (unknown)

@     0xa656  convert_dataset()

@     0x9e80  main

@ 0xb6706632  (unknown)

Aborted

F0407 08:02:22.427784 24305 convert_mnist_data.cpp:138] Check failed: mdb_put(mdb_txn, mdb_dbi, &mdb_key, &mdb_data, 0) == 0 (-30792 vs. 0) mdb_put failed

*** Check failure stack trace: ***

@ 0xb69a6060  (unknown)

@ 0xb69a5f5c  (unknown)

@ 0xb69a5b78  (unknown)

@ 0xb69a7f98  (unknown)

@     0xa656  convert_dataset()

@     0x9e80  main

@ 0xb66fe632  (unknown)

Aborted
`

@SRQ91
Copy link

SRQ91 commented Apr 7, 2016

Made Caffe again and now it works.

@lukeyeager
Copy link
Contributor

My fix at #3731 may help avoid these problems in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests