[K42-discussion] Running AIM7 - next bug

Bryan S Rosenburg rosnbrg at us.ibm.com
Fri Sep 16 06:47:10 EST 2005


I think I've fixed this problem (after consulting with Maria).  At least 
the socket2 program now runs without enabling the K42 kludge.

The problem was that for UDP sockets, we were trying to handle "connect" 
calls locally in the client.  We need to pass the connect through to the 
server, so that it knows the full state of the socket and can supply 
missing destination addresses on writes and sendmsgs.

I've committed the fix, but haven't tested it except for socket2.

Presumably we can now get rid of the following FIXME's in the trace 
daemon:

    /* FIXME: we shouldn't need to remember the sockaddr for each socket,
     * we should be able to just do the connect below and then forget it,
     * but currently K42 doesn't remember the address used in connect
     * when dealing with datagram sockets */
    traceNetwork[cpu].dest.sin_family = AF_INET;
    traceNetwork[cpu].dest.sin_port = htons(port);

    /* FIXME: this shouldn't be needed, since we connect() at init time */
    msghdr.msg_name = &traceNetwork[physProc].dest;
    msghdr.msg_namelen = sizeof(traceNetwork[physProc].dest);

I'll try that tomorrow.

- Bryan




Andrew Baumann <andrewb at cse.unsw.edu.au> 
Sent by: k42-discussion-bounces at ozlabs.org
09/15/2005 06:32 AM

To
k42-discussion at ozlabs.org
cc

Subject
[K42-discussion] Running AIM7 - next bug






Hi again,

Thanks for everyone's quick responses to my previous problems -- I'm 
continuing to work on running AIM7, and have now hit the next bug :)

On closer inspection, if socketpair() isn't available the benchmark can 
run in 
a mode where it uses TCP and UDP sockets instead of Unix domain sockets. 
However, attempting this, I ran into what I believe to be the same bug as 
triggered by kitch-linux/tests/linux/socket2.c

Where this happens in AIM7 (for reference, the function is udp_test() in 
src/pipe_test.c), it:
 * creates a AF_INET, SOCK_DGRAM socket
 * connect()s it to a particular address (a port on localhost where there 
is a 
matching receiver socket)
 * write()s to it, which fails with "Destination address required"

The write call should succeed, because of the previous connect() (which is 

legal, even though this is a datagram socket). I haven't traced through 
K42 
to see why this doesn't work, but a quick grep didn't turn up anyone 
returning EDESTADDRREQ in kitchsrc.

Note that it still runs the UDP test even if socketpair() is available, so 

fixing UNIX-domain datagram sockets will still mean that we hit this bug.

Andrew
_______________________________________________
K42-discussion mailing list
K42-discussion at ozlabs.org
https://ozlabs.org/mailman/listinfo/k42-discussion

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/k42-discussion/attachments/20050915/770805a7/attachment.htm 


More information about the K42-discussion mailing list