Which JDK version you are using. Increase the code cache & thread stack size by setting jvm property like  and see if it helps
 -XX:InitialCodeCacheSize=196608 -Xss512k
Here are my java versions:
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b06)
Java HotSpot(TM) Server VM (build 23.1-b03, mixed mode)
It seems like this error occurs when a user tries to upload a large amount of assets to the dam at one time.