# ansible hung by yum module

**URL:** <https://forum.ansible.com/t/ansible-hung-by-yum-module/19614>\
**Category:** Ansible Project\
**Created:** [October 26, 2015, 8:06am UTC](https://forum.ansible.com/t/ansible-hung-by-yum-module/19614 "2015-10-26T08:06:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andy3](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@Andy3](https://forum.ansible.com/u/Andy3)\
**Post date:** [October 26, 2015, 8:06am UTC](https://forum.ansible.com/t/ansible-hung-by-yum-module/19614/1 "2015-10-26T08:06:12Z")

</div>

Hi expert,  
During use ansible to update package on all the hosts by yum module, ansible will hung at the end, below is the command I run:

**ansible devstack -m yum -a “name=wget state=latest” -vvvv**

devstack is a group which contain about 70 IP.

Any method I can try to debug this issue?

-BR,  
Andy

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [October 26, 2015, 6:08pm UTC](https://forum.ansible.com/t/ansible-hung-by-yum-module/19614/2 "2015-10-26T18:08:34Z")

</div>

check on the target machine on which it is stuck, is yum itself stuck?  
are there resource issues? what is the ansible process there stuck on  
(strace)?

---

<div class="post-metadata">

**Author:** ![Toshio\_Kuratomi](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@Toshio\_Kuratomi](https://forum.ansible.com/u/Toshio_Kuratomi)\
**Post date:** [October 26, 2015, 10:16pm UTC](https://forum.ansible.com/t/ansible-hung-by-yum-module/19614/3 "2015-10-26T22:16:51Z")

</div>

Also are you using 1.9.4 or a checkout/beta of 2.0 and do you have the  
rhn-plugin enabled? I just closed a ticket for 1.9.x where the  
culprit was repoquery. In 2.0 we make much less frequent use of  
repoquery so it's possible that the 2.0 module has "fixed" this. If  
it is also repoquery here, you might have to pursue a bugfix with the  
repoquery authors.

-Toshio

---

<div class="post-metadata">

**Author:** ![Andy3](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@Andy3](https://forum.ansible.com/u/Andy3)\
**Post date:** [October 28, 2015, 9:58am UTC](https://forum.ansible.com/t/ansible-hung-by-yum-module/19614/4 "2015-10-28T09:58:08Z")

</div>

Yes, you are right, ansible stuck on a target two machines, and I attach to the process on one of the machine but no useful information I can get:

`  
[root@meil-juno ~]# ps axu | grep ansible  
root 31477 0.0 0.1 259388 22940 ? S 09:19 0:00 /usr/bin/python -tt /root/.ansible/tmp/ansible-tmp-1446023983.89-103656620169766/yum  
root 31559 0.0 0.0 113116 1200 pts/1 Ss+ 09:22 0:00 /bin/sh -c LANG=C LC\_CTYPE=C /usr/bin/python -tt /root/.ansible/tmp/ansible-tmp-1446024152.45-82112154264775/yum; rm -rf /root/.ansible/tmp/ansible-tmp-1446024152.45-82112154264775/ \>/dev/null 2\>&1  
root 31570 0.0 0.1 259388 22936 pts/1 S+ 09:22 0:00 /usr/bin/python -tt /root/.ansible/tmp/ansible-tmp-1446024152.45-82112154264775/yum  
root 31913 0.0 0.0 112640 968 pts/2 S+ 09:51 0:00 grep --color=auto ansible[root@meil-juno ~]# strace -p 31477  
Process 31477 attached  
fcntl(4, F\_SETLKW, {type=F\_WRLCK, whence=SEEK\_SET, start=0, len=0}

^CProcess 31477 detached  
\<detached …\>  
[root@meil-juno ~]# strace -p 31570  
Process 31570 attached  
fcntl(4, F\_SETLKW, {type=F\_WRLCK, whence=SEEK\_SET, start=0, len=0}  
`

No more output there, so do you have any idea to debug this problem?  
BTW, my ansible version is: 1.9.4

-BR,  
Andy

在 2015年10月27日星期二 UTC+8上午2:08:38，Brian Coca写道：

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [October 28, 2015, 12:24pm UTC](https://forum.ansible.com/t/ansible-hung-by-yum-module/19614/5 "2015-10-28T12:24:58Z")

</div>

the processes are stuck waiting for a lock, the package database is  
the most probable culprit. check if any other process is running yum  
or rpm.

You can check te eexact file locked using `lsof -p \<pid\>` and check  
for the 4 descriptor.
