Uploaded image for project: 'Libmongocrypt'
  1. Libmongocrypt
  2. MONGOCRYPT-30

linkbench can crash libmongocrypt

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      To reproduce:

      Repo: https://github.com/markbenvenuto/linkbench
      Branch: fle

      Steps

      mvn clean package -DskipTests

      mongo --eval "db.getSiblingDB('linkdb0').dropDatabase(); db.getSiblingDB('linkdb0').createCollection('linktable');  db.getSiblingDB('linkdb0').createCollection('nodetable');  db.getSiblingDB('linkdb0').createCollection('counttable'); ";
      

      ./bin/linkbench -c config/LinkConfigMongoDb.properties -l

      It will take a few minutes to actually segfault.

      Running on OS X I see this in the JVM logfile:

      Current thread (0x00007f9f9ebf8000):  JavaThread "Thread-16" [_thread_in_native, id=34563, stack(0x000070000b9c9000,0x000070000bac9000)]
       
      Stack: [0x000070000b9c9000,0x000070000bac9000],  sp=0x000070000bac5ec0,  free space=1011k
      Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
      C  [jna16384194371315847686.tmp+0x1fec2]  _bson_iter_next_internal+0xc2
      C  [jna16384194371315847686.tmp+0x1f9fb]  bson_iter_next+0x1b
      C  [jna16384194371315847686.tmp+0x116d6]  _recurse+0x56
      C  [jna16384194371315847686.tmp+0x11c45]  _recurse+0x5c5
      C  [jna16384194371315847686.tmp+0x11a82]  _recurse+0x402
      C  [jna16384194371315847686.tmp+0x11ea0]  _mongocrypt_traverse_binary_in_bson+0x110
      C  [jna16384194371315847686.tmp+0x7ed5]  _mongo_feed_markings+0x225
      C  [jna16384194371315847686.tmp+0x9f54]  mongocrypt_ctx_mongo_feed+0x184
      C  [jna12906277947524783135.tmp+0xdef4]  ffi_call_unix64+0x4c
      C  0x000070000bac7e90
       
      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      J 4130  com.mongodb.crypt.capi.CAPI.mongocrypt_ctx_mongo_feed(Lcom/mongodb/crypt/capi/CAPI$mongocrypt_ctx_t;Lcom/mongodb/crypt/capi/CAPI$mongocrypt_binary_t;)Z (0 bytes) @ 0x000000011b36fea3 [0x000000011b36fe40+0x0000000000000063]
      J 6276 c1 com.mongodb.crypt.capi.MongoCryptContextImpl.addMongoOperationResult(Lorg/bson/BsonDocument;)V (56 bytes) @ 0x0000000113e13c3c [0x0000000113e13ac0+0x000000000000017c]
      J 6266 c2 com.mongodb.client.internal.Crypt.executeStateMachine(Lcom/mongodb/crypt/capi/MongoCryptContext;Ljava/lang/String;)Lorg/bson/RawBsonDocument; (175 bytes) @ 0x000000011b5eea80 [0x000000011b5ebea0+0x0000000000002be0]
      J 4924 c1 com.mongodb.client.internal.Crypt.encrypt(Ljava/lang/String;Lorg/bson/RawBsonDocument;)Lorg/bson/RawBsonDocument; (70 bytes) @ 0x00000001144faf9c [0x00000001144fad80+0x000000000000021c]
      J 4140 c1 com.mongodb.client.internal.CryptConnection.command(Ljava/lang/String;Lorg/bson/BsonDocument;Lorg/bson/FieldNameValidator;Lcom/mongodb/ReadPreference;Lorg/bson/codecs/Decoder;Lcom/mongodb/session/SessionContext;ZLcom/mongodb/connection/SplittablePayload;Lorg/bson/FieldNameValidator;)Ljava/lang/Object; (217 bytes) @ 0x00000001143470ec [0x0000000114345da0+0x000000000000134c]
      

      Attachments

        1. hs_err_pid50289.log
          360 kB
        2. hs_err_pid57718.log
          219 kB

        Activity

          People

            jeff.yemin@mongodb.com Jeffrey Yemin
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: