[SERVER-2873] Invalid connection string leads to assert Created: 30/Mar/11  Updated: 17/Feb/17  Resolved: 17/Feb/17

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 1.8.0
Fix Version/s: None

Type: Bug Priority: Trivial - P5
Reporter: Aristarkh Zagorodnikov Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

I accidentially typed forward slash two times when specifying connection and got an assert, looks like having two consecutive forward slashes leads to this:

~$ mongo host//
MongoDB shell version: 1.8.0
connecting to: host//
Thu Mar 31 01:28:24 terminate() called in shell, printing stack:
0x80adf16 0xb7716865 0xb77168a2 0xb77169da 0x81132a6 0x81208ae 0x812e82f 0x8120daa 0x8160618 0x81f794e 0x81f905f 0x8202c96 0x81f82d0 0x81be141 0x81be098 0x81bdfa2 0x816c9fd 0x80c60b4 0x81521f7 0x80b1bb4
mongo(_Z11myterminatev+0x56) [0x80adf16]
/usr/lib/libstdc++.so.6 [0xb7716865]
/usr/lib/libstdc++.so.6 [0xb77168a2]
/usr/lib/libstdc++.so.6 [0xb77169da]
mongo(_ZN5mongo9uassertedEiPKc+0xd6) [0x81132a6]
mongo(_ZN5mongo16ConnectionString12_fillServersESs+0x30e) [0x81208ae]
mongo(ZN5mongo16ConnectionStringC1ENS0_14ConnectionTypeERKSsS3+0x7f) [0x812e82f]
mongo(_ZN5mongo16ConnectionString5parseERKSsRSs+0x2fa) [0x8120daa]
mongo(ZN5mongo26mongo_external_constructorEP9JSContextP8JSObjectjPlS4+0xd8) [0x8160618]
mongo(js_Invoke+0xc34) [0x81f794e]
mongo(js_InvokeConstructor+0x295) [0x81f905f]
mongo(js_Interpret+0x9ad5) [0x8202c96]
mongo(js_Execute+0x2f4) [0x81f82d0]
mongo(JS_EvaluateUCScriptForPrincipals+0xa7) [0x81be141]
mongo(JS_EvaluateUCScript+0x43) [0x81be098]
mongo(JS_EvaluateScript+0x6c) [0x81bdfa2]
mongo(_ZN5mongo7SMScope4execERKNS_10StringDataERKSsbbbi+0x11d) [0x816c9fd]
mongo(_ZN5mongo10shellUtils9initScopeERNS_5ScopeE+0xf4) [0x80c60b4]
mongo(_ZN5mongo12ScriptEngine8newScopeEv+0x37) [0x81521f7]
mongo(_Z5_mainiPPc+0x1d04) [0x80b1bb4]



 Comments   
Comment by Mira Carey [ 17/Feb/17 ]

Recent improvements in shell uri handling now return useful error messages

Comment by Aristarkh Zagorodnikov [ 15/Jan/12 ]

I think this might be closed not to pollute the database =)

Comment by Eliot Horowitz (Inactive) [ 31/Mar/11 ]

just a shell issue as its cosmetic, the assert is correct

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