Details
-
Bug
-
Resolution: Cannot Reproduce
-
Major - P3
-
None
-
None
-
None
-
None
-
Linux 3.10.69-25 x86_64 GNU/Linux
MongoDB 2.6.1 (server)
mongo-c-driver 1.1.4
Description
If I pass to function mongoc_collection_insert a document containing large (more than 1010 bytes) key field (which is involved in several indexes), the function crashes with "Aborted" message. This behaviour is observed every time with large key field and has not been reproduced with keys smaller than 1000. Also it seems adding many non-key fields don't trigger such crash.
It seems actually problem is exceeding the limit on indexed key size. It will be better if this function returns an error instead of instantly crashing in this case.
Last lines of strace log started after mongoc_collection_insert had been called (some private information hidden with **HIDDEN** marker):
uname({sys="Linux", node="***HIDDEN***", ...}) = 0
|
futex(0x8624890, FUTEX_WAKE_PRIVATE, 2147483647) = 0
|
poll([{fd=5, events=POLLIN|POLLERR|POLLHUP}], 1, 0) = 0 (Timeout)
|
sendmsg(5, {msg_name(0)=NULL, msg_iov(9)=[{"\317\4\0\0", 4}, {"\361\0\0\0", 4}, {"\0\0\0\0", 4}, {"\324\7\0\0", 4}, {"\0\0\0\0", 4}, {"***HIDDEN***.$cmd\0", 12}, {"\0\0\0\0", 4}, {"\1\0\0\0", 4}, {"\247\4\0\0\2insert\0\5\0\0\0keys\0\3writeConce"..., 1191}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 1231
|
recvfrom(5, 0x7fc9cf400000, 8388608, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
|
poll([{fd=5, events=POLLIN|POLLERR|POLLHUP}], 1, 299999) = 1 ([{fd=5, revents=POLLIN}])
|
recvfrom(5, "\301\1\0\0\2\203\265]\361\0\0\0\1\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 8388608, 0, NULL, NULL) = 449
|
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
|
tgkill(31979, 31979, SIGABRT) = 0
|
--- SIGABRT (Aborted) @ 0 (0) ---
|
+++ killed by SIGABRT +++
|