03-28-2017, 08:22 PM
[member=2]Jerry[/member],
I'm not sure that /usr/local/sbin/updatesnotify is the cause of the issue... and test -e ["/var/lib/dpkg/lock"] || rm -rf /var/lib/dpkg/lock may not be the solution after all. This should be used as last resort. If we use this carelessly we can end up with a broken system. I'm under the impression that this is a Ubuntu based related issue. Maybe we should not do test -e ["/var/lib/dpkg/lock"] || rm -rf /var/lib/dpkg/lock after all... it is considered dangerous. The lock is placed when an apt process is running, and it is removed when the process completes. If there is a lock with no apparent process running, this may mean the process got stuck for some reason. Logout and login or reboot is a better way to handle it. And ultimately, finding which process is the root of he issue is the best solution.
What it's causing it I don't know, but I'm pretty sure it is not updatesnotify (see below). I have both lock in my system:
/var/cache/apt/archives/lock
/var/lib/dpkg/lock
... and I cannot reproduce the issue even if I attempt to run updates as soon as the notification pops up.
I'm under the impression (and I'm talking out of my elbow here) that the issue was likely a hanged apt process in the system where that happened. I've ran updatesnotify with synaptic open and even that does not cause the lock issue.
https://unlockforus.com/downloads/linuxlite/lock.mp4
My 2 cents :)
https://unlockforus.com/downloads/linuxl...naptic.mp4
I'm not sure that /usr/local/sbin/updatesnotify is the cause of the issue... and test -e ["/var/lib/dpkg/lock"] || rm -rf /var/lib/dpkg/lock may not be the solution after all. This should be used as last resort. If we use this carelessly we can end up with a broken system. I'm under the impression that this is a Ubuntu based related issue. Maybe we should not do test -e ["/var/lib/dpkg/lock"] || rm -rf /var/lib/dpkg/lock after all... it is considered dangerous. The lock is placed when an apt process is running, and it is removed when the process completes. If there is a lock with no apparent process running, this may mean the process got stuck for some reason. Logout and login or reboot is a better way to handle it. And ultimately, finding which process is the root of he issue is the best solution.
What it's causing it I don't know, but I'm pretty sure it is not updatesnotify (see below). I have both lock in my system:
/var/cache/apt/archives/lock
/var/lib/dpkg/lock
... and I cannot reproduce the issue even if I attempt to run updates as soon as the notification pops up.
I'm under the impression (and I'm talking out of my elbow here) that the issue was likely a hanged apt process in the system where that happened. I've ran updatesnotify with synaptic open and even that does not cause the lock issue.
https://unlockforus.com/downloads/linuxlite/lock.mp4
My 2 cents :)
https://unlockforus.com/downloads/linuxl...naptic.mp4
https://unlockforus.com
Sorry for seeming stupid and preferring Linux - I just don't know any better.




![[Image: X5qGkCg.png]](https://imgur.com/X5qGkCg.png)
![[Image: 0op1GNe.png]](https://i.imgur.com/0op1GNe.png)
![[Image: LgJ2mtP.png]](https://i.imgur.com/LgJ2mtP.png)
![[Image: vLZcFUE.png]](https://imgur.com/vLZcFUE.png)
![[Image: lrUHro3.jpg]](https://i.imgur.com/lrUHro3.jpg)