amd64/88299: swapcontext fails with errno 0

Arjo Hooimeijer arjo.hooimeijer at
Mon Oct 31 14:00:39 PST 2005

>Number:         88299
>Category:       amd64
>Synopsis:       swapcontext fails with errno 0
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-amd64
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 31 22:00:36 GMT 2005
>Originator:     Arjo Hooimeijer
>Release:        6.0-RC1
FreeBSD 6.0-RC1 FreeBSD 6.0-RC1 #0: Sun Oct 16 19:09:55 CEST 2005     root at  amd64
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");

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

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


More information about the freebsd-amd64 mailing list