Skip to content
This repository was archived by the owner on Jun 27, 2025. It is now read-only.
This repository was archived by the owner on Jun 27, 2025. It is now read-only.

MemoryError: std::bad_alloc #71

Open

Description

@TomGoBravo

I'm having trouble getting python-rocksdb running. I followed https://github.com/twmht/python-rocksdb#quick-install with the small change of git checkout v6.3.6 of facebook/rocksdb and running make install instead of putting paths in the shell env variables. I picked the latest from the 6.3 tree because I see 6.4 introduced some changes to the column family API I wanted to avoid whatever is triggering #70. With python-rocksdb 0.7.0 even https://github.com/twmht/python-rocksdb#quick-usage-guide fails:

Python 3.6.2 (default, Oct 17 2017, 21:26:29) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import rocksdb
>>> 
>>> db = rocksdb.DB("test.db", rocksdb.Options(create_if_missing=True))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "rocksdb/_rocksdb.pyx", line 1589, in rocksdb._rocksdb.DB.__cinit__
MemoryError: std::bad_alloc

Like issue 70, I first ran into this problem on my laptop running gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516 and Python 3.6.8. I reproduced it in a container on a server running gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4 and Python 3.6.8.

Activity

  1. TomGoBravo commented on Nov 4, 2019

    @TomGoBravo
    Author

    The code at "rocksdb/_rocksdb.pyx", line 1589 is related to column families:

               # Always add the default column family
                column_family_descriptors.push_back(
                    db.ColumnFamilyDescriptor(
                        db.kDefaultColumnFamilyName,
                        options.ColumnFamilyOptions(deref(opts.opts))
                    )
                )
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions