Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Sep 2000 07:20:07 -0700 (PDT)
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/4696: ping hangs on certain unresolvable hosts
Message-ID:  <200009051420.HAA88507@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/4696; it has been noted by GNATS.

From: Bruce Evans <bde@zeta.org.au>
To: kris@FreeBSD.ORG
Cc: marcs@znep.com, freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: bin/4696: ping hangs on certain unresolvable hosts
Date: Wed, 6 Sep 2000 01:09:49 +1100 (EST)

 On Mon, 4 Sep 2000 kris@FreeBSD.ORG wrote:
 
 > Synopsis: ping hangs on certain unresolvable hosts
 > 
 > State-Changed-From-To: open->closed
 > State-Changed-By: kris
 > State-Changed-When: Mon Sep 4 15:21:48 PDT 2000
 > State-Changed-Why: 
 > Fixed by sef in r1.24 of ping.c on 1997/07/13
 
 No, this was only fixed for some values of "certain", and not the ones
 described in the PR.
 
 Rev.1.24 of ping.c mainly makes all syscalls return EINTR when they are
 interrupted by a SIGINT or SIGALRM.  This fixes hangs in sendto() and/or
 recvmsg(), but has no effect on the hangs described in the PR since
 those involve select() and select() always returns EINTR when it is
 interrupted.  As described in the PR, res_send() retries almost endlessly
 after select() returns EINTR.
 
 I think this is a bug in res_send().  It can't be aborted by non-broken
 signal handlers except by ones that do little more than call _exit(2).
 ping used to have broken signal handlers that did lots of unsafe cleanups
 before exiting unsafely by calling exit(3).
 
 PR 20613 is about essentially the same bug for "fetch -T n".  The timeout
 doesn't work when the SIGALRM occurs in res_send(), since res_send() just
 retries after select() returns EINTR.
 
 Bruce
 
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009051420.HAA88507>