Details
-
Bug
-
Resolution: Fixed
-
Major
-
4.1.0, 4.5.0
-
None
-
Untriaged
-
No
Description
As per Aliaksey Artamonau comments on CBSE-2489
Potential lock-up
The core of the problem is here: http://src.couchbase.org/source/xref/4.1.0/couchdb/src/mapreduce/mapreduce.erl#53. This Ref value is then used in mapreduce_nif to index the contexts: http://src.couchbase.org/source/xref/4.1.0/couchdb/src/mapreduce/mapreduce_nif.cc#529. The problem is that phash2 is in no way collision-resistant. For example, here are two references that hash to the same value:
Hash: 107046579
|
Colliding refs: #Ref<0.0.0.23609> #Ref<0.0.0.19771>
|
What this means is that there's a chance that some context will get lost and will not abide by the javascript execution timeout.