Couchbase 2.0 systematic crash with a specific reduce function : beam.smp general protection error:0 in libstdc++.so.6.0.17
Hello,
When using the following reduce/rereduce function on any view, any bucket, containing any data (bucket populated with at least one item), on RedHat and/or OSX (and I guess any other OS), the couchbase server crashes each time :
function(k,v,r) {
if(!r){
var aid = k.shift();
k.pop(aid);
emit(k,v);
}else{
emit(k,v);
}
}
I am not arguing on the function by itself that make little to no sens, but on the fact that this is a valid javascript function that couchbase accepts when saving the design doc, but then crash the server and later on each node on the cluster due to the auto indexing strategy (/settings/viewUpdateDaemon)
The following error appears in dmesg when the crash happens :
beam.smp[21529] general protection ip:7f6aa2943c60 sp:7f6ac3a0c5b8 error:0 in libstdc++.so.6.0.17[7f6aa28e7000+eb000]
I can upload any core file or log, but the problem can be reproduced (on RedHat and OSX at least) with the beer-sample bucket and any map function followed by the previously mentioned reduce function
---
We are (seriously) evaluating couchbase for production, but we can't afford that a random view (even stupid, but valid) makes a cluster-wide crash;
This is the kind of issue that would (sadly) lead us to a noGo.
Regards,
Xavier
Hello,
I created an issue for you:
http://www.couchbase.com/issues/browse/MB-7764
The problem is that reduce functions are not supposed to call emit() (should be ignored) but instead return the desired reduce values (and not a key-value pair).