I am asking this question because of following observations
getting this stack trace in thread dump in highly multi threaded environment
UUID is immutable so it's potentially thread safe, but apparently there was some evil caching going on in some accessors that made it unsafe (that bug is fixed now).
But your thread dump just says that a thread is waiting for a lock at SecureRandom.nextBytes
, which is used by the UUID.randomUUID
factory, which definitely is thread-safe. It's what's supposed to happen when several threads call it simultaneously, as far as I can tell.