Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-14107

Querying for a document containing a value of either type Javascript or JavascriptWithScope crashes the shell

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.6.4
    • Affects Version/s: 2.6.0
    • Component/s: Shell
    • Fully Compatible
    • OS X
    • Hide

      First mongorestore from the attached mongodump. Then

      > use DriverTest-1
      switched to db DriverTest-1
      > db.org.mongodb.protocol.InsertProtocolSpecification.findOne()
      
      Show
      First mongorestore from the attached mongodump. Then > use DriverTest-1 switched to db DriverTest-1 > db.org.mongodb.protocol.InsertProtocolSpecification.findOne()
    • Server 2.7.3, Server 2.7.4

      Issue Status as of Aug 8, 2014

      ISSUE SUMMARY
      The mongo shell crashes when trying to display a document containing a value of either type Javascript or JavascriptWithScope.

      USER IMPACT
      The shell crashes with a SegmentationFault error and a stack trace. The mongod process is not affected.

      WORKAROUNDS
      N/A

      AFFECTED VERSIONS
      MongoDB production releases up to 2.6.3 are affected by this issue.

      FIX VERSION
      The fix is included in the 2.6.4 production release.

      RESOLUTION DETAILS
      Values of type Javascript or JavascriptWithScope are converted to a string for representation in the mongo shell.

      Original description

      Here's the stack trace:

      > db.org.mongodb.protocol.InsertProtocolSpecification.findOne()
      2014-05-30T14:35:57.286-0400 SyntaxError: Unexpected identifier
      2014-05-30T14:35:57.287-0400 mongo got signal 11 (Segmentation fault: 11), stack trace:
      2014-05-30T14:35:57.289-0400 0x10131f9aa 0x101186d93 0x7fff94f825aa 0x7fff5ea791d8 0x1015ec1a8 0x10148b107 0x1013fa2cd 0x1012925f6 0x10156e0f2 0x101571801 0x1015ececc 0x16f15b506362
       0   mongo                               0x000000010131f9aa _ZN5mongo15printStackTraceERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEE + 58
       1   mongo                               0x0000000101186d93 _Z12quitAbruptlyi + 243
       2   libsystem_platform.dylib            0x00007fff94f825aa _sigtramp + 26
       3   ???                                 0x00007fff5ea791d8 0x0 + 140734781428184
       4   mongo                               0x00000001015ec1a8 _ZN2v88internal7Runtime17SetObjectPropertyEPNS0_7IsolateENS0_6HandleINS0_6ObjectEEES6_S6_18PropertyAttributesNS0_14StrictModeFlagE + 904
       5   mongo                               0x000000010148b107 _ZN2v88internal11SetPropertyENS0_6HandleINS0_6ObjectEEES3_S3_18PropertyAttributesNS0_14StrictModeFlagE + 87
       6   mongo                               0x00000001013fa2cd _ZN2v86Object3SetENS_6HandleINS_5ValueEEES3_NS_17PropertyAttributeE + 285
       7   mongo                               0x00000001012925f6 _ZN5mongoL8namedGetEN2v85LocalINS0_6StringEEERKNS0_12AccessorInfoE + 598
       8   mongo                               0x000000010156e0f2 _ZN2v88internal8JSObject35GetPropertyAttributeWithInterceptorEPS1_PNS0_6StringEb + 706
       9   mongo                               0x0000000101571801 _ZN2v88internal10JSReceiver32GetPropertyAttributeWithReceiverEPS1_PNS0_6StringE + 289
       10  mongo                               0x00000001015ececc _ZN2v88internal19Runtime_HasPropertyENS0_9ArgumentsEPNS0_7IsolateE + 108
       11  ???                                 0x000016f15b506362 0x0 + 25225874924386
      

            Assignee:
            adam.midvidy Adam Midvidy
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: