From wollman@truechimer.csail.mit.edu  Mon Apr 14 22:33:37 2014
Return-Path: <wollman@truechimer.csail.mit.edu>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 84F8E435
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 14 Apr 2014 22:33:37 +0000 (UTC)
Received: from truechimer.csail.mit.edu (truechimer.csail.mit.edu [128.30.2.89])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client did not present a certificate)
	by mx1.freebsd.org (Postfix) with ESMTPS id 35CF015EA
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 14 Apr 2014 22:33:36 +0000 (UTC)
Received: from truechimer.csail.mit.edu (localhost [127.0.0.1])
	by truechimer.csail.mit.edu (8.14.7/8.14.7) with ESMTP id s3EMXZtA083036
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 14 Apr 2014 18:33:35 -0400 (EDT)
	(envelope-from wollman@truechimer.csail.mit.edu)
Received: (from wollman@localhost)
	by truechimer.csail.mit.edu (8.14.7/8.14.7/Submit) id s3EMXZN4083035;
	Mon, 14 Apr 2014 18:33:35 -0400 (EDT)
	(envelope-from wollman)
Message-Id: <201404142233.s3EMXZN4083035@truechimer.csail.mit.edu>
Date: Mon, 14 Apr 2014 18:33:35 -0400 (EDT)
From: Garrett Wollman <wollman@csail.mit.edu>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: net/freeradius3 does not exit cleanly
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         188632
>Category:       ports
>Synopsis:       net/freeradius3 does not exit cleanly
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    zi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 14 22:40:00 UTC 2014
>Closed-Date:    Mon May 12 11:12:37 UTC 2014
>Last-Modified:  Tue May 13 21:10:00 UTC 2014
>Originator:     Garrett Wollman
>Release:        FreeBSD 9.2-RELEASE-p3 amd64
>Organization:
MIT Computer Science & Artificial Intelligence Laboratory
>Environment:
System: FreeBSD truechimer.csail.mit.edu 9.2-RELEASE-p3 FreeBSD 9.2-RELEASE-p3 #3 r260650M: Tue Jan 14 17:08:30 EST 2014 wollman@xyz.csail.mit.edu:/usr/obj/usr/src/sys/CSAIL amd64

freeradius3-3.0.2_1            A free RADIUS server implementation

>Description:

Attempting to stop radiusd using SIGTERM doesn't work.  The init
script hangs indefinitely waiting for radiusd to exit, which it never
does.  Sending a SIGINT successfully terminates the process.

After radiusd has been sent a SIGTERM, it is in the following state:

# procstat -t 81522
  PID    TID COMM             TDNAME           CPU  PRI STATE   WCHAN    
81522 100229 radiusd          -                  2  152 sleep   usem      
81522 100579 radiusd          -                  1  152 sleep   usem      
81522 100724 radiusd          -                  5  152 sleep   select    
81522 101283 radiusd          -                  4  152 sleep   usem      
81522 101284 radiusd          -                  4  152 sleep   usem      
81522 101285 radiusd          -                  3  120 sleep   usem      

procstat -j reports no signals pending on any thread.  procstat -i
says that SIGINT, SIGHUP, SIGQUIT, SIGABRT, SIGBUS, SIGSEGV, and
SIGTERM are all caught.  Kernel stacks are uninteresting:

# procstat -kk 81522
  PID    TID COMM             TDNAME           KSTACK                       
81522 100229 radiusd          -                mi_switch+0x194 sleepq_catch_signals+0x343 sleepq_wait_sig+0xc _sleep+0x2a5 do_sem_wait+0xa46 __umtx_op_sem_wait+0x5e amd64_syscall+0x5ea Xfast_syscall+0xf7 
81522 100579 radiusd          -                mi_switch+0x194 sleepq_catch_signals+0x343 sleepq_wait_sig+0xc _sleep+0x2a5 do_sem_wait+0xa46 __umtx_op_sem_wait+0x5e amd64_syscall+0x5ea Xfast_syscall+0xf7 
81522 100724 radiusd          -                mi_switch+0x194 sleepq_catch_signals+0x343 sleepq_wait_sig+0xc _cv_wait_sig+0x12a seltdwait+0xf6 kern_select+0x6ef sys_select+0x5d amd64_syscall+0x5ea Xfast_syscall+0xf7 
81522 101283 radiusd          -                mi_switch+0x194 sleepq_catch_signals+0x343 sleepq_wait_sig+0xc _sleep+0x2a5 do_sem_wait+0xa46 __umtx_op_sem_wait+0x5e amd64_syscall+0x5ea Xfast_syscall+0xf7 
81522 101284 radiusd          -                mi_switch+0x194 sleepq_catch_signals+0x343 sleepq_wait_sig+0xc _sleep+0x2a5 do_sem_wait+0xa46 __umtx_op_sem_wait+0x5e amd64_syscall+0x5ea Xfast_syscall+0xf7 
81522 101285 radiusd          -                mi_switch+0x194 sleepq_catch_signals+0x343 sleepq_wait_sig+0xc _sleep+0x2a5 do_sem_wait+0xa46 __umtx_op_sem_wait+0x5e amd64_syscall+0x5ea Xfast_syscall+0xf7 

>How-To-Repeat:

service radiusd stop
wait...wait...wait...give up

>Fix:

unknown
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->zi 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Apr 14 22:40:03 UTC 2014 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=188632 

From: Ryan Steinmetz <zi@FreeBSD.org>
To: Garrett Wollman <wollman@csail.mit.edu>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: ports/188632: net/freeradius3 does not exit cleanly
Date: Sun, 20 Apr 2014 14:55:56 -0400

 Has this bug been opened upstream with the FreeRADIUS developers?
 
 https://github.com/FreeRADIUS/freeradius-server
 
 -r
State-Changed-From-To: open->closed 
State-Changed-By: zi 
State-Changed-When: Mon May 12 11:12:36 UTC 2014 
State-Changed-Why:  
No response from submitter in 20+ days. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=188632 

From: Garrett Wollman <wollman@csail.mit.edu>
To: zi@FreeBSD.org
Cc: bug-followup@freebsd.org
Subject: Re: ports/188632: net/freeradius3 does not exit cleanly
Date: Tue, 13 May 2014 17:00:32 -0400

 <<On Mon, 12 May 2014 11:12:36 GMT, zi@FreeBSD.org said:
 
 > No response from submitter in 20+ days.
 
 What was the question?
 
 -GAWollman
>Unformatted:
