Lock() may return an error in extreme cases