[SERVER-8799] Sort or Find on Symbol data type throws exception Created: 01/Mar/13  Updated: 11/Jul/16  Resolved: 12/Mar/13

Status: Closed
Project: Core Server
Component/s: JavaScript
Affects Version/s: 2.4.0-rc1
Fix Version/s: 2.4.2, 2.5.0

Type: Bug Priority: Major - P3
Reporter: Andre de Frere Assignee: Ben Becker
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File insertSymbol.rb    
Issue Links:
Duplicate
is duplicated by SERVER-9065 Replicable segfault while storing or ... Closed
is duplicated by SERVER-9079 mongo shell crashes - can't handle ty... Closed
is duplicated by SERVER-9276 Console can't handle $symbol fields Closed
Related
Operating System: ALL
Participants:

 Description   

Using the attached Ruby script you can insert a Symbol data type.

Using aggregation to $sort this type, or doing find() on the collection will cause the following:

>db.s6125.find()
Fri Mar  1 11:56:08.846 Assertion: 16661:can't handle type: 14 a: "symbol"
0x10b26cb1b 0x10b24b29e 0x10b24b35d 0x10b239306 0x10b239f2f 0x10b46dbec 0x10b46d652 0x10b4b3942 0xdf124f06362 
 0   mongo                               0x000000010b26cb1b _ZN5mongo15printStackTraceERSo + 43
 1   mongo                               0x000000010b24b29e _ZN5mongo11msgassertedEiPKc + 174
 2   mongo                               0x000000010b24b35d _ZN5mongo11msgassertedEiRKSs + 29
 3   mongo                               0x000000010b239306 _ZN5mongo7V8Scope16mongoToV8ElementERKNS_11BSONElementEb + 2466
 4   mongo                               0x000000010b239f2f _ZN5mongoL8namedGetEN2v85LocalINS0_6StringEEERKNS0_12AccessorInfoE + 575
 5   mongo                               0x000000010b46dbec _ZN2v88internal8JSObject35GetPropertyAttributeWithInterceptorEPS1_PNS0_6StringEb + 822
 6   mongo                               0x000000010b46d652 _ZN2v88internal10JSReceiver32GetPropertyAttributeWithReceiverEPS1_PNS0_6StringE + 252
 7   mongo                               0x000000010b4b3942 _ZN2v88internal19Runtime_HasPropertyENS0_9ArgumentsEPNS0_7IsolateE + 114
 8   ???                                 0x00000df124f06362 0x0 + 15329358013282
Error: 16661 can't handle type: 14 a: "symbol"



 Comments   
Comment by auto [ 28/Mar/13 ]

Author:

{u'date': u'2013-03-12T18:39:15Z', u'name': u'Ben Becker', u'email': u'ben.becker@10gen.com'}

Message: SERVER-8799: handle symbol BSON type as string in v8
Branch: v2.4
https://github.com/mongodb/mongo/commit/7ec1528ae3b136da4ff37b07a0dea57f2795d387

Comment by Daniel Pasette (Inactive) [ 28/Mar/13 ]

fbjork, I've just backported it now for release in v2.4.2

Comment by Fredrik Björk [ 25/Mar/13 ]

Shouldn't this go into the next tiny release, i.e 2.4.2? I have a bunch of data using symbols and cannot upgrade to 2.4 until this is fixed.

Comment by auto [ 13/Mar/13 ]

Author:

{u'date': u'2013-03-12T18:39:15Z', u'name': u'Ben Becker', u'email': u'ben.becker@10gen.com'}

Message: SERVER-8799: handle symbol BSON type as string in v8
Branch: master
https://github.com/mongodb/mongo/commit/c5e0cd08b4f1c90bd80920bc5ab298d7a22eceee

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