[K42-discussion] Running AIM7

Dilma DaSilva dilma at watson.ibm.com
Wed Sep 14 11:36:26 EST 2005


Instead of building aim7 in k42 like Andrew has been trying,
I built it on a linux ppc boot doing chroot to our file system
image (partDeb.Img.4), and then I ran the app in k42.

The benchmark stops when it invokes gethostbyname and gets
back a NULL pointer. I'm including below the strace from linux and
TRACEPROC info from k42 for a simple test.

Andrew, looking at the source code for the benchmark I got the
impression that it's possible to run the benchmark without
AF_UNIX, DGRAM socket (because the part of the test involving
the socketpair call is protected by #ifndef NO_SOCKETPAIR).

Dilma

---------------------
Sample program:
#include <stdio.h>
#include <netdb.h>
extern int h_errno;
int main(int argc, char**argv)
{
  struct hostent *hp = gethostbyname("kxs1");
  if (hp == NULL) {
    printf("error");
  } else {
    printf("success\n");
  }
  return 0;
}

Relevant part of strace from linux (kreg, a linux ppc box):
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("9.2.250.86")}, 28) = 0
fcntl(3, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
gettimeofday({1126660055, 45171}, NULL) = 0
poll([{fd=3, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
send(3, "\244\373\1\0\0\1\0\0\0\0\0\0\4kxs1\6watson\3ibm\3com"..., 37, 0) = 37
poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 5000) = 1
ioctl(3, FIONREAD or FIONREAD, [511])   = 0
recvfrom(3, "\244\373\205\200\0\1\0\1\0\3\0\3\4kxs1\6watson\3ibm\3c"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("9.2.250.86")}, [16]) = 176

Relevant part of TRACEPROC printout (k42 running on kxs1):

0x21 Syscall: socketcall 0x1 0xffffd2a0 0x0 0xe0000000000ff01c
		__k42_linux_socket 0x2 0x2 0x0 0x400 ret:0x3
 0x21 ret:0x3
0x21 Syscall: socketcall 0x3 0xffffd2a0 0x1c 0x2100010000
		__k42_linux_connect 0x3 0x10020001d50 0x1c 0x400 ret:0x0
 0x21 ret:0x0
0x21 Syscall: fcntl 0x3 0x3 0x4 0xe0000000000ff01c 0x21 ret:0x0
0x21 Syscall: fcntl 0x3 0x4 0x800 0xe0000000000ff01c 0x21 ret:0x0
0x21 Syscall: gettimeofday 0xffffe220 0x0 0x4 0xe0000000000ff01c 0x21 ret:0x0
0x21 Syscall: poll 0xffffe298 0x1 0x0 0x4327794a 0x21 ret:0x0
0x21 Syscall: poll 0xffffe298 0x1 0xbb8 0xe0000000000ff01c 0x21 ret:0x1
0x21 Syscall: socketcall 0x9 0xffffd2a0 0x25 0x0
		__k42_linux_send 0x3 0xffffe3e0 0x25 0x0 ret:0xffffffffffffffa7
 0x21 ret:0xffffffffffffffa7



More information about the K42-discussion mailing list