Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Aug 2002 02:50:08 -0700 (PDT)
From:      David Malone <dwmalone@maths.tcd.ie>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: misc/41213: top(1) blocks if NIS-related entries in passwd(5) are in a certain order
Message-ID:  <200208080950.g789o84E084138@freefall.freebsd.org>

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

From: David Malone <dwmalone@maths.tcd.ie>
To: Stefan Schwarzer <sschwarzer@sschwarzer.net>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: misc/41213: top(1) blocks if NIS-related entries in passwd(5) are in a certain order
Date: Thu, 8 Aug 2002 10:46:47 +0100

 On Wed, Jul 31, 2002 at 02:52:29PM -0700, Stefan Schwarzer wrote:
 >       I know only a workaround, see the URLs. I do not know, though, whether this workaround is feasible in any case.
 
 This might be a bug in the code for iterating through all users
 in libc.  I think that top tries to do this to find the longest
 username it will have to deal with. Could you try the included
 simple C program and see if you can reproduce the problem? It should
 keep looping on the problem user.
 
 If you want to check it is this code that is looping, the last thing
 before top gets stuck in a loop should be the calling of sysctlbyname
 on either "machdep.smp_active" or "smp.smp_active". You may be able
 to find this in your ktrace output.
 
 	David.
 
 #include <sys/types.h>
 
 #include <pwd.h>
 #include <stdio.h>
 
 int
 main(void) {
 	struct passwd *pw;
 
 	while ((pw = getpwent()) != NULL) {
 		printf("Got user '%s',\n", pw->pw_name);
 	}
 	return 0;
 }

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?200208080950.g789o84E084138>