gmc has ceased working here; the reason has me mystified.

In desperation, and after trying other thigs, I've downloaded 
mc-4.5.40.tar.gz and built it with -g to get debugging info into it.

I'm examinging the core file in xxgdb right now, and it's not illuminating 
me very much.

Here are some select bits of info:

(xxgdb) where
#0  0x405564b5 in internal_nis_getgrent_r (grp=0x40514a44, 
buffer=0x8135388 "staroffice:x:521:", buflen=1024, errnop=0x405138c0) at 
../sysdeps/i386/i486/bits/string.h:837
#1  0x405569b6 in _nss_nis_getgrent_r (result=0x40514a44, buffer=0x8135388 
"staroffice:x:521:", buflen=1024, errnop=0x405138c0) at 
nss_nis/nis-grp.c:153
#2  0x404b0b0a in __getgrent_r (resbuf=0x40514a44, buffer=0x8135388 
"staroffice:x:521:", buflen=1024, result=0xbffff924) at 
../nss/getXXent_r.c:248
#3  0x404b037f in getgrent () at ../nss/getXXent.c:92
#4  0x80946f5 in init_groups () at ../../gnome/utilunix.c:117
#5  0x80685c0 in main (argc=1, argv=0xbffff9b4) at ../../gnome/main.c:2971
#6  0x404303c3 in __libc_start_main (main=0x8068590 <main>, argc=1, 
argv=0xbffff9b4, init=0x8062b9c <_init>, fini=0x80e2fdc <_fini>, 
rtld_fini=0x4000bec0 <_dl_fini>, stack_end=0xbffff9ac) at 
../sysdeps/generic/libc-start.c:90

#6 I take to be in the runtime initialisation; assume it's okay.
#5 is part of mc. Here's the relevant code.
int
main (int argc, char *argv [])
{
    /* We had LC_CTYPE before, LC_ALL includs LC_TYPE as well */
    setlocale (LC_ALL, "");
    bindtextdomain ("mc", LOCALEDIR);
    textdomain ("mc");
    mad_init ();
#if 0
    /* This is here to debug startup stuff */
    {
            volatile int i = 0;

            printf ("GMC IS WAITING %d\n", getpid ());
            while (!i)
                    ;

    }
#endif
    /* Initialize list of all user group for timur_clr_mode */
    init_groups ();


I don't have a very good idea of what all this is about, but it does look 
plausible. It gets into init_groups (), so let's look at that:


void init_groups (void)
{
    int i;
    struct passwd *pwd;
    struct group *grp;
    user_in_groups *cug, *pug;

    pwd = getpwuid (current_user_uid=getuid ());

    current_user_gid = (pug = g_new (user_in_groups, 1));
    current_user_gid->gid = getgid (); 
    current_user_gid->next = NULL;

    if (pwd == NULL)
       return;
    
    setgrent ();
    while ((grp = getgrent ()))
       for (i = 0; grp->gr_mem[i]; i++)


The stack trace tells me it went down in setgrent (); there are no pinters 
passed to it to get wrong....

Here are the locals, only slightly tampered with:

(xxgdb) info locals
i = 0
pwd = (struct passwd *) 0x40514bbc
grp = (struct group *) 0x40514a44
cug = (user_in_groups *) 0x40511a00
pug = (user_in_groups *) 0x8135298
(xxgdb) print *pwd
$6 = {
  pw_name = 0x81339a8 "summer", 
  pw_passwd = 0x81339af "youwish", 
  pw_uid = 500, 
  pw_gid = 500, 
  pw_gecos = 0x81339c5 "John Summerfield,,,,", 
  pw_dir = 0x81339da "/u02/summer", 
  pw_shell = 0x81339e6 "/bin/bash"
}
(xxgdb) print *grp
$7 = {
  gr_name = 0x8135388 "staroffice:x:521:", 
  gr_passwd = 0x813538e "fice:x:521:", 
  gr_gid = 235, 
  gr_mem = 0x8135398
}
(xxgdb) print *cug
$8 = {
  next = 0x405119f8, 
  gid = 1079056888
}
(xxgdb) print *pug
$9 = {
  next = 0x0, 
  gid = 500
}
(xxgdb) 


Now, the info in *grp is clearly junk; the first entry in my group file 
contains "staroffice:x:521:"

WHat now?
I don't really want to rebuild glibc to include debugging info(I have 
these installed:
[summer@possum summer]$ rpm -qa | grep glibc
glibc-devel-2.1.2-1
compat-glibc-5.2-2.0.7.1
glibc-profile-2.1.2-1
glibc-2.1.2-1
[summer@possum summer]$ 
).

Hmm
Perhaps I should revert to 2.1.1; I'll do that and let you know if it's 
better.
CU


-- 
Cheers
John Summerfield
http://os2.ami.com.au/os2/ for OS/2 support.
Configuration, networking, combined IBM ftpsites index.


-- 
To unsubscribe:
mail -s unsubscribe [EMAIL PROTECTED] < /dev/null

Reply via email to