-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
Affects Version/s: 1.1.5
-
Component/s: None
-
None
-
Environment:> ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]
-
None
-
None
-
None
-
None
-
None
-
None
-
None
I'm virtually certain the query below is completely bogus and broken.. but that's not the point. The problem is that it causes a segfault! This is happening when I'm executing the above code from with a rails console (rails 3), with Mongoid:
<pre>
ruby-1.9.2-p0 :001 > Challenge.collection.group(:entries, {:id => '4d1a34ccfa85f32065000004'}, {:group => []}, "function(obj,prev) {if (prev.group.length == 0) { prev.group.push(obj)}}")
/Users/igrigorik/.rvm/gems/ruby-1.9.2-p0/gems/bson-1.1.5/lib/bson/bson_c.rb:24: [BUG] Segmentation fault
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]
– control frame ----------
c:0040 p:---- s:0166 b:0166 l:000165 d:000165 CFUNC :serialize
c:0039 p:0038 s:0160 b:0159 l:000158 d:000158 METHOD /Users/igrigorik/.rvm/gems/ruby-1.9.2-p0/gems/bson-1.1.5/lib/bson/bson_c.rb:24
c:0038 p:0159 s:0153 b:0152 l:000151 d:000151 METHOD /Users/igrigorik/.rvm/gems/ruby-1.9.2-p0/gems/mongo-1.1.5/lib/mongo/cursor.rb:399
c:0037 p:0026 s:0147 b:0147 l:000146 d:000146 METHOD /Users/igrigorik/.rvm/gems/ruby-1.9.2-p0/gems/mongo-1.1.5/lib/mongo/cursor.rb:380
c:0036 p:0011 s:0142 b:0142 l:000141 d:000141 METHOD /Users/igrigorik/.rvm/gems/ruby-1.9.2-p0/gems/mongo-1.1.5/lib/mongo/cursor.rb:348
c:0035 p:0022 s:0136 b:0136 l:000135 d:000135 METHOD /Users/igrigorik/.rvm/gems/ruby-1.9.2-p0/gems/mongo-1.1.5/lib/mongo/cursor.rb:72
c:0034 p:0196 s:0131 b:0131 l:000130 d:000130 METHOD /Users/igrigorik/.rvm/gems/ruby-1.9.2-p0/gems/mongo-1.1.5/lib/mongo/db.rb:472
c:0033 p:0288 s:0122 b:0122 l:000121 d:000121 METHOD /Users/igrigorik/.rvm/gems/ruby-1.9.2-p0/gems/mongo-1.1.5/lib/mongo/collection.rb:595
c:0032 p:0021 s:0110 b:0110 l:001ca8 d:000109 LAMBDA /Users/igrigorik/.rvm/gems/ruby-1.9.2-p0/gems/mongoid-2.0.0.beta.20/lib/mongoid/collections/master.rb:15
c:0031 p:---- s:0107 b:0107 l:000106 d:000106 FINISH
c:0030 p:0021 s:0105 b:0105 l:001be8 d:000104 LAMBDA /Users/igrigorik/.rvm/gems/ruby-1.9.2-p0/gems/mongoid-2.0.0.beta.20/lib/mongoid/collection.rb:19
c:0029 p:---- s:0102 b:0102 l:000101 d:000101 FINISH
</pre>