Sometimes we experience locking issue while trying to connect with yum repository or yum server and during that time won’t be able to execute any command related to yum and the kernel keep giving us the message of locking. so, to resolve this issue we’ve to kill the session first which is holding the lock.
Impact: Since the yum.pid is already
holding a lock due to which admin would not be able to execute any command
related to yum, so there is not impact in killing the yum.pid.
[root@ORATEST ~]# yum repolist
Loaded plugins: langpacks, ulninfo
Existing lock /var/run/yum.pid: another copy is running as pid
27631.
Another app is currently holding the yum lock; waiting for it
to exit...
The other application
is: yum
Memory : 97 M RSS (500 MB VSZ)
Started: Sun
Sep 1 15:36:17 2024 - 00:03 ago
State : Running,
pid: 27631
Another app is currently holding the yum lock;
waiting for it to exit...
The other application
is: yum
Memory : 157 M RSS
(564 MB VSZ)
Started: Sun
Sep 1 15:36:17 2024 - 00:05 ago
State : Running,
pid: 27631
NOTE: Usually, we get the pid related info while kernel giving the message of yum lock, however we can also check or cross check from our own as well.
Find Yum Related
Session
[root@ORATEST yum.repos.d]#
ps aux | grep yum | grep -v grep
root 27631 9.8
8.6 748168 314816 ? SN 11:55
0:24 /usr/bin/python /usr/share/PackageKit/helpers/yum/yumBackend.py
get-updates none
OR
[root@ORATEST ~]# cat /var/run/yum.pid
27631