Hi Karthikeyan
This error comes when a method gives a type E message in a background task or some FM Exception is thrown.
If it's a custom method, try adding workflow exceptions and pass back the error so that you can see it in the log.
As Anjan mentioned, the most possible cause is locking because , as you said, that on re-execution, the error does not occurs.
Regards,
Modak