[SERVER-21974] mongo shell can't explain insensible case regex Created: 21/Dec/15  Updated: 06/Dec/22  Resolved: 21/Dec/15

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

Type: Bug Priority: Major - P3
Reporter: Alexandre Bonnetain [X] Assignee: Backlog - Query Team (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-4645 The shell's db.collection.find() comm... Closed
Related
related to SERVER-11771 extended options for $regex cannot be... Closed
related to SERVER-12600 Failure to parse $regex $option 'x' i... Closed
Assigned Teams:
Query
Operating System: ALL
Steps To Reproduce:
  • Enter mongo shell
  • Make a query containg an insensible case regex (such as "(?i)foo")
  • Mongo crashes
Participants:

 Description   

Hi,

when I use the explain method on a query which contains a regex with insensible case. mongo crashes and print the following backtrace :

2015-12-21T18:23:18.566+0100 I -        Assertion: 16686:error converting js type to Utf8Value
2015-12-21T18:23:18.568+0100 I CONTROL  
 0x83bbce 0x7d758e 0x7b8fdf 0x773961 0x75cc37 0x75d9aa 0xa24bb8 0xa2505d 0xa91a2c 0x9b32cb 0x9b3f07 0x153296e06362
----- BEGIN BACKTRACE -----
{"backtrace":[{"b":"400000","o":"43BBCE"},{"b":"400000","o":"3D758E"},{"b":"400000","o":"3B8FDF"},{"b":"400000","o":"373961"},{"b":"400000","o":"35CC37"},{"b":"400000","o":"35D9AA"},{"b":"400000","o":"624BB8"},{"b":"400000","o":"62505D"},{"b":"400000","o":"691A2C"},{"b":"400000","o":"5B32CB"},{"b":"400000","o":"5B3F07"},{"b":"0","o":"153296E06362"}],"processInfo":{ "mongodbVersion" : "3.0.7", "gitVersion" : "nogitversion", "uname" : { "sysname" : "Linux", "release" : "4.3.0-gentoo", "version" : "#1 SMP Tue Nov 17 14:10:41 CET 2015", "machine" : "x86_64" }, "somap" : [ { "elfType" : 2, "b" : "400000" }, { "b" : "7FFE7DDB6000", "path" : "linux-vdso.so.1", "elfType" : 3, "buildId" : "2310387BD45A7EC83B4442510FE0A5DF6C59A286" }, { "b" : "7F555DD57000", "path" : "/usr/lib64/libboost_program_options.so.1.57.0", "elfType" : 3 }, { "b" : "7F555DB3F000", "path" : "/usr/lib64/libboost_filesystem.so.1.57.0", "elfType" : 3 }, { "b" : "7F555D91B000", "path" : "/usr/lib64/libboost_thread.so.1.57.0", "elfType" : 3 }, { "b" : "7F555D717000", "path" : "/usr/lib64/libboost_system.so.1.57.0", "elfType" : 3 }, { "b" : "7F555D4C3000", "path" : "/usr/lib64/libstemmer.so.0d", "elfType" : 3 }, { "b" : "7F555D2B9000", "path" : "/usr/lib64/libpcrecpp.so.0", "elfType" : 3 }, { "b" : "7F555D03A000", "path" : "/usr/lib64/libyaml-cpp.so.0.5", "elfType" : 3 }, { "b" : "7F555CE1E000", "path" : "/lib64/libpthread.so.0", "elfType" : 3 }, { "b" : "7F555CBA8000", "path" : "/usr/lib64/libssl.so.1.0.0", "elfType" : 3 }, { "b" : "7F555C769000", "path" : "/usr/lib64/libcrypto.so.1.0.0", "elfType" : 3 }, { "b" : "7F555C561000", "path" : "/lib64/librt.so.1", "elfType" : 3 }, { "b" : "7F555C35D000", "path" : "/lib64/libdl.so.2", "elfType" : 3 }, { "b" : "7F555BFDB000", "path" : "/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/libstdc++.so.6", "elfType" : 3 }, { "b" : "7F555BCDD000", "path" : "/lib64/libm.so.6", "elfType" : 3 }, { "b" : "7F555BAC6000", "path" : "/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/libgcc_s.so.1", "elfType" : 3 }, { "b" : "7F555B72A000", "path" : "/lib64/libc.so.6", "elfType" : 3 }, { "b" : "7F555DFCF000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3 }, { "b" : "7F555B4BA000", "path" : "/lib64/libpcre.so.1", "elfType" : 3 }, { "b" : "7F555B2A4000", "path" : "/lib64/libz.so.1", "elfType" : 3 } ] }}
 mongo(_ZN5mongo15printStackTraceERSo+0x3E) [0x83bbce]
 mongo(_ZN5mongo10logContextEPKc+0xEE) [0x7d758e]
 mongo(_ZN5mongo11msgassertedEiPKc+0xBF) [0x7b8fdf]
 mongo(_ZN5mongo11toSTLStringERKN2v86HandleINS0_5ValueEEE+0x81) [0x773961]
 mongo(_ZN5mongo7V8Scope16mongoToV8ElementERKNS_11BSONElementEb+0xB27) [0x75cc37]
 mongo(+0x35D9AA) [0x75d9aa]
 mongo(_ZN2v88internal8JSObject26GetPropertyWithInterceptorEPNS0_10JSReceiverEPNS0_6StringEP18PropertyAttributes+0x208) [0xa24bb8]
 mongo(_ZN2v88internal6Object23GetPropertyWithReceiverEPS1_PNS0_6StringEP18PropertyAttributes+0x8D) [0xa2505d]
 mongo(_ZN2v88internal7Runtime17GetObjectPropertyEPNS0_7IsolateENS0_6HandleINS0_6ObjectEEES6_+0xDC) [0xa91a2c]
 mongo(_ZN2v88internal11KeyedLoadIC4LoadENS0_16InlineCacheStateENS0_6HandleINS0_6ObjectEEES5_b+0x5B) [0x9b32cb]
 mongo(_ZN2v88internal16KeyedLoadIC_MissENS0_9ArgumentsEPNS0_7IsolateE+0xD7) [0x9b3f07]
 ??? [0x153296e06362]
-----  END BACKTRACE  -----
2015-12-21T18:23:18.570+0100 E QUERY    Error: 16686 error converting js type to Utf8Value
    at tojsonObject (src/mongo/shell/types.js:656:20)
    at tojson (src/mongo/shell/types.js:600:17)
    at Function.Array.tojson (src/mongo/shell/types.js:166:23)
    at tojsonObject (src/mongo/shell/types.js:627:30)
    at tojson (src/mongo/shell/types.js:600:17)
    at tojsonObject (src/mongo/shell/types.js:664:57)
    at tojson (src/mongo/shell/types.js:600:17)
    at tojsonObject (src/mongo/shell/types.js:664:57)
    at tojson (src/mongo/shell/types.js:600:17)
    at tojsonObject (src/mongo/shell/types.js:664:57) at src/mongo/shell/types.js:656

What should I do ?



 Comments   
Comment by J Rassi [ 21/Dec/15 ]

I'm closing this ticket as a duplicate of SERVER-4645. Alexandre: please add yourself as a watcher to SERVER-4645 for updates.

See also related tickets SERVER-11771 and SERVER-12600.

Comment by Kelsey Schubert [ 21/Dec/15 ]

Hi Shir0kamii,

Thank you for the report. I have verified this behavior, and I am sending this to the query team to triage.

Regards,
Thomas

Generated at Thu Feb 08 03:59:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.