-
Type: Bug
-
Resolution: Done
-
Priority: Critical - P2
-
Affects Version/s: None
-
Component/s: None
-
Environment:I'm on an EC2 instance running RHEL 6.4. I found this problem in both 2.5.3 and an all-green-on-RHEL version of mongo from last night
{noformat}
$ mongod --version
db version v2.5.4-pre-
2013-10-30T10:09:30.158-0400 git version: 97c3a3d2b487e9376d484d33ede2895e379a3033 modules: enterprise
2013-10-30T10:09:30.159-0400 OpenSSL version: OpenSSL 1.0.0-fips 29 Mar 2010
{noformat}I'm on an EC2 instance running RHEL 6.4. I found this problem in both 2.5.3 and an all-green-on-RHEL version of mongo from last night {noformat} $ mongod --version db version v2.5.4-pre- 2013-10-30T10:09:30.158-0400 git version: 97c3a3d2b487e9376d484d33ede2895e379a3033 modules: enterprise 2013-10-30T10:09:30.159-0400 OpenSSL version: OpenSSL 1.0.0-fips 29 Mar 2010 {noformat}
-
ALL
I'm on an EC2 instance running RHEL 6.4. I found this problem in both 2.5.3 and an all-green-on-RHEL version of mongo from last night
$ mongod --version db version v2.5.4-pre- 2013-10-30T10:09:30.158-0400 git version: 97c3a3d2b487e9376d484d33ede2895e379a3033 modules: enterprise 2013-10-30T10:09:30.159-0400 OpenSSL version: OpenSSL 1.0.0-fips 29 Mar 2010
------------------------------------------------------------------------------
Briefly: I start a standalone mongod with audit logging. I create a
userAdminAnyDatabase-enabled user, log in as that user, create a new user "oo"
in a different database, and then try to update that user with customData.
The server crashes on the update.
In detail:
First, start a mongod, with this script:
rm -r /tmp/mongoda mkdir /tmp/mongoda mongod --port 27017 --logpath /tmp/mongoda/mongo.log --logappend --auditLog bsonfile --auth --auditPath /tmp/mongoda/audit.log --dbpath /tmp/mongoda --smallfiles --nopreallocj
Then, do this in the shell, or put it into a file boom.js and run it with
mongo boom.js:
db = db.getMongo().getDB('admin') db.addUser({user:"uu", pwd:"pp", roles:["userAdminAnyDatabase", "clusterAdmin", "readWriteAnyDatabase", "dbAdminAnyDatabase"]}) db.auth("uu","pp") db = db.getMongo().getDB('oink') db.addUser({user:"oo", pwd:"pp", roles:["userAdmin", "readWrite", "dbAdmin"]}) db.runCommand({updateUser: "oo", customData:{species:"pig"}})
At the updateUser command, the mongod dies with:
Invalid access at address: 0 from thread: conn1 Got signal: 11 (Segmentation fault). Backtrace: 0xed9096 0x790422 0x7907bb 0x3945c0f500 0xb18157 0xb08c94 0xb092f9 0xb0ba03 0xb0cd6a 0xb0cb7d 0xb1992e 0x96a722 0x9937b4 0x994ff2 0x995744 0xb670cf 0xb6d387 0xaaca6e 0xaafb28 0x79cd9f mongod(_ZN5mongo15printStackTraceERSo+0x26) [0xed9096] mongod(_ZN5mongo10abruptQuitEi+0x3c2) [0x790422] mongod(_ZN5mongo24abruptQuitWithAddrSignalEiP7siginfoPv+0x24b) [0x7907bb] /lib64/libpthread.so.0() [0x3945c0f500] mongod(_ZNK5mongo5audit15UpdateUserEvent13putParamsBSONERNS_14BSONObjBuilderE+0x3a7) [0xb18157] mongod(_ZNK5mongo5audit10AuditEvent12generateBSONEv+0x804) [0xb08c94] mongod(_ZNK5mongo5audit10AuditEvent6toBSONEv+0x69) [0xb092f9] mongod() [0xb0ba03] mongod(_ZN5mongo6logger21RotatableFileAppenderINS_5audit10AuditEventEE6appendERKS3_+0xfa) [0xb0cd6a] mongod(_ZN5mongo6logger9LogDomainINS_5audit10AuditEventEE6appendERKS3_+0x6d) [0xb0cb7d] mongod(_ZN5mongo5audit13logUpdateUserEPNS_11ClientBasicERKNS_8UserNameEbPKNS_7BSONObjEPKSt6vectorINS_8RoleNameESaISA_EE+0x16e) [0xb1992e] mongod(_ZN5mongo13CmdUpdateUser3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x1d2) [0x96a722] mongod(_ZN5mongo12_execCommandEPNS_7CommandERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x34) [0x9937b4] mongod(_ZN5mongo7Command11execCommandEPS0_RNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb+0x902) [0x994ff2] mongod(_ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x1c4) [0x995744] mongod(_ZN5mongo11runCommandsEPKcRNS_7BSONObjERNS_5CurOpERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x3f) [0xb670cf] mongod(_ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_+0x897) [0xb6d387] mongod() [0xaaca6e] mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x478) [0xaafb28] mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0xef) [0x79cd9f] $ mongod --version db version v2.5.4-pre- 2013-10-30T10:09:30.158-0400 git version: 97c3a3d2b487e9376d484d33ede2895e379a3033 modules: enterprise 2013-10-30T10:09:30.159-0400 OpenSSL version: OpenSSL 1.0.0-fips 29 Mar 2010