[Spread-users] Increasing MAX_GROUP_NAME leads to message header corruption?
Sebastian Wrede
swrede at techfak.uni-bielefeld.de
Mon Apr 28 07:09:38 EDT 2008
Hi,
Am Sonntag, den 27.04.2008, 11:44 -0700 schrieb Mike Perik:
> Have you rebuilt everything (ie spread daemon, library) with this new size?
Did that once more... Still, the java listener receives an exception
upon joining a group with a length of 32 characters. This time the
spread daemon warns about the num_groups field:
> Sess_session_authorized: Accepting from 127.0.0.1 with private name
> m-643856 on mailbox 9
> E_handle_events: next event
> E_handle_events: poll select
> E_handle_events: select with timeout (0, 360101)
> E_handle_events: exec ext fd event
> new: creating pointer 0x81abea8 to object type 20 named scatter
> new: creating pointer 0x81ac1d8 to object type 50 named packet_body
> Sess_read: Message has type field 0x80010080
> Sess_validate_read_header: Message has negative or too large
> num_groups field
Using spuser the 32 character long group names work perfectly:
> User> j fea93ea6b628146563f2c3be5188b944
>
> User>
> ============================
> Received REGULAR membership for group with 1 members, where I am
> member 0:
> #user#localhost
> grp id is 2130706689 1209379362 1
> Due to the JOIN of #user#localhost
>
> User> s fea93ea6b628146563f2c3be5188b944
> enter message: I like spread.
>
> User>
> ============================
> received SAFE message from #user#localhost, of type 1, (endian 0) to 1
> groups
> (15 bytes): I like spread.
I've recompiled everything using the following settings:
> include/sp.h:
> #define MAX_GROUP_NAME 33
> #define MAX_PRIVATE_NAME 10 /* largest possible size of
> private_name field of SP_connect() */
> #define MAX_PROC_NAME 20 /* largest possible size of
> process name of daemon */
>
> include/spread_params.h:
> #define MAX_PRIVATE_NAME 10 /* not including the
> null, look for it if changed */
>
> #define MAX_GROUP_NAME (1+MAX_PRIVATE_NAME+1
> +MAX_PROC_NAME+1)
> /* #private_name#proc_name
> including the null */
SpreadConnection.java:
> private static final int MAX_PRIVATE_NAME = 10;
> private static final int MAX_MESSAGE_LENGTH = 140000;
> protected static final int MAX_GROUP_NAME = 33;
Are there any other constants I need to change in order to get this to work?
Best regards,
Sebastian
>
>
>
>
> --- On Sun, 4/27/08, Sebastian Wrede <swrede at techfak.uni-bielefeld.de> wrote:
>
> > From: Sebastian Wrede <swrede at techfak.uni-bielefeld.de>
> > Subject: [Spread-users] Increasing MAX_GROUP_NAME leads to message header corruption?
> > To: spread-users at lists.spread.org
> > Date: Sunday, April 27, 2008, 11:11 AM
> > Hi,
> >
> > in order to allow for URIs that map to group names with a
> > length that is
> > significantly longer than 32 characters, we encode these as
> > MD5 hashes.
> >
> > In order to do so, we increased the value of MAX_GROUP_NAME
> > by 1 to 33
> > characters because it seems that in the default of 32 chars
> > the zero
> > termination symbol is included. Because spuser now allows
> > us to join,
> > send to and receive messages from an "MD5" group,
> > which it did not
> > before this modification I assume the zero termination
> > assumption is
> > correct, isn't it?
> >
> > The issue now is that once we change the group length in
> > SpreadConnection.java to 33 characters, too, it is not
> > possible to send
> > any longer any messages from a java client to the spread
> > daemon. As soon
> > as the message is written to the socket, an exception
> > (broken pipe) is
> > thrown. The spread daemon warns about an "Invalid
> > Hint" message field,
> > probably suggesting that the message protocol seems broken.
> >
> > I've already scanned the mail archives for similar
> > problems, but could
> > not find an appropriate answer. It would be great if anyone
> > could point
> > us in the right direction to solve this problem.
> >
> > BTW: We use spread-4.0.0 on an Ubuntu 7.10 linux
> > distribution configured
> > for testing purposes with a segment containing only the
> > local host. We
> > applied the source changes in /include/sp.h
> > /daemon/spread_params.h and
> > SpreadConnection.java.
> >
> >
> > Best regards,
> >
> > Sebastian
> >
> >
> > --
> > Dipl.-Inform. Sebastian Wrede phone
> > +49-521-106-5148
> > Research Institute on Cognition and Robotics,
> > Bielefeld University, Germany
> > http://www.techfak.uni-bielefeld.de/~swrede/
> >
> >
> > _______________________________________________
> > Spread-users mailing list
> > Spread-users at lists.spread.org
> > http://lists.spread.org/mailman/listinfo/spread-users
>
>
> ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
--
Dipl.-Inform. Sebastian Wrede phone +49-521-106-5148
Research Institute on Cognition and Robotics,
Bielefeld University, Germany
http://www.techfak.uni-bielefeld.de/~swrede/
More information about the Spread-users
mailing list