[comp.sys.isis] broadcast options question

pop@linus.mitre.org (Paul O. Perry) (06/27/91)

In sending a broadcast I do something like:

      fbcast_l("m",gaddr,RECEIVE,message_ptr,nwant,&rval);

but when I tried to change the options to "mx" in order to exclude the
sender I die in:

#0  0x0 in _DYNAMIC ()
#1  0x192d60 in BCAST ()
#2  0x1922b4 in do_bcast ()
#3  0x191e48 in fbcast_l ()

In reading the manual (p. 171) I got the impression I could mix these
options. What is the proper format for a message that takes a message
pointer and excludes the sender ?

Thanks, Paul.

--
Paul O. Perry                                        Phone: (617) 271-5230
MITRE Corporation                                    Fax: (617) 271-5255
Burlington Road                                      pop@mitre.org
Bedford, MA  01730            UUCP:   ...{decvax,philabs,genrad}!linus!pop

ken@CS.Cornell.EDU (Ken Birman) (06/27/91)

In article <POP.91Jun26195520@flounder.linus.mitre.org> pop@linus.mitre.org (Paul O. Perry) writes:
>
>In sending a broadcast I do something like:
>
>      fbcast_l("m",gaddr,RECEIVE,message_ptr,nwant,&rval);
>
>but when I tried to change the options to "mx" in order to exclude the
>sender I die in:
>
>#0  0x0 in _DYNAMIC ()
>#1  0x192d60 in BCAST ()
>#2  0x1922b4 in do_bcast ()
>#3  0x191e48 in fbcast_l ()
>
>In reading the manual (p. 171) I got the impression I could mix these
>options. What is the proper format for a message that takes a message
>pointer and excludes the sender ?

This should have worked, but from the one-line example it isn't
clear what types you used for "gaddr" and for "rval".

Using the "m" option, rval needs to be a vector of message pointers.
I.e. rval should be declared something like
	message *rval[PG_MAXMEMB]; /* PG_ALEN in V2.1 */

In addition, gaddr should be of type "address *":
	address *gaddr;

Finally, message_ptr needs to point to a valid message, i.e. it
originated in msg_genmsg or msg_newmsg and it hasn't been deleted yet.

Now, the specific stack trace you show here indicates that ISIS is
dying in a call to a dynamically linked library procedure called
within BCAST -- linking with -g and using dbx would have given me a
line number, so I'll have to guess which procedure.  Scanning the code
for V3.0, which is what I have online here at home, I actually didn't
see any system calls, but perhaps we are running into a case where your
compiler generates code that calls bcopy() or bzero().  With a line
number I could probably tell you precisely which of your arguments
is apparently "unsafe".

As for why this happens with "x" but not without, my guess is that we
are seeing some sort of memory overrun or smash (i.e. if rval were not
an array) and the problem isn't noticed if the execution sequence 
changes a little.  This is just a guess, but I have seen things like
that a lot.

So, the best guess is that you are simply passing a bad argument in
some subtle way that doesn't jump right out at you.

If you can't track this down, recompile cl_bcast.c and your program
with -g so that you can get some line numbers in the stack trace.  
At that point, if you can't see what causes this, drop a note to us
(isis-bugs@cs.cornell.edu) and we can help out.  I am sure it is nothing
major.
-- 
Kenneth P. Birman                              E-mail:  ken@cs.cornell.edu
4105 Upson Hall, Dept. of Computer Science     TEL:     607 255-9199 (office)
Cornell University Ithaca, NY 14853 (USA)      FAX:     607 255-4428