portupgrade/ruby issue? (Stale lock file was found. Removed.)

2009-06-17 Thread Andriy Gapon

After recent massive ports update (I think ruby was touch and probably 
portupgrade
too) I started getting seemingly sporadic Stale lock file was found. Removed.
messages. What's interesting is that those messages are produced on stdout, not
stderr.

Sporadic - because they appear when there are no parallel execution of any
portupgrade tools (or any other package/port related tools). They appear in
situations wheere they never appeared before.

I see this on two stable/7 systems.

-- 
Andriy Gapon
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: portupgrade/ruby issue? (Stale lock file was found. Removed.)

2009-06-17 Thread Tobias lott


On Wed, 17 Jun 2009 12:16:46 +0300
Andriy Gapon a...@icyb.net.ua wrote:

 
 After recent massive ports update (I think ruby was touch and
 probably portupgrade too) I started getting seemingly sporadic Stale
 lock file was found. Removed. messages. What's interesting is that
 those messages are produced on stdout, not stderr.
 
 Sporadic - because they appear when there are no parallel execution
 of any portupgrade tools (or any other package/port related tools).
 They appear in situations wheere they never appeared before.
 
 I see this on two stable/7 systems.
 

Got the same on five 7-Stable Machines.

-- 
Tobias Lott
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: portupgrade/ruby issue? (Stale lock file was found. Removed.)

2009-06-17 Thread Robert Huff

Tobias lott writes:

   After recent massive ports update (I think ruby was touch and
   probably portupgrade too) I started getting seemingly sporadic Stale
   lock file was found. Removed. messages. What's interesting is that
   those messages are produced on stdout, not stderr.
   
   Sporadic - because they appear when there are no parallel execution
   of any portupgrade tools (or any other package/port related tools).
   They appear in situations wheere they never appeared before.
   
   I see this on two stable/7 systems.
  
  Got the same on five 7-Stable Machines.

And on -Current from April.  So, not a function of the OS version.
Mine happens every time I run portupgrade/portversion, even
when prior runs completed successfully.
It seems harmless, but it would be Really Nice if it were
fixed.


Robert Huff

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: portupgrade/ruby issue? (Stale lock file was found. Removed.)

2009-06-17 Thread Sergey V. Dyatko
В Wed, 17 Jun 2009 13:32:31 +0200
Tobias lott tl...@gamesnet.de пишет:

TL 
TL 
TL On Wed, 17 Jun 2009 12:16:46 +0300
TL Andriy Gapon a...@icyb.net.ua wrote:
TL 
TL  
TL  After recent massive ports update (I think ruby was touch and
TL  probably portupgrade too) I started getting seemingly sporadic
TL  Stale lock file was found. Removed. messages. What's
TL  interesting is that those messages are produced on stdout, not
TL  stderr.
TL  
TL  Sporadic - because they appear when there are no parallel
TL  execution of any portupgrade tools (or any other package/port
TL  related tools). They appear in situations wheere they never
TL  appeared before.
TL  
TL  I see this on two stable/7 systems.
TL  
TL 
TL Got the same on five 7-Stable Machines.
TL 
+2 -CURRENT


--
wbr, tiger
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: portupgrade/ruby issue? (Stale lock file was found. Removed.)

2009-06-17 Thread Lowell Gilbert
Robert Huff roberth...@rcn.com writes:

 Tobias lott writes:

   After recent massive ports update (I think ruby was touch and
   probably portupgrade too) I started getting seemingly sporadic Stale
   lock file was found. Removed. messages. What's interesting is that
   those messages are produced on stdout, not stderr.
   
   Sporadic - because they appear when there are no parallel execution
   of any portupgrade tools (or any other package/port related tools).
   They appear in situations wheere they never appeared before.
   
   I see this on two stable/7 systems.
  
  Got the same on five 7-Stable Machines.

   And on -Current from April.  So, not a function of the OS version.
   Mine happens every time I run portupgrade/portversion, even
 when prior runs completed successfully.
   It seems harmless, but it would be Really Nice if it were
 fixed.

Not *completely* harmless; running separate portupgrade processes in
parallel is pretty risky at the moment...
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: portupgrade/ruby issue? (Stale lock file was found. Removed.)

2009-06-17 Thread Robert Huff

Lowell Gilbert writes:
 After recent massive ports update (I think ruby was touch and
 probably portupgrade too) I started getting seemingly sporadic Stale
 lock file was found. Removed. messages. What's interesting is that
 those messages are produced on stdout, not stderr.

Got the same on five 7-Stable Machines.
  
  And on -Current from April.  So, not a function of the OS version.
  Mine happens every time I run portupgrade/portversion, even
   when prior runs completed successfully.
  It seems harmless, but it would be Really Nice if it were
   fixed.
  
  Not *completely* harmless; running separate portupgrade processes
  in parallel is pretty risky at the moment...

When was it officually cleared to do that?  Last I knew it was
do at your own risk.


Robert Huff





___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: portupgrade/ruby issue? (Stale lock file was found. Removed.)

2009-06-17 Thread Lowell Gilbert
Robert Huff roberth...@rcn.com writes:

 Lowell Gilbert writes:
 After recent massive ports update (I think ruby was touch and
 probably portupgrade too) I started getting seemingly sporadic Stale
 lock file was found. Removed. messages. What's interesting is that
 those messages are produced on stdout, not stderr.

Got the same on five 7-Stable Machines.
  
 And on -Current from April.  So, not a function of the OS version.
 Mine happens every time I run portupgrade/portversion, even
   when prior runs completed successfully.
 It seems harmless, but it would be Really Nice if it were
   fixed.
  
  Not *completely* harmless; running separate portupgrade processes
  in parallel is pretty risky at the moment...

   When was it officually cleared to do that?  Last I knew it was
 do at your own risk.

I don't think it was ever officially supported, but it was the purpose
behind adding the lock files in the first place.  I've never used it
heavily, although I did put it through a fairly heavy wringer when it
was under development.

For real use, I've found it convenient when building an upgrade to a
particularly large port (generally OpenOffice) while upgrading a large
number of other ports as well.  I don't worry about it being foolproof,
because my build server has nothing fundamentally valuable on it.  But
at the moment, the locking seems to be completely broken, which raises
it to a whole other level of risk that I can't be bothered to mess
with.  [Not that I generally care how long port builds take; that's
computer time, not human time.]

 - Lowell

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: portupgrade/ruby issue? (Stale lock file was found. Removed.)

2009-06-17 Thread Hiroto Kagotani
2009/6/17 Andriy Gapon a...@icyb.net.ua:

 After recent massive ports update (I think ruby was touch and probably 
 portupgrade
 too) I started getting seemingly sporadic Stale lock file was found. 
 Removed.
 messages.

It is probably caused by ruby-1.8.7's bug fogetting to call finalizers.
This is filed as Bug #1556 (http://redmine.ruby-lang.org/issues/show/1556
... japanese page; please translate it ;)

Workaround for the case may be using at_exit instead of finalizers.
My sample fix is:

--- pkgdb.rb.orig   2009-04-14 16:56:38.0 +0900
+++ pkgdb.rb2009-06-18 01:49:19.0 +0900
@@ -103,8 +103,8 @@
 #end
   end

-  def PkgDB.finalizer
-Proc.new {
+  def PkgDB.define_at_exit
+at_exit {
   PkgDBTools.remove_lock(LOCK_FILE)
 }
   end
@@ -113,7 +113,7 @@
 @db = nil
 @lock_file = Process.euid == 0 ? LOCK_FILE : nil
 @db_version = DB_VERSION
-ObjectSpace.define_finalizer(self, PkgDB.finalizer)
+PkgDB.define_at_exit
 setup(*args)
   end

--- portsdb.rb.orig 2009-04-14 16:56:38.0 +0900
+++ portsdb.rb  2009-06-18 01:49:04.0 +0900
@@ -153,8 +153,8 @@
 end
   end

-  def PortsDB.finalizer
-Proc.new {
+  def PortsDB.define_at_exit
+at_exit {
   PkgDBTools.remove_lock(LOCK_FILE)
 }
   end
@@ -163,7 +163,7 @@
 @db = nil
 @lock_file = Process.euid == 0 ? LOCK_FILE : nil
 @db_version = DB_VERSION
-ObjectSpace.define_finalizer(self, PortsDB.finalizer)
+PortsDB.define_at_exit
 set_ports_dir(alt_ports_dir)
 set_db_dir(alt_db_dir)
 set_db_driver(alt_db_driver)


-- 
Hiroto Kagotani
hiroto.kagot...@gmail.com
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org