This is based on running run_tests with both release and debug builds of kjbuckets. Haven't looked at code beyond tracking down what I think is the problem so, for example, have no idea what an Sgroup is.
Essentially kjbucketsmodule.c allocates "groups.Sgroups" with "calloc()" on lines 823-824
However it is deallocated on line 930 in "groupsDealloc()" using "PyMem_Del()" (which does some guard-byte checks in debug builds) and barfs.
The easy fix that I have built and checked with run_tests is to replace this line (930) in kjbucketsmodule.c
with this line
This seems to build and run ok in my limited tests, but that really is limited