From nobody@FreeBSD.org  Mon Oct 31 21:57:40 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 3618C16A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 31 Oct 2005 21:57:40 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 021AA43D45
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 31 Oct 2005 21:57:40 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j9VLvdB5070634
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 31 Oct 2005 21:57:39 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j9VLvddQ070632;
	Mon, 31 Oct 2005 21:57:39 GMT
	(envelope-from nobody)
Message-Id: <200510312157.j9VLvddQ070632@www.freebsd.org>
Date: Mon, 31 Oct 2005 21:57:39 GMT
From: Arjo Hooimeijer <arjo.hooimeijer@xs4all.nl>
To: freebsd-gnats-submit@FreeBSD.org
Subject: swapcontext fails with errno 0
X-Send-Pr-Version: www-2.3

>Number:         88299
>Category:       amd64
>Synopsis:       swapcontext fails with errno 0
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    linimon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 31 22:00:36 GMT 2005
>Closed-Date:    Thu Jun 07 23:05:21 GMT 2007
>Last-Modified:  Thu Jun 07 23:05:21 GMT 2007
>Originator:     Arjo Hooimeijer
>Release:        6.0-RC1
>Organization:
>Environment:
FreeBSD deathstar.starwars.nl.eu.org 6.0-RC1 FreeBSD 6.0-RC1 #0: Sun Oct 16 19:09:55 CEST 2005     root@yoda.starwars.nl.eu.org:/usr/obj/usr/src/sys/DEATHSTAR  amd64
              
>Description:
The dns/powerdns port contains a program 'pdns_recursor', which calls swapcontext. Sooner or later, swapcontext fails, but the error no is 0.

The error occurs when the following code is executed:
if(swapcontext(&d_kernel,i->second.context)) { // swaps back to the above point 'A'
   perror("swapcontext in schedule2");
   exit(EXIT_FAILURE);
}

The following error is logged:
swapcontext in schedule2: Unknown error: 0

>How-To-Repeat:
Install the powerdns port on 6.0-RC1 amd64 and run the pdns_recursor program.
The pdns_recursor program will just eventually stop. Or, to see it happen, run it with the switch: --daemon=no

>Fix:
              
>Release-Note:
>Audit-Trail:

From: David Xu <davidxu@freebsd.org>
To: bug-followup@FreeBSD.org,  arjo.hooimeijer@xs4all.nl
Cc:  
Subject: Re: amd64/88299: swapcontext fails with errno 0
Date: Fri, 03 Feb 2006 13:06:26 +0800

 I have committed a change in -HEAD, file /usr/src/sys/amd64/amd64/machdep.c,
 revision 1.646, I suspect this change may have fixed the problem.
 
 David Xu
 
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Sat Jun 2 19:38:40 UTC 2007 
State-Changed-Why:  
To submitter: did davidxu's patch fix this problem for you? 


Responsible-Changed-From-To: freebsd-amd64->linimon 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Jun 2 19:38:40 UTC 2007 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=88299 
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Thu Jun 7 23:05:02 UTC 2007 
State-Changed-Why:  
Submitter notes problem has been resolved. 

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