[SERVER-2042] Server crashes on CLI client exit Created: 01/Nov/10  Updated: 30/Mar/12  Resolved: 10/Dec/10

Status: Closed
Project: Core Server
Component/s: Stability
Affects Version/s: 1.6.3
Fix Version/s: None

Type: Bug Priority: Critical - P2
Reporter: David Dodd Assignee: Mathias Stearn
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

FreeBSD 7.3 32-bit


Attachments: File crud     Text File mongod.log     Text File pytest.txt     File typescript    
Operating System: FreeBSD
Participants:

 Description   

I have installed Mongodb from ports, giving me version 1.6.3 on my FreeBSD development server.

The server starts ok and I am able to use the mongo shell to do things to my various databases and collections.

When I use the exit command in the client, the server shuts down without any useful diagnostics in the log.

I have tried:

  • starting with a clean slate with no databases at all. Created a database, collection, inserted data, queried all ok.
  • with my dbs which were running happily with 1.4.1 queried all ok.
  • recompiling all pre-requisite ports and retrying prior data.

I have attached a log generated by the problem. This was with -vvvvv specified on the command line for maximum debugging output.

The server also crashes when a Ruby client exits as well.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 10/Dec/10 ]

Ok - please let us know if it happens again.

Comment by David Dodd [ 09/Dec/10 ]

Another developer has recently retried building 1.6.3 and the problem appears to have now stopped happening.

I cannot figure out why.

You can probably close the problem.

Thanks,

Dave

Comment by David Dodd [ 02/Nov/10 ]

Having gmp & mfpr on made no difference.

Comment by David Dodd [ 02/Nov/10 ]

gcc version is reported as follows:

mippet# gcc -v
Using built-in specs.
Target: i386-undermydesk-freebsd
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 4.2.1 20070719 [FreeBSD]

Comment by David Dodd [ 02/Nov/10 ]

Just to be certain my environment is correct, I have rebuilt version 1.4.2 from source and the server works perfectly.

A freshly built 1.4.2 does not shutdown on exit.

Out of interest, I tried the C++ unit tests on this version and they crash out in the same message as with 1.6.4 ...

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::bad_alloc_>'
what(): std::bad_alloc
Abort (core dumped)

The versions of each pre-requisite ports are as follows:

boost-libs-1.43.0_1
icu-3.8.1_3
libexecinfo-1.1_3
libiconv-1.13.1_1
nspr-4.8.6
pcre-8.10
python26-2.6.6
scons-1.3.0
spidermonkey-1.7.0

I noticed that the FreeBSD ports page for mongodb also lists gmp & mpfr as requisites but these were not installed as part of the port's dependencies.

I have now also installed:

gmp-5.0.1
mpfr-3.0.0

I will now retry 1.6.3 from ports and 1.6.4 from source with the additional ports installed for gmp & mpfr and see if this makes any difference to the behaviour observed.

Comment by Eliot Horowitz (Inactive) [ 01/Nov/10 ]

Do you know what version of boost your'e compiling with?
And gcc

Comment by David Dodd [ 01/Nov/10 ]

The python smoke tests fail as shown by the attached file python.txt

Comment by David Dodd [ 01/Nov/10 ]

I have now tried using the version 1.6.4 source tarball.

I used the following commands to build:

scons --dd .
scons --dd --prefix=/usr/local install

I started the server.

I used the mongo CLI to look up an entry from the dgdtest/mycol collection.

When I then left the client via the exit command, the server shut down.

I have attached the log.

I then tried running the C++ unit tests which crash, reporting the following:

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::bad_alloc_>'
what(): std::bad_alloc
Abort (core dumped)

I have also attached a transcript of the output of gdb on the core dump produced by running test.

Comment by Eliot Horowitz (Inactive) [ 01/Nov/10 ]

Seems like an issue with the build.
Can you try compiling 1.6.4 from source?

Comment by David Dodd [ 01/Nov/10 ]

Is there any additional debugging I can turn on to allow me to provide more info regarding the shutdown ?

Generated at Thu Feb 08 02:58:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.