I've encountered an infinite loop in the boundary_tracing() function in kraken/lib/segmentation.py.
Tracing logic failed triggering the problem when the starting point could not be identified, I think because the region was defective (too small).
Interestingly, there's a counter variable inside the loop — but no actual check is implemented.