Here's my two, not very thorough, cents:
(1) The odds of a bug in Optim.jl are very high (>90%).
(2) The odds of a bug in your code are very high (>90%).
It's pretty easy to make a decision about (2). Deciding on (1) is a lot harder, since you need a specific optimization that Optim should solve, but fails to solve.
For resolving (2), you have a couple of sub-problems:
(a) Is your gradient analytically correct? You can check this by comparing it with finite differencing. If it doesn't produce a close match, be suspicious.
(b) Is your log likelihood + gradient numerically correct? Your stress test is, in theory, an attempt to test this. But numerical instability implies that the problem only occurs when the problem is likely to be numerically unstable. So you'd want to measure the correlation between the difficulty of the problem and the probability of failure.
My experience is that the Optim error messages don't make it easy to realize when you've made a mistake in your gradients. This is being worked on at the moment, but I think someone would need to dedicate a week to working on this to get us to a point where the error messages are always clear.
-- John