## On Upsert, if the database does not yet exist: cheald@Aura ~ % ruby kaboom.rb upsert /usr/local/rvm/gems/ruby-1.9.3-p125-perf/gems/mongo-1.6.1/lib/mongo/networking.rb:331:in `rescue in receive_message_on_socket': Operation failed with the following exception: Connection reset by peer (Mongo::ConnectionFailure) from /usr/local/rvm/gems/ruby-1.9.3-p125-perf/gems/mongo-1.6.1/lib/mongo/networking.rb:316:in `receive_message_on_socket' from /usr/local/rvm/gems/ruby-1.9.3-p125-perf/gems/mongo-1.6.1/lib/mongo/networking.rb:188:in `receive_header' from /usr/local/rvm/gems/ruby-1.9.3-p125-perf/gems/mongo-1.6.1/lib/mongo/networking.rb:175:in `receive' from /usr/local/rvm/gems/ruby-1.9.3-p125-perf/gems/mongo-1.6.1/lib/mongo/networking.rb:139:in `receive_message' from /usr/local/rvm/gems/ruby-1.9.3-p125-perf/gems/mongo-1.6.1/lib/mongo/cursor.rb:469:in `block in send_initial_query' from /usr/local/rvm/gems/ruby-1.9.3-p125-perf/gems/mongo-1.6.1/lib/mongo/util/logging.rb:36:in `instrument' from /usr/local/rvm/gems/ruby-1.9.3-p125-perf/gems/mongo-1.6.1/lib/mongo/cursor.rb:467:in `send_initial_query' from /usr/local/rvm/gems/ruby-1.9.3-p125-perf/gems/mongo-1.6.1/lib/mongo/cursor.rb:458:in `refresh' from /usr/local/rvm/gems/ruby-1.9.3-p125-perf/gems/mongo-1.6.1/lib/mongo/cursor.rb:128:in `next' from /usr/local/rvm/gems/ruby-1.9.3-p125-perf/gems/mongo-1.6.1/lib/mongo/collection.rb:288:in `find_one' ## mongod.log Wed Apr 4 08:22:13 [initandlisten] connection accepted from 127.0.0.1:36832 #78 Wed Apr 4 08:22:13 [conn78] end connection 127.0.0.1:36832 Wed Apr 4 08:22:13 [initandlisten] connection accepted from 127.0.0.1:36834 #79 Wed Apr 4 08:22:13 [FileAllocator] allocating new datafile /var/lib/mongo/test.ns, filling with zeroes... Wed Apr 4 08:22:13 [FileAllocator] done allocating datafile /var/lib/mongo/test.ns, size: 16MB, took 0.093 secs Wed Apr 4 08:22:13 [FileAllocator] allocating new datafile /var/lib/mongo/test.0, filling with zeroes... Wed Apr 4 08:22:13 [FileAllocator] done allocating datafile /var/lib/mongo/test.0, size: 64MB, took 0.037 secs Wed Apr 4 08:22:13 [FileAllocator] allocating new datafile /var/lib/mongo/test.1, filling with zeroes... Wed Apr 4 08:22:13 [conn79] build index test.kaboom { _id: 1 } Wed Apr 4 08:22:13 [conn79] build index done 0 records 0 secs Wed Apr 4 08:22:13 [conn79] Assertion: 10321:Invalid dbref/code/string/symbol size: 19 strnlen:-1 0x584102 0x507e03 0x50b3c3 0x509bc0 0x50b422 0x89824c 0x890c4d 0x50b58a 0x88e024 0xaa33f6 0x637407 0x3a3ba07d90 0x3a3b6f0f5d /usr/bin/mongod(_ZN5mongo11msgassertedEiPKc+0x112) [0x584102] /usr/bin/mongod(_ZNK5mongo11BSONElement8validateEv+0x223) [0x507e03] /usr/bin/mongod(_ZNK5mongo7BSONObj8toStringERNS_13StringBuilderEbb+0x173) [0x50b3c3] /usr/bin/mongod(_ZNK5mongo11BSONElement8toStringERNS_13StringBuilderEbb+0x5d0) [0x509bc0] /usr/bin/mongod(_ZNK5mongo7BSONObj8toStringERNS_13StringBuilderEbb+0x1d2) [0x50b422] /usr/bin/mongod(_ZNK5mongo7OpDebug8toStringEv+0x1fc) [0x89824c] /usr/bin/mongod(_ZNK5mongo14LazyStringImplINS_7OpDebugEE3valEv+0xd) [0x890c4d] /usr/bin/mongod(_ZN5mongo9LogstreamlsERKNS_10LazyStringE+0x1a) [0x50b58a] /usr/bin/mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x954) [0x88e024] /usr/bin/mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0x76) [0xaa33f6] /usr/bin/mongod(_ZN5mongo3pms9threadRunEPNS_13MessagingPortE+0x287) [0x637407] /lib64/libpthread.so.0() [0x3a3ba07d90] /lib64/libc.so.6(clone+0x6d) [0x3a3b6f0f5d] Wed Apr 4 08:22:13 [conn79] AssertionException handling request, closing client connection: 10321 Invalid dbref/code/string/symbol size: 19 strnlen:-1 Wed Apr 4 08:22:13 [FileAllocator] done allocating datafile /var/lib/mongo/test.1, size: 128MB, took 0.016 secs