Skip Menu |
 

Download (untitled) / with headers
text/plain 2.1KiB
From krb5-bugs-incoming-bounces@PCH.mit.edu Mon Jan 31 15:12:16 2005
Received: from pch.mit.edu (PCH.MIT.EDU [18.7.21.90]) by krbdev.mit.edu (8.9.3p2) with ESMTP
id PAA10601; Mon, 31 Jan 2005 15:12:16 -0500 (EST)
Received: from pch.mit.edu (pch.mit.edu [127.0.0.1])
by pch.mit.edu (8.12.8p2/8.12.8) with ESMTP id j0VKBkh7030419
for <krb5-send-pr@krbdev.mit.edu>; Mon, 31 Jan 2005 15:11:46 -0500
Received: from fort-point-station.mit.edu (FORT-POINT-STATION.MIT.EDU
[18.7.7.76])
by pch.mit.edu (8.12.8p2/8.12.8) with ESMTP id j0VEvuh7006541
for <krb5-bugs-incoming@PCH.mit.edu>; Mon, 31 Jan 2005 09:57:56 -0500
Received: from hpss1.ccs.ornl.gov (hpss1.ccs.ornl.gov [160.91.206.125])
j0VEvqG7014014
for <krb5-bugs@mit.edu>; Mon, 31 Jan 2005 09:57:52 -0500 (EST)
Received: by hpss1.ccs.ornl.gov (Postfix, from userid 0)
id 150CA3025; Mon, 31 Jan 2005 09:57:52 -0500 (EST)
To: krb5-bugs@mit.edu
From: lio@ornl.gov
X-send-pr-version: 3.99
Message-Id: <20050131145752.150CA3025@hpss1.ccs.ornl.gov>
Date: Mon, 31 Jan 2005 09:57:52 -0500 (EST)
X-Spam-Score: -4.74
X-Spam-Flag: NO
X-Scanned-By: MIMEDefang 2.42
X-Mailman-Approved-At: Mon, 31 Jan 2005 15:11:43 -0500
cc: lio@ornl.gov
Subject: KRB5 1.4 kinit crashes on AIX
X-BeenThere: krb5-bugs-incoming@mailman.mit.edu
X-Mailman-Version: 2.1
Precedence: list
Reply-To: lio@ornl.gov
Sender: krb5-bugs-incoming-bounces@PCH.mit.edu
Errors-To: krb5-bugs-incoming-bounces@PCH.mit.edu


Show quoted text
>Submitter-Id: net
>Originator: Dan Million
>Organization:
Oak Ridge National Laboratory
Show quoted text
>Confidential: no
>Synopsis: KBR5 1.4 kinit build on AIX 5.1 coredumps
>Severity: critical
>Priority: low
>Category: krb5-clients
>Class: sw-bug
>Release: 1.4
>Environment:
IBM RS/6000 44P-170, AIX 5.1 ML07
System: AIX hpss1 1 5 000BF74D4C00


Show quoted text
>Description:
I built the new 1.4 release on AIX 5.1 with the configuration:

./configure --prefix=/krb5 --localstatedir=/var/krb5 \
--without-krb4 --without-tcl \
CFLAGS="-g -qmaxmem=-1"

kadmind and krb5kdc start fine. When I try to do a kinit,
the program dies with "Illegal instruction". A dbx of the
core file shows that apparently kinit is trying to execute
code at address 0x0.

Show quoted text
>How-To-Repeat:
See Description.
Show quoted text
>Fix:
Not known yet.
From: Ken Raeburn <raeburn@MIT.EDU>
Subject: Re: [krbdev.mit.edu #2902] KBR5 1.4 kinit build on AIX 5.1 coredumps
Date: Mon, 31 Jan 2005 15:52:13 -0500
To: rt-comment@krbdev.mit.edu, lio@ornl.gov
RT-Send-Cc:
Show quoted text
>> Description:
> I built the new 1.4 release on AIX 5.1 with the configuration:
>
> ./configure --prefix=/krb5 --localstatedir=/var/krb5 \
> --without-krb4 --without-tcl \
> CFLAGS="-g -qmaxmem=-1"
>
> kadmind and krb5kdc start fine. When I try to do a kinit,
> the program dies with "Illegal instruction". A dbx of the
> core file shows that apparently kinit is trying to execute
> code at address 0x0.

We don't have an AIX 5.1 system to test on. Can you get any idea of
where it's making this call from? A stack trace with line numbers
would probably be helpful.

Ken
Download (untitled) / with headers
text/plain 1.1KiB
I'm running krb5 1.4.1 on AIX 5.2.0.0 --

The problem is due to the use of res_ninit() in krb5int_dns_init() in
dnsglue.c.

I'm not very familiar with the usage of res_ninit(), but debugging the
code seems to shows that whenever res_ninit(&statbuf) is called, the
stack seems to get corrupted and the core dump with illegal instruction
happens soon afterwards.

I don't know what the proper way to call res_ninit() is -- I can only
assume that it works on other platforms, nor do I have AIX source code
to dig into to see what actually is happening, but a reading of the
kerberos source doesn't suggest anything obvious is wrong. I've also
tried initializing statbuf to various assorted values to no avail.

I reading of the AIX man page for res_ninit() seems to suggest the
parameter to res_ninit() should be &_res (_res is #defined to a function
in the system resolver library when _REENTRANT). Switching statbuf to
_res, and lo, kerberos no longer crashes.

The attached patch does just this.

Of course, one could also #undef HAVE_RES_NSEARCH and have it work, but
I wasn't sure if res_search() in AIX was thread-safe.

-- Jonathan Chen <jon+krb@spock.org>
Download a
application/octet-stream 414B

Message body not shown because it is not plain text.

To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #2902] KBR5 1.4 kinit build on AIX 5.1 coredumps
From: Tom Yu <tlyu@MIT.EDU>
Date: Tue, 19 Jul 2005 15:29:54 -0400
RT-Send-Cc:
Could someone who has an AIX 5 system please try making a config.cache
containing only the line

krb5_cv_func_res_search=no

on a clean build tree, configuring, and then running make to see if
that solves the problem? That will trick the build system into not
using res_ninit()/res_nsearch()/etc.

---Tom
From: tlyu@mit.edu
Subject: CVS Commit
* aclocal.m4 (AC_LIBRARY_NET): Special-case AIX 5.x due to broken
res_ninit(), or more precisely, incorrect size of struct
__res_state.


To generate a diff of this commit:



cvs diff -r5.503 -r5.504 krb5/src/ChangeLog
cvs diff -r1.319 -r1.320 krb5/src/aclocal.m4
Date: Wed, 20 Jul 2005 09:36:51 -0400
From: Dan Million <lio@ornl.gov>
Subject: Re: [krbdev.mit.edu #2902] KBR5 1.4 kinit build on AIX 5.1 coredumps
To: rt-comment@krbdev.mit.edu
RT-Send-Cc:
Tom Yu via RT wrote:
Show quoted text
> Could someone who has an AIX 5 system please try making a config.cache
> containing only the line
>
> krb5_cv_func_res_search=no
>
> on a clean build tree, configuring, and then running make to see if
> that solves the problem? That will trick the build system into not
> using res_ninit()/res_nsearch()/etc.
>
> ---Tom
>

I will try this today.

Dan
Date: Wed, 20 Jul 2005 10:14:26 -0400
From: Dan Million <lio@ornl.gov>
Subject: Re: [krbdev.mit.edu #2902] KBR5 1.4 kinit build on AIX 5.1 coredumps
To: rt-comment@krbdev.mit.edu
RT-Send-Cc:
Tom Yu via RT wrote:
Show quoted text
> Could someone who has an AIX 5 system please try making a config.cache
> containing only the line
>
> krb5_cv_func_res_search=no
>
> on a clean build tree, configuring, and then running make to see if
> that solves the problem? That will trick the build system into not
> using res_ninit()/res_nsearch()/etc.
>
> ---Tom

This did not work. I built KRB5 1.4 on AIX 5.1 as before, and the
config.cache now contains

krb5_cv_func_res_search=${krb5_cv_func_res_search=no}

But after installing the new build, the kinit command still dies
immediately with an illegal instruction coredump.

Dan
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #2902] KBR5 1.4 kinit build on AIX 5.1 coredumps
From: Tom Yu <tlyu@MIT.EDU>
Date: Wed, 20 Jul 2005 10:34:42 -0400
RT-Send-Cc:
Show quoted text
>>>>> "lio" == lio@ornl gov via RT <rt-comment@krbdev.mit.edu> writes:

Show quoted text
lio> This did not work. I built KRB5 1.4 on AIX 5.1 as before, and the
lio> config.cache now contains

Show quoted text
lio> krb5_cv_func_res_search=${krb5_cv_func_res_search=no}

My apologies. The setting should have been

krb5_cv_func_res_nsearch=no
Date: Wed, 20 Jul 2005 10:51:29 -0400
From: Dan Million <lio@ornl.gov>
Subject: Re: [krbdev.mit.edu #2902] KBR5 1.4 kinit build on AIX 5.1 coredumps
To: rt-comment@krbdev.mit.edu
RT-Send-Cc:
Tom Yu via RT wrote:
Show quoted text
>>>>>>"lio" == lio@ornl gov via RT <rt-comment@krbdev.mit.edu> writes:
>
>
> lio> This did not work. I built KRB5 1.4 on AIX 5.1 as before, and the
> lio> config.cache now contains
>
> lio> krb5_cv_func_res_search=${krb5_cv_func_res_search=no}
>
> My apologies. The setting should have been
>
> krb5_cv_func_res_nsearch=no
>

OK, this one worked. I can run kinit normally now.

Dan
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #2902] KBR5 1.4 kinit build on AIX 5.1 coredumps
From: Tom Yu <tlyu@MIT.EDU>
Date: Wed, 20 Jul 2005 13:15:40 -0400
RT-Send-Cc:
Show quoted text
>>>>> "lio" == lio@ornl gov via RT <rt-comment@krbdev.mit.edu> writes:

Show quoted text
lio> Tom Yu via RT wrote:

Show quoted text
>> My apologies. The setting should have been
>>
>> krb5_cv_func_res_nsearch=no

Show quoted text
lio> OK, this one worked. I can run kinit normally now.

Thanks for the confirmation. A workaround based on the above will
appear in krb5-1.4.2.

---Tom
From: tlyu@mit.edu
Subject: CVS Commit
pullup from trunk


To generate a diff of this commit:



cvs diff -r5.479.4.6 -r5.479.4.7 krb5/src/ChangeLog
cvs diff -r1.308.4.2 -r1.308.4.3 krb5/src/aclocal.m4