# How to trace and examine a hanging task?

**URL:** <https://forum.ansible.com/t/how-to-trace-and-examine-a-hanging-task/20524>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [February 10, 2016, 8:27pm UTC](https://forum.ansible.com/t/how-to-trace-and-examine-a-hanging-task/20524 "2016-02-10T20:27:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Steinbach](https://avatars.discourse-cdn.com/v4/letter/t/df788c/32.png) [@Thomas\_Steinbach](https://forum.ansible.com/u/Thomas_Steinbach)\
**Post date:** [February 10, 2016, 8:27pm UTC](https://forum.ansible.com/t/how-to-trace-and-examine-a-hanging-task/20524/1 "2016-02-10T20:27:55Z")

</div>

Hello,

I am executing a huge playbook, which is hanging on following task:

`

- name: create default DVC  
docker:  
name: “{{ dapp\_name }}-dvc”  
image: “{{ dapp\_image }}:{{ dapp\_version }}”  
state: present

`

By executing ps aux | grep vagrant that Ansible would processing following Python file:

`  
vagrant 8260 0.0 0.5 55516 15976 pts/0 S+ 18:33 0:00 /usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1455129213.02-267359423089921/docker

`

**Question:** Is there a possibility to trace back, why or at which point the execution of this script is hanging? Is there a possibility to reveal the past output of the process?

What I found out till now: I executed the python script manually and it immediately throws following error and hangs:

`

vagrant@vagrant-ubuntu-trusty-64:/tmp$ /usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1455129213.02-267359423089921/docker  
/usr/local/lib/python2.7/dist-packages/docker/utils/utils.py:565: UserWarning: docker.utils.create\_host\_config() is deprecated. Please use Client.create\_host\_config() instead.  
'docker.utils.create\_host\_config() is deprecated. Please use ’

`

This is the exact output of the execution. There is no more output but the cursor remains blinking and the script hangs. By the way, i am using the latest docker-py from pip:

`

vagrant@vagrant-ubuntu-trusty-64:/tmp$ pip show docker-py

---

<div class="post-metadata">

**Author:** ![Thomas\_Steinbach](https://avatars.discourse-cdn.com/v4/letter/t/df788c/32.png) [@Thomas\_Steinbach](https://forum.ansible.com/u/Thomas_Steinbach)\
**Post date:** [February 10, 2016, 10:23pm UTC](https://forum.ansible.com/t/how-to-trace-and-examine-a-hanging-task/20524/2 "2016-02-10T22:23:37Z")

</div>

This is not the answer to my question but I identified, why my playbook was hanging. The prablem was that docker hangs on pulling the image. I restarted the docker daemon and everything went fine.

Not that satisfying but a lesson learned.
