# Async debug help?

**URL:** <https://forum.ansible.com/t/async-debug-help/11334>\
**Category:** Ansible Project\
**Created:** [March 11, 2012, 10:29pm UTC](https://forum.ansible.com/t/async-debug-help/11334 "2012-03-11T22:29:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [March 11, 2012, 10:29pm UTC](https://forum.ansible.com/t/async-debug-help/11334/1 "2012-03-11T22:29:22Z")

</div>

Hey folks,

I’m adding some logic to do async polling (which looks fine, for logic, anyway) to the app.

I’m noticing that when I launch something via async wrapper directly things work as expected and things background

./library/async\_wrapper 12345 30 /library/command /bin/sleep 30

But when run from paramiko, things block

ansible -B 30 -a “/bin/sleep 30”

Can someone take a look at this and see what async\_wrapper might need to do to daemonize better? I have some daemonization code from cobbler I could try to adopt (if needed), but I suspect “exec\_command” in paramiko is trying to be clever.

FYI async polling every 5 seconds with a limit of 30 seconds total will look like this: ansible -B 30 -P 5 -a “/bin/sleep 30”

I’ll commit the polling logic shortly regardless as it’s separate from the issue of why things are blocking.

–Michael

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [March 11, 2012, 11:00pm UTC](https://forum.ansible.com/t/async-debug-help/11334/2 "2012-03-11T23:00:37Z")

</div>

Looks like the kid was printing instead of the parent. Still looking into it 🙂

–Michael
