[SERVER-10838] mongod crashes with multiple SSL connections Created: 20/Sep/13  Updated: 11/Jul/16  Resolved: 24/Sep/13

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: None
Fix Version/s: 2.5.3

Type: Bug Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Andreas Nilsson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS X:
$ otool -l mongod | grep ssl
name /opt/local/lib/libssl.1.0.0.dylib (offset 24)
$ openssl
OpenSSL> version
OpenSSL 1.0.1e 11 Feb 2013


Attachments: File mongod.config     Zip Archive ssltest.zip    
Operating System: ALL
Steps To Reproduce:

Start mongod using the attached config.
Run ssltest.sh in the attached zip (requires Java 7)

Participants:

 Description   

Building from source using --ssl, mongod crashes with the following trace with multiple SSL connections from the Java driver:

Got signal: 6 (Abort trap: 6).
Backtrace:
0x1101b344b 0x10fc2c24b 0x7fff82fa094a 0 0x7fff82ff7dce 0x1101edfe9 0x1101fc1fc 0x1101f9d50 0x7fff82fcb9c4 0x110072eb8 0x10fe7c00b 0x110073524 0x1100723ca 0x110188f77 0x11018b8b1 0x11018be36 0x110185cf5 0x11017f9e3 0x110181520 0x110183c78
 0   mongod                              0x00000001101b344b _ZN5mongo15printStackTraceERSo + 43
 1   mongod                              0x000000010fc2c24b _ZN5mongo10abruptQuitEi + 251
 2   libsystem_c.dylib                   0x00007fff82fa094a _sigtramp + 26
 3   ???                                 0x0000000000000000 0x0 + 0
 4   libsystem_c.dylib                   0x00007fff82ff7dce abort + 143
 5   mongod                              0x00000001101edfe9 _ZN8tcmalloc3LogENS_7LogModeEPKciNS_7LogItemES3_S3_S3_ + 809
 6   mongod                              0x00000001101fc1fc _ZN8tcmalloc11ThreadCache10DeallocateEPvm + 180
 7   mongod                              0x00000001101f9d50 _ZN12_GLOBAL__N_121do_free_with_callbackEPvPFvS0_E + 1232
 8   libsystem_c.dylib                   0x00007fff82fcb9c4 free + 403
 9   mongod                              0x0000000110072eb8 _ZN5mongo6logger26MessageEventDetailsEncoder6encodeERKNS0_21MessageEventEphemeralERSo + 68
 10  mongod                              0x000000010fe7c00b _ZN5mongo6logger21RotatableFileAppenderINS0_21MessageEventEphemeralEE6appendERKS2_ + 177
 11  mongod                              0x0000000110073524 _ZN5mongo6logger9LogDomainINS0_21MessageEventEphemeralEE6appendERKS2_ + 66
 12  mongod                              0x00000001100723ca _ZN5mongo6logger16LogstreamBuilderD2Ev + 228
 13  mongod                              0x0000000110188f77 _ZN5mongo6Socket15handleSendErrorEiPKc + 769
 14  mongod                              0x000000011018b8b1 _ZN5mongo12_GLOBAL__N_110SSLManager16_flushNetworkBIOEPNS_13SSLConnectionE + 715
 15  mongod                              0x000000011018be36 _ZN5mongo12_GLOBAL__N_110SSLManager12SSL_shutdownEPNS_13SSLConnectionE + 82
 16  mongod                              0x0000000110185cf5 _ZN5mongo6SocketD1Ev + 69
 17  mongod                              0x000000011017f9e3 _ZN5boost6detail17sp_counted_impl_pIN5mongo6SocketEE7disposeEv + 33
 18  mongod                              0x0000000110181520 _ZN5mongo13MessagingPortD0Ev + 156
 19  mongod                              0x0000000110183c78 _ZN5mongo17PortMessageServer17handleIncomingMsgEPv + 2872



 Comments   
Comment by Jeffrey Yemin [ 25/Sep/13 ]

I've confirmed the fix using the attached test. After 100,000 connections, no crashes.

Comment by Andreas Nilsson [ 24/Sep/13 ]

http://codereview.10gen.com/11781030/

Comment by auto [ 24/Sep/13 ]

Author:

{u'username': u'agralius', u'name': u'Andreas Nilsson', u'email': u'andreas.nilsson@10gen.com'}

Message: SERVER-10838 Fixed stability issues with multiple SSL connections
Branch: master
https://github.com/mongodb/mongo/commit/52cf8ca8e15295690a21d9442cbd7d066651fc62

Generated at Thu Feb 08 03:24:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.