[krbdev.mit.edu #6951] assertion failure when connections fail in service_fds()

The RT System itself via RT rt-comment at krbdev.mit.edu
Wed Aug 31 14:27:09 EDT 2011


>From krb5-bugs-incoming-bounces at PCH.mit.edu  Wed Aug 31 14:27:07 2011
Return-Path: <krb5-bugs-incoming-bounces at PCH.mit.edu>
Received: from pch.mit.edu (PCH.MIT.EDU [18.7.21.90])
	by krbdev.mit.edu (Postfix) with ESMTP id D24253DC26;
	Wed, 31 Aug 2011 14:27:07 -0400 (EDT)
Received: from pch.mit.edu (pch.mit.edu [127.0.0.1])
	by pch.mit.edu (8.13.6/8.12.8) with ESMTP id p7VIR7Bi009150;
	Wed, 31 Aug 2011 14:27:07 -0400
Received: from mailhub-dmz-4.mit.edu (MAILHUB-DMZ-4.MIT.EDU [18.7.62.38])
	by pch.mit.edu (8.13.6/8.12.8) with ESMTP id p7VILN2v007951
	for <krb5-bugs-incoming at PCH.mit.edu>; Wed, 31 Aug 2011 14:21:24 -0400
Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU
	[18.9.25.12])
	by mailhub-dmz-4.mit.edu (8.13.8/8.9.2) with ESMTP id p7VII80e022964
	for <krb5-bugs at mit.edu>; Wed, 31 Aug 2011 14:21:23 -0400
X-AuditID: 1209190c-b7bdeae000000a26-db-4e5e7b6ce9a0
Authentication-Results: symauth.service.identifier; spf=pass; senderid=pass
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28])
	by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP
	id E4.85.02598.C6B7E5E4; Wed, 31 Aug 2011 14:20:29 -0400 (EDT)
Received: from int-mx02.intmail.prod.int.phx2.redhat.com
	(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7VILMxU003230
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <krb5-bugs at mit.edu>; Wed, 31 Aug 2011 14:21:22 -0400
Received: from blade.bos.redhat.com (blade.bos.redhat.com [10.16.19.220])
	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id p7VILKlm013830
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <krb5-bugs at mit.edu>; Wed, 31 Aug 2011 14:21:21 -0400
Received: from blade.bos.redhat.com (localhost.localdomain [127.0.0.1])
	by blade.bos.redhat.com (8.14.5/8.14.5) with ESMTP id p7VILJZ8006505
	for <krb5-bugs at mit.edu>; Wed, 31 Aug 2011 14:21:20 -0400
Received: (from nalin at localhost)
	by blade.bos.redhat.com (8.14.5/8.14.5/Submit) id p7VILJGb006504;
	Wed, 31 Aug 2011 14:21:19 -0400
Date: Wed, 31 Aug 2011 14:21:19 -0400
Message-Id: <201108311821.p7VILJGb006504 at blade.bos.redhat.com>
To: krb5-bugs at mit.edu
Subject: assertion failure when connections fail in service_fds()
From: nalin at redhat.com
X-send-pr-version: 3.99
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrNIsWRWlGSWpSXmKPExsVysWW7jG5udZyfwcS9TBYND4+zOzB6NJ05
	yhzAGMVlk5Kak1mWWqRvl8CVseniJKaCPbwV/+4cYW1gvMfVxcjJISFgInF9/mMWEJtRwFvi
	zdXj7BBxMYkL99azdTFycQgJnGCUaN0/kQXC2cQk8fPwPihnKZPEk66TUM5JRon9W6axQjht
	jBJvttwCG8YioCpxZ183G4jNK2AnsWruRLC4iICoxMu/x8CWCws4SqzouQVmswEtvzHvFCuI
	zSzAIvHnzQYWiKPEJXZsPw11oLbExnML2CYwCixgZFjFKJuSW6Wbm5iZU5yarFucnJiXl1qk
	a6iXm1mil5pSuokRGFJCnJI8OxjfHFQ6xCjAwajEw9udGOcnxJpYVlyZe4hRkoNJSZT3XRVQ
	iC8pP6UyI7E4I76oNCe1+BCjBAezkgjvtECgHG9KYmVValE+TEqag0VJnPfgDgc/IYH0xJLU
	7NTUgtQimCwTB/shRhkODiUJ3s8gkwWLUtNTK9Iyc0qQ1XCCCC6QNTxAa96DFPIWFyTmFmem
	QxSdYlSUEudlB0aykABIIqM0D24AKA3U/////xKjrJQwLyMDA4MQD9AFQI8j5EFp5BWjONDT
	whB38GTmlcBNfwW0mAlo8SXDaJDFJYkIKakGRqOmff/i3884++Vwzb9LcRcaJFOXhJl1B1r+
	aT84oaByXppV6iT2NOV1am2/z3x9ofrqy7+jPx/e3lNUPO+DWkYfowr/8i3Mk7757F/9gZVt
	McvVvEmKFcqFcxfeEyjYVVN6o7N+hb/4qel9Kxz5ztsp2LdkLN8Ssf/QotrwPz1bnO9Mnbzp
	ZJESS3FGoqEWc1FxIgBfPZHe/gIAAA==
X-Mailman-Approved-At: Wed, 31 Aug 2011 14:27:05 -0400
X-BeenThere: krb5-bugs-incoming at mailman.mit.edu
X-Mailman-Version: 2.1.6
Precedence: list
Sender: krb5-bugs-incoming-bounces at PCH.mit.edu
Errors-To: krb5-bugs-incoming-bounces at PCH.mit.edu

>Submitter-Id:	net
>Originator:	
>Organization:
>Confidential:	no
>Synopsis:	assertion failure when connections fail in service_fds()
>Severity:	non-critical
>Priority:	medium
>Category:	krb5-libs
>Class:		sw-bug
>Release:	1.9.1
>Environment:
	
System: Linux blade.bos.redhat.com 2.6.38.8-35.fc15.x86_64 #1 SMP Wed Jul 6 13:58:54 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
Architecture: x86_64
>Description:
	With the fix for RT#6905 applied and clients building with
	poll(), we're seeing some clients hitting an assertion failure
	when one of the multiple connections that k5_sendto() creates
	fails before a reply is received from another one.
	After a connection's state is marked as FAILED, subsequent
	calls to service_fds() will still attempt to pass that
	connection's descriptor to cm_get_ssflags(), and because the
	descriptor has already been removed from the select_state,
	cm_get_ssflags() will hit an assertion failure.
>How-To-Repeat:
	Configure a client system with a list of KDCs which includes, at
	its front, an address/port combination where there's no KDC
	listening.
>Fix:
	This appears to fix it on my systems:
Index: src/lib/krb5/os/sendto_kdc.c
===================================================================
--- src/lib/krb5/os/sendto_kdc.c	(revision 25119)
+++ src/lib/krb5/os/sendto_kdc.c	(working copy)
@@ -1176,7 +1176,7 @@
         for (state = conns; state != NULL; state = state->next) {
             int ssflags;
 
-            if (state->fd == INVALID_SOCKET)
+            if (state->state == FAILED || state->fd == INVALID_SOCKET)
                 continue;
             ssflags = cm_get_ssflags(seltemp, state->fd);
             if (!ssflags)




More information about the krb5-bugs mailing list