[DOCS-2132] segfault when calling mongo::ScopedDbConnection::getScopedDbConnection Created: 22/Oct/13  Updated: 03/Nov/17  Resolved: 30/Oct/13

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Improvement Priority: Major - P3
Reporter: auto Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

$ uname -a
Linux earth 3.2.0-37-generic #58-Ubuntu SMP Thu Jan 24 15:28:10 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

$ g++ --version
g++ (Ubuntu/Linaro 4.8.0-3ubuntu3~12.04) 4.8.0

$ mongod --version
db version v2.4.4
Tue Oct 22 13:11:36.327 git version: 4ec1fb96702c9d4c57b1e06dd34eb73a16e407d2

mongo-cxx-driver-v2.4

Location: http://docs.mongodb.org/ecosystem/drivers/downloads/
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17
Referrer: http://www.mongodb.org/get-involved
Screen Resolution: 1920 x 1080
repo: docs-ecosystem
source: drivers/downloads


Participants:
Days since reply: 10 years, 16 weeks, 1 day ago

 Description   

calling to mongo::ScopedDbConnection::getScopedDbConnection leads to SIGSEGV signal.

Example code:

#include <iostream>

#include "mongo/client/dbclient.h"
#include "mongo/client/connpool.h"

int main()
{
std::string const db = "rs0/127.0.0.1:27017";

try {
boost::scoped_ptr<mongo::ScopedDbConnection> conn(
mongo::ScopedDbConnection::getScopedDbConnection(db));
if (conn->get() == nullptr)

{ std::cerr << "Unable to connect to database\n"; }

else

{ std::cerr << "Connection established\n"; }

}
catch (std::exception const& e)

{ std::cerr << e.what() << std::endl; }

catch (...)

{ std::cerr << "Unhandled exception" << std::endl; }

return 0;
}

compile in Debug mode with g++

Reporter: ag
E-mail: ag.tsure@gmail.com



 Comments   
Comment by Sam Kleinman (Inactive) [ 30/Oct/13 ]

Sorry, the DOCS project is for documentation related issues. Qustions like this are best addressed to one of the MongoDB support channels channels <http://www.mongodb.org/about/support/>

Generated at Thu Feb 08 07:42:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.