k-means sample failed