This hook is called like this:
do_action("{$new_status}_{$post->post_type}", $post->ID, $post);
My guess is that you should be using data passed as second $post
argument, rather than global.
So:
add_action('publish_post', 'publish_post', 10, 2 );
function publish_post($post_id, $post) {
// stuff