Exit 139 (SIGSEGV)

Issue #1 resolved
luke14free
created an issue

It seems like this command wont work:

{{{

!python

cmonary.monary_query_count(m._connection, "db", "collection", None)

Segmentation fault [Exit 139 (SIGSEGV)]

}}}

The collection has something like 150k records * 45 fields each. Server has 4gb ram (so all the data should fit in ram).

Even if I substitute monary's count with pymongo count the same problem will occur when cmonary initializes the query.

Comments (3)

  1. Anonymous

    monary_query_count is a C function exposed through ctypes. It does not accept "None" (or even NULL) for the query argument:

    long monary_query_count(mongo_connection* connection,
                            const char* db_name,
                            const char* coll_name,
                            const char* query)
    

    What kind of an object are you passing for m._connection? This is required to be a cmonary connection object (returned by the function cmonary.monary_connect).

    Really, the cmonary module is not intended to be a user-facing component of Monary. It's written in C for speed, does a lot of direct memory access, and assumes that you're always passing the right value. The correct interface to be using from Python is the Monary object (in monary.py). Are you able to reproduce this behavior using the "Monary" interface alone?

  2. Log in to comment