From nobody@FreeBSD.org  Wed Feb 18 10:26:42 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C7E1810656C7
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 18 Feb 2009 10:26:42 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id B4D218FC14
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 18 Feb 2009 10:26:42 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n1IAQgEU053510
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 18 Feb 2009 10:26:42 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n1IAQgol053509;
	Wed, 18 Feb 2009 10:26:42 GMT
	(envelope-from nobody)
Message-Id: <200902181026.n1IAQgol053509@www.freebsd.org>
Date: Wed, 18 Feb 2009 10:26:42 GMT
From: Roy Badami <roy.badami@globalgraphics.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: network ups tools 2.4.0: upssched SEGVs on startup
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         131812
>Category:       ports
>Synopsis:       sysutils/nut: 2.4.0: upssched SEGVs on startup
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    beat
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 18 10:30:03 UTC 2009
>Closed-Date:    Fri Feb 20 17:53:52 UTC 2009
>Last-Modified:  Fri Feb 20 17:53:52 UTC 2009
>Originator:     Roy Badami
>Release:        7.1-RELEASE-p2
>Organization:
>Environment:
FreeBSD scram.cam.harlequin.co.uk 7.1-RELEASE-p2 FreeBSD 7.1-RELEASE-p2 #3: Fri Feb 13 10:18:43 GMT 2009     root@scram.cam.harlequin.co.uk:/usr/obj/usr/src/sys/SCRAM  i386
>Description:
In nut-2.4.0 installed from the sysutils/nut port, upssched appears to be non-functional (SEGV's when attempting to schedule an event.)
>How-To-Repeat:
Perform the following steps as root

1. Install nut-2.4.0 from ports.

2. Execute the following commands:
mkdir /var/db/nut/upssched
chown uucp:uucp /var/db/nut/upssched

3. If the upssched directory already existed, remove it's contents to avoid permissions or locking problems:
rm /var/db/nut/upssched/*

4. Create the file /usr/local/etc/nut/upssched.conf with the following contents:
======cut here==========
CMDSCRIPT /usr/bin/true
PIPEFN /var/db/nut/upssched/upssched.pipe
LOCKFN /var/db/nut/upssched/upssched.lock
AT ONBATT * START-TIMER mytimer 5
======cut here==========

5. Simulate upsched being called by upsmon by executing the command:
sh -c 'UPSNAME=test NOTIFYTYPE=ONBATT /usr/local/sbin/upssched "UPS on battery"'

6. Observe that upssched hangs for a while trying to start the daemon, and then SEGV's

7. Execute the command
tail /var/log/messages

8. Observe the log messages indicating that repeated attempts to fork the daemon resulted in SEGV.

9. Tidy up after ourselves:
rm /var/db/nut/upssched/*
>Fix:


>Release-Note:
>Audit-Trail:

From: Joerg Pulz <Joerg.Pulz@frm2.tum.de>
To: bug-followup@FreeBSD.org, roy.badami@globalgraphics.com
Cc:  
Subject: Re: ports/131812: sysutils/nut: 2.4.0: upssched SEGVs on startup
Date: Thu, 19 Feb 2009 13:18:27 +0100 (CET)

 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
 
 Dear Roy,
 
 thanks for reporting this issue.
 Can you verify that the procedure you mentioned in the PR works correct 
 for nut-2.2.0 or earlier and is not working since your upgrade to 2.4.0?
 
 Any additional informations are much appreciated.
 
 Thanks a lot and kind regards
 Joerg
 
 - -- 
 The beginning is the most important part of the work.
  				-Plato
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.9 (FreeBSD)
 
 iD8DBQFJnU4WSPOsGF+KA+MRAkKgAJ9ADnJo7mFAIoYX8j1/M+39qdv5uACfXVOc
 oL096UFSDU2Pq2zTAnfx2dU=
 =pquq
 -----END PGP SIGNATURE-----

From: Roy Badami <roy.badami@globalgraphics.com>
To: Joerg Pulz <Joerg.Pulz@frm2.tum.de>
Cc: bug-followup@FreeBSD.org, roy.badami@globalgraphics.com
Subject: Re: ports/131812: sysutils/nut: 2.4.0: upssched SEGVs on startup
Date: Thu, 19 Feb 2009 12:51:17 +0000

     Joerg> thanks for reporting this issue.  Can you verify that the
     Joerg> procedure you mentioned in the PR works correct for
     Joerg> nut-2.2.0 or earlier and is not working since your upgrade
     Joerg> to 2.4.0?
 
 I tested the above procedure on a 6.3-RELEASE-p3 machine running
 nut-2.0.4 and it completed without error.  And on that machine I also
 replaced the call to /usr/bin/true with a script that logs something
 and verified that the script really did get run 5 seconds after
 issuing the upssched command.
 
 So I'm reasonably confident that the above test procedure is valid.
 
     -roy
 
 
Responsible-Changed-From-To: freebsd-ports-bugs->beat 
Responsible-Changed-By: beat 
Responsible-Changed-When: Fri Feb 20 08:37:33 UTC 2009 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=131812 
State-Changed-From-To: open->closed 
State-Changed-By: beat 
State-Changed-When: Fri Feb 20 17:53:51 UTC 2009 
State-Changed-Why:  
Fixed by maintainer with ports/131885. Please update your portstree and 
update sysutils/nut. Thanks for reporting this problem! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=131812 
>Unformatted:
