[792] in Moira
[jweiss: coredump in add machine on solaris]
daemon@ATHENA.MIT.EDU (Jonathon Weiss)
Fri Sep 23 22:38:14 1994
To: moiradev@MIT.EDU
Date: Fri, 23 Sep 1994 22:38:07 EDT
From: Jonathon Weiss <jweiss@MIT.EDU>
I hate not being able to type...
To: tom
cc: moriadev, dcns-dev-np
X-Netprob-Ref: 2429
Subject: coredump in add machine on solaris
Date: Fri, 23 Sep 1994 22:36:06 EDT
From: Jonathon Weiss <jweiss>
moira was coredumping for me in add machine.
It seems to be breaking in code that you've modified fairly recently,
can you deal with this?
At Ted's suggestion I ran purify on it. Here are the errors that look
relevant...
**** Purify'd ./moira (pid 20792) ****
Purify (umr): uninitialized memory read:
* This is occurring while in:
AskMCDInfo [line 550, cluster.c, pc=0x3b270]
AddMachine [line 800, cluster.c, pc=0x3c80c]
Do_menu [line 392, menu.c, pc=0x47b8c]
Do_menu [line 396, menu.c, pc=0x47c30]
Start_menu [line 136, menu.c, pc=0x45adc]
main [line 167, main.c, pc=0x45610]
* Reading 4 bytes from 0xefffd270 on the stack.
* This is 32 bytes past start of local variable "info" in function AddMachine.
**** Purify'd ./moira (pid 20792) ****
Purify (fnh): Freeing non heap memory:
* This is occurring while in:
AskMCDInfo [line 550, cluster.c, pc=0x3b27c]
AddMachine [line 800, cluster.c, pc=0x3c80c]
Do_menu [line 392, menu.c, pc=0x47b8c]
Do_menu [line 396, menu.c, pc=0x47c30]
Start_menu [line 136, menu.c, pc=0x45adc]
main [line 167, main.c, pc=0x45610]
* Attempting to free block at 0x18 in the text section.
* Note: Some 'free's permit freeing such memory, but this is not portable.
To suppress this error, add 'suppress fnh *' to your .purify file.
Here's the relevant code (the free() is on line 550)
/* there appears to be some argument mismatch between the client
* and the server.. so here is this argument shuffler.
* I have since modified this to always shuffle the arguments..
* not just do so when performing a modify all fields request.
* The SetMachinedefaults() has been changed to reflect this.
* pray for us and may we attain enlightenment through structures.
*/
free(info[8]);
info[8] = info[M_SUBNET];
info[9] = info[M_ADDR];
info[10] = info[M_OWNER_TYPE];
info[11] = info[M_OWNER_NAME];
info[12] = info[M_ACOMMENT];
info[13] = info[M_OCOMMENT];
What is info[8] anyway? M_STAT_CHNG according to moira_site.h, is it
really necessary?
Jonathon