You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reproduce steps:
NOTE: I am using yocto project to build an image, which will using dnf to install some packages under rootfs. You
can see my attached log to see what it has done.
clean build, see log.do_rootfs.1.txt, count of ProcessLock all changed to 0, so log_lock.pid is unlinked
rebuild(change the packages installed to rootfs), see log.do_rootfs.2.txt, seems when there is log rotate, count of ProcessLock cannot changed to 0, so log_lock.pid is not unlinked. it is still there even after the build completed.
$ cat log_lock.pid
4053726
And I checked by ps command during build, pid 4053726 is the command in Line 42 of log log.do_rootfs.2.txt. And I checked that after build completed, there is no hanging dnf, all exited normally.
Seems like handling of "count of ProcessLock" is not proper. I add some debug message to the dnf, see 0001-debug.patch.txt.
maybe can help to debug this issue. You can see it from the log.
Before, when logdir is not writable, _try_lock will raise an Exception
like "Permission denied: '/var/log/log_lock.pid'", and in this case,
_unlock_thread will not be called and the variable count will not be
handled, it maybe cause log_lock.pid not be deleted in case like [1].
For [1], it is an cross compile case, when dnf install some packages to
rootfs, seems like some threads don't do chroot like work, some threads
do chroot like work. so for the threads don't do chroot, "Permission denied"
Exception happend, for the threads that do chroot, log_lock.pid will be
created under installroot/var/log/log_lock.pid, since variable count not
handled correct before, log_lock.pid may not be deleted correctly.
So fixed like this, if _try_lock raise Exception, _unlock_thread first,
then raise the Exception.
[1] rpm-software-management#1963
Signed-off-by: Changqing Li <[email protected]>
Version:
dnf 4.14.0
Reproduce steps:
NOTE: I am using yocto project to build an image, which will using dnf to install some packages under rootfs. You
can see my attached log to see what it has done.
$ cat log_lock.pid
4053726
And I checked by ps command during build, pid 4053726 is the command in Line 42 of log log.do_rootfs.2.txt. And I checked that after build completed, there is no hanging dnf, all exited normally.
Seems like handling of "count of ProcessLock" is not proper. I add some debug message to the dnf, see 0001-debug.patch.txt.
maybe can help to debug this issue. You can see it from the log.
log.do_rootfs.1.txt
log.do_rootfs.2.txt
0001-debug.patch.txt
The text was updated successfully, but these errors were encountered: