From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Jun 11 07:00:06 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91B381065676 for ; Thu, 11 Jun 2009 07:00:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6E8998FC0A for ; Thu, 11 Jun 2009 07:00:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n5B706Ws069549 for ; Thu, 11 Jun 2009 07:00:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n5B706ZE069548; Thu, 11 Jun 2009 07:00:06 GMT (envelope-from gnats) Resent-Date: Thu, 11 Jun 2009 07:00:06 GMT Resent-Message-Id: <200906110700.n5B706ZE069548@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Virgil Champlin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23B7E106564A for ; Thu, 11 Jun 2009 06:54:35 +0000 (UTC) (envelope-from champlin@stupidog.org) Received: from whisper.stupidog.org (adsl-63-193-245-15.dsl.snfc21.pacbell.net [63.193.245.15]) by mx1.freebsd.org (Postfix) with ESMTP id 027C08FC16 for ; Thu, 11 Jun 2009 06:54:34 +0000 (UTC) (envelope-from champlin@stupidog.org) Received: by whisper.stupidog.org (Postfix, from userid 1000) id 090BF12B08A; Wed, 10 Jun 2009 23:37:18 -0700 (PDT) Message-Id: <20090611063718.090BF12B08A@whisper.stupidog.org> Date: Wed, 10 Jun 2009 23:37:18 -0700 (PDT) From: Virgil Champlin To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/135466: portupgrade leaves orphaned lock files since ruby 1.8.7p160 upgrade X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Virgil Champlin List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2009 07:00:07 -0000 >Number: 135466 >Category: ports >Synopsis: portupgrade leaves orphaned lock files since ruby 1.8.7p160 upgrade >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jun 11 07:00:05 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Virgil Champlin >Release: FreeBSD 7.2-RELEASE amd64 >Organization: Stupidog.org >Environment: System: FreeBSD whisper.stupidog.org 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 8 00:18:37 PDT 2009 root@whisper.stupidog.org:/usr/obj/usr/src/sys/STUPIDOG amd64 >Description: Since the ruby-1.8.7.160,1 upgrade, ports-mgmt/portupgrade utilities will fail to remove their lock files /var/run/pkgdb.db.lock and /var/run/portsdb.lock. Subsequent invocations more than 2 minutes later will display the warning "** Stale lock file was found. Removed.". This is caused by the failure of the new version of ruby to run the finalizers for the classes PkgDB (/usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb - line 106) and PortsDB (/usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb - line 156). Their sole function is to remove the lock files. >How-To-Repeat: Any invocation of portupgrade with the current version of lang/ruby18 (ruby-1.8.7p160) should leave the aforementioned orphaned lock files. The following works well on my systems. sudo portupgrade -f ports-mgmt/portupgrade >Fix: I'm sorry but I know next to nothing about Ruby so this is well above me. One obvious but marginal suggestion is to revert to the previous version of lang/ruby18 (ruby-1.8.7p72). This assumes it's a new bug in Ruby and needs a followup bug report submitted to them. I would be happy to help but I'm too unfamiliar to make this call. For all I know, it has something to do with with a subtlety of Ruby finalizers and it is now working correctly. Another suggestion is to review the locking strategy in the portupgrade suite and eliminate its dependence on finalizers. That is their sole purpose for these classes and coming from Java[TM], I'm inclined to avoid finalizers. I would be glad to help but I wouldn't let me make the decision. >Release-Note: >Audit-Trail: >Unformatted: