portupgrade -a and now ** Stale lock file was found. Removed.

Hi all,

My portupgrade -a upgraded the ruby today.
Now every time i run portupgrade -a i get "** Stale lock file was found. Removed."
See below.

Any sugestion why?

Jan

Code:
===>   Compressing manual pages for ruby-1.8.7.160,1
===>   Running ldconfig
/sbin/ldconfig -m /usr/local/lib
===>   Registering installation for ruby-1.8.7.160,1
===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/lib/ruby/1.8/i386-freebsd7/socket.so

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage:
[url]http://www.ruby-lang.org/en/[/url]
===>  Cleaning for ruby-1.8.7.160,1
--->  Cleaning out obsolete shared libraries
[Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 124 packages found (-0 +1) . done]
[root@netmon ~]# portupgrade -a
** Stale lock file was found. Removed.
[root@netmon ~]# portupgrade -a
** Stale lock file was found. Removed.
[root@netmon ~]#
 
The portupgrade database lock file is /var/run/pkgdb.db.lock. I think it determines staleness just by age; anything over two minutes old is considered stale, so it's not really that sophisticated.

If you're sure there's nothing from the portupgrade suite running at the moment, then the message is harmless, if annoying. I haven't seen this except when I break out of a portupgrade run in the middle, so I can't play with it myself to try to diagnose.

One thing I notice is that the clearing of the lock file doesn't have a lot of error checking. This may mean that the file isn't really being removed when it says it is. Try removing the file by hand and see if the message continues to appear.
 
janroc said:
Hi all,

My portupgrade -a upgraded the ruby today.
Now every time i run portupgrade -a i get "** Stale lock file was found. Removed."
It's the same for me.
I had no time to investigate further.
 
Deleting those lock files doesn't fix the issue. They're recreated, but not actually deleted once the portupgrade tools finish their tasks.
 
Back
Top