I am using celery and zookeeper (kazoo lock) to lock my workers. I have a problem when I kill (-9) one of the workers before releasing the lock then that lock stays locked forever.
So my question is: Does killing the process release locks in that process or is this some bug in zookeeper?
Killing a process with a kill signal will do nothing to clear "software locks" such as ZooKeeper locks.
The only kind of locks killed by a KILL signal are OS-level locks, since all file descriptors are killed, and file descriptor locks are therefore killed as well. But as far as ZooKeeper is concerned, those are not OS level locks (would it be only because the ZooKeeper process, even on the same machine, is not the one of your python process).
It is therefore not a bug in ZooKeeper, and an expected behavior of your kill -9.