moped icon indicating copy to clipboard operation
moped copied to clipboard

bson length doesn't match what we found in object with unknown _id

Open lucasmartins opened this issue 11 years ago • 0 comments

I feel a bit lost whether this is a rubinius bug, moped, mongoid, or mongodb. But perhaps you guys can give me some pointers.

I get this output from MongoDB logs when trying any operation from my Rails app:

2014-05-20T08:19:59.173-0300 [initandlisten] connection accepted from 127.0.0.1:49634 #1 (1 connection now open)
2014-05-20T08:19:59.201-0300 [conn1] Assertion: 10307:Client Error: bad object in message: bson length doesn't match what we found in object with unknown _id
2014-05-20T08:19:59.207-0300 [conn1] 0x103dbd00a 0x103d72e04 0x103d61d7c 0x103d61bea 0x1036f687f 0x1036f639c 0x10395d11a 0x1036a754e 0x103d80826 0x103df0d11 0x7fff979be899 0x7fff979be72a 0x7fff979c2fc9 
 0   mongod                              0x0000000103dbd00a _ZN5mongo15printStackTraceERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEE + 58
 1   mongod                              0x0000000103d72e04 _ZN5mongo10logContextEPKc + 196
 2   mongod                              0x0000000103d61d7c _ZN5mongo11msgassertedEiPKc + 396
 3   mongod                              0x0000000103d61bea _ZN5mongo11msgassertedEiRKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE + 26
 4   mongod                              0x00000001036f687f _ZN5mongo9DbMessage9nextJsObjEv + 767
 5   mongod                              0x00000001036f639c _ZN5mongo12QueryMessageC2ERNS_9DbMessageE + 156
 6   mongod                              0x000000010395d11a _ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE + 1034
 7   mongod                              0x00000001036a754e _ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE + 190
 8   mongod                              0x0000000103d80826 _ZN5mongo17PortMessageServer17handleIncomingMsgEPv + 1078
 9   mongod                              0x0000000103df0d11 _ZN5boost12_GLOBAL__N_112thread_proxyEPv + 177
 10  libsystem_pthread.dylib             0x00007fff979be899 _pthread_body + 138
 11  libsystem_pthread.dylib             0x00007fff979be72a _pthread_struct_init + 0
 12  libsystem_pthread.dylib             0x00007fff979c2fc9 thread_start + 13
2014-05-20T08:19:59.207-0300 [conn1] AssertionException handling request, closing client connection: 10307 Client Error: bad object in message: bson length doesn't match what we found in object with unknown _id
2014-05-20T08:19:59.210-0300 [initandlisten] connection accepted from 127.0.0.1:49635 #2 (1 connection now open)
2014-05-20T08:20:32.398-0300 [clientcursormon] mem (MB) res:243 virt:4717
2014-05-20T08:20:32.398-0300 [clientcursormon]  mapped (incl journal view):2240
2014-05-20T08:20:32.398-0300 [clientcursormon]  connections:1

I'm using rbx-2.2.6, mongoid from revision dba1c17b1dba667e50347ab616aaf6f2e1bee094, and mongodb v2.6.1 built through Homebrew.

$ uname -a
Darwin Quanta.local 13.1.0 Darwin Kernel Version 13.1.0: Wed Apr  2 23:52:02 PDT 2014; root:xnu-2422.92.1~2/RELEASE_X86_64 x86_64

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix

$ llvm-gcc --version
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix

My first suspicion was that bson_ext might be broken for rbx, so I cut it out. No change though.

I have tried MRI 2.1.2 and it works fine. So that kinda narrows it down. My best guess is that there's something wrong between moped and Rubinius (including my build environment).

Is there a better test I can do to be sure?

lucasmartins avatar May 20 '14 11:05 lucasmartins