I think there is a race condition here, although you didn't cause it.  Between releasing the sem, cleaning up the atoms and fetching the result.  It looks like it is possible on a timeout that the sem will be released but by the time the thrift thread actually wakes up the result may have been removed, causing a null to be returned instead of an exception being thrown.

I am mostly curious if you have seen this happen in practice, because you are fixing issues related to timeouts.  Either way I think I will file a JIRA for this.