Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-536

Python Segmentation fault on find query

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      Python 2.7.2, OpenSuse 12.1, PyMongo 2.4.1-7.1

      The following python code causes a segmentation fault:

      >>> from bson import ObjectId
      >>> from pymongo import MongoClient
      >>> client = MongoClient(host='myhost', tz_aware=True)
      >>> data = client['dbname']['data']
      >>> data.find_one(

      {'_id': ObjectId('5127a845c6e8fc660bcbf2f3')}

      )
      Segmentation fault

      This issue seems to be caused by a corrupted document (querying for other documents does not cause any problems), to be precise a DBRef field seems to be broken. The Mongo shell is able to query for this document and displays:

      > db.data.find({_id: ObjectId('5127a845c6e8fc660bcbf2f3')},

      {parentId: 1}

      )

      { "_id" : ObjectId("5127a845c6e8fc660bcbf2f3"), "parentId" : DBRef("data", undefined) }

      Is there any way to display the internal structur and its values of the field parentId, i.e. to display the document without converting it to a DBRef object?

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            pr rep1
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: