From pecquetj@jpe45305.homeunix.org  Sun Oct 26 14:36:46 2003
Return-Path: <pecquetj@jpe45305.homeunix.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 484EB16A4B3
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 26 Oct 2003 14:36:46 -0800 (PST)
Received: from jpe45305.homeunix.org (dhcp024-210-138-070.woh.rr.com [24.210.138.70])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 343F143FCB
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 26 Oct 2003 14:36:45 -0800 (PST)
	(envelope-from pecquetj@jpe45305.homeunix.org)
Received: from jpe45305.homeunix.org (localhost [127.0.0.1])
	by jpe45305.homeunix.org (8.12.8p2/8.12.8) with ESMTP id h9QMah2J083452
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 26 Oct 2003 17:36:43 -0500 (EST)
	(envelope-from pecquetj@jpe45305.homeunix.org)
Received: (from pecquetj@localhost)
	by jpe45305.homeunix.org (8.12.8p2/8.12.8/Submit) id h9QMacij083451;
	Sun, 26 Oct 2003 17:36:38 -0500 (EST)
Message-Id: <200310262236.h9QMacij083451@jpe45305.homeunix.org>
Date: Sun, 26 Oct 2003 17:36:38 -0500 (EST)
From: pecquetj <pecquetj@jpe45305.homeunix.org>
Reply-To: pecquetj <pecquetj@jpe45305.homeunix.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: System call hang 5.x triggered by gnunetd 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         58581
>Category:       kern
>Synopsis:       [hang] System call gettimeofday hang 5.x triggered by gnunetd
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 26 14:40:17 PST 2003
>Closed-Date:    Sun Jun 03 21:54:10 GMT 2007
>Last-Modified:  Sun Jun 03 21:54:10 GMT 2007
>Originator:     pecquetj
>Release:        FreeBSD 5.1 CURRENT i386
>Organization:
>Environment:
System: FreeBSD gnunet.woh.rr.com 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Sun Oct 26 11:49:08 EST 2003     root@gnunet.woh.rr.com:/usr/src/sys/i386/compile/GNUNET  i386


	
The system is an STB1030 (mediagx) running 5.1-CURRENT downloaded including libs and buildworled from cvs
>Description:
	
When running GNUnet after some random time it stops responding.  TOP indicates 100% system time utilization (0% user).  ktrace stops outputting at this point.  The last part of the ktrace dump is:
  5863 gnunetd  RET   read 1116/0x45c
  5863 gnunetd  CALL  gettimeofday(0xbfad64a8,0xbfad64b0)
  5863 gnunetd  RET   gettimeofday 0
  5863 gnunetd  CALL  break(0xd24c000)
  5863 gnunetd  RET   break 0
  5863 gnunetd  PSIG  SIGPROF caught handler=0x281e0ac0 mask=0x0 code=0x0
  5863 gnunetd  CALL  gettimeofday(0x281f1b18,0)
  5863 gnunetd  RET   gettimeofday 0
No further ktrace information is logged once this happens.
Compiling with INVARIENTS and WITNESS did not change this behavior or result in any logged errors.  gnunetd appears to be unable to respond to any signals except -9 at this point.
I attempted multiple updates of 5.1, starting from RELEASE through three updates of CURRENT with no change in behaviour.  If the system uses the TSC for the clock, the clock will stop when the above event occurs (i.e. the time in the upper right corner of top does not change, and date returns the same time over and over.)  Using i8254 for the clock seems to avoid this side effect, as the clock seems to be unaffected.  Attempting truss on gnunetd gives large numbers of WITNESS warnings that do not appear to be directly related to the problem:
Oct 26 10:00:02 gnunet kernel: Sleeping on "stopevent" with the following non-sleepable locks held:
Oct 26 10:00:02 gnunet kernel: exclusive sleep mutex sigacts r = 0 (0xc2c5faa8) locked @ /usr/src/sys/kern/subr_trap.c:260
Oct 26 10:00:02 gnunet kernel: Sleeping on "stopevent" with the following non-sleepable locks held:
Oct 26 10:00:02 gnunet kernel: exclusive sleep mutex sigacts r = 0 (0xc2c5faa8) locked @ /usr/src/sys/kern/subr_trap.c:260
Oct 26 10:00:02 gnunet kernel: Sleeping on "stopevent" with the following non-sleepable locks held:
Oct 26 10:00:02 gnunet kernel: exclusive sleep mutex sigacts r = 0 (0xc2c5faa8) locked @ /usr/src/sys/kern/subr_trap.c:260
Oct 26 10:00:02 gnunet kernel: Sleeping on "stopevent" with the following non-sleepable locks held:
Oct 26 10:00:02 gnunet kernel: exclusive sleep mutex sigacts r = 0 (0xc2c5faa8) locked @ /usr/src/sys/kern/subr_trap.c:260
>How-To-Repeat:
	
install /usr/ports/net/gnunet
create user for running gnunetd (say: gnucli)
su - gnucli
mkdir .gnunet
cp /usr/ports/net/gnunet/work/GNUnet-0.6.0/contrib/gnunet.conf ~/.gnunet
run gnunetd
use truss or ktrace if you feel like it
wait a while
it _always_ hangs as described above.
it sometimes hangs faster if you attempt to insert into the node:
gnunet-insert filename
>Fix:

	
>Release-Note:
>Audit-Trail:

From: Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
To: bug-followup@FreeBSD.org, pecquetj@jpe45305.homeunix.org
Cc:  
Subject: Re: kern/58581: [hang] System call gettimeofday hang 5.x triggered
 by gnunetd
Date: Sun, 3 Jun 2007 19:56:24 +0100 (BST)

 Hi,
 
 Can you tell me if you have seen the same issue on a later version of 
 FreeBSD?
 
 Thanks,
 
 Gavin
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Sun Jun 3 21:39:47 UTC 2007 
State-Changed-Why:  
Note that submitter has been asked for feedback. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58581 
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Sun Jun 3 21:53:50 UTC 2007 
State-Changed-Why:  
Submitter's email address bounces. 

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