Unsynchronized access to a WeakHashMap causes endless loop and deadlock-like behavior. A synchronization of the map, or use a combination of ConcurrentHashMap and WeakHashMap should solve the problem.