Just noticed something else interesting. When running puppet apply or puppet agent and it doesn't hang, puppet only spawns 1 process and there is no puppet process left running afterwards, it seems to clean itself up and die off. When puppet runs and hangs, it spawns 2 processes each looking identical with the same name and even though the output from puppet apply or agent says it finished running (after letting it timeout on the hang) it leaves 1 process behind still running. I attached strace to this running process and the output looks like so:
pid 61271] futex(0x7f5e2454b6a0, FUTEX_WAIT_PRIVATE, 2, {0, 263395792}) = -1 ETIMEDOUT (Connection timed out)
[pid 61271] futex(0x7f5e2454b6a0, FUTEX_WAIT_PRIVATE, 2, {0, 248281920}) = -1 ETIMEDOUT (Connection timed out)
[pid 61271] futex(0x7f5e2454b6a0, FUTEX_WAIT_PRIVATE, 2, {0, 170310944}) = -1 ETIMEDOUT (Connection timed out)
[pid 61271] futex(0x7f5e2454b6a0, FUTEX_WAIT_PRIVATE, 2, {0, 199996576}) = -1 ETIMEDOUT (Connection timed out)
[pid 61271] futex(0x7f5e2454b6a0, FUTEX_WAIT_PRIVATE, 2, {0, 244956432}) = -1 ETIMEDOUT (Connection timed out)
[pid 61271] futex(0x7f5e2454b6a0, FUTEX_WAIT_PRIVATE, 2, {0, 141958480}) = -1 ETIMEDOUT (Connection timed out)
[pid 61271] futex(0x7f5e2454b6a0, FUTEX_WAIT_PRIVATE, 2, {0, 22737840}) = -1 ETIMEDOUT (Connection timed out)
[pid 61271] futex(0x7f5e2454b6a0, FUTEX_WAIT_PRIVATE, 2, {0, 78315952}) = -1 ETIMEDOUT (Connection timed out)
and as best as I can tell it would just keep repeating that indefinitely.
This seems quite odd to me and has to be related in some way but I'm not sure how.