-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
Environment:CentOS 5; probably any OS
-
Fully Compatible
-
ALL
With aggregation command, expressions use shared Value instances across multiple threads. Such shared instances may be got using eg. Value::getTrue().
As mongo::Value is reference counted with mongo::IntrusiveCounter, operations on counter are not atomic. With two or more simultaneous aggregations being run this (may) results in freeing of shared values that are being used and thus strange errors like double free detected by glibc or assertions in Value::coerceToBool() for boolean Value. .
This 'bug' can be fixed by changing IntrusiveCounter's counter variable type to bson::AtomicUInt, which is ugly but works. Maybe the final fix shouldn't be so radical.
- is depended on by
-
SERVER-447 new aggregation framework
- Closed