Subject: Re: amd weirdness
To: None <eeh@netbsd.org>
From: Simon J. Gerraty <sjg@crufty.net>
List: port-sparc64
Date: 06/19/2002 16:08:52
> | So at work I now have an i386 and sparc64 both running 1.6 BETAs
> | I have the exact same amd maps setup on both. The i386 works fine,
> | but sparc64 does not.
>
> I'd guess that amd is using some socket operation that's not 64-bit
> clean. First try running amd with debug to see if that isolates the
> failure. Then, if that doesn't help you can try to ktrace it.
Good guess. I ktraced it, and sure enough its a sendto that gets
screwed. On i386 we see:
..
144 amd CALL sendto(0x6,0xbfbfb918,0x5c,0,0x80a50c0,0x10)
144 amd GIO fd 6 wrote 92 bytes
"\M-! \0\0\0\0\0\0\0\0\0\^B\0\^A\M^F\M-%\0\0\0\^C\0\0\0\^A\0\0\0\^A\
\0\0\0\^\=\^P\^T\M-J\0\0\0\^Cran\0\0\0\0\0\0\0\0\0\0\0\0\^A\0\0\0\0\0\
\0\0\0"
144 amd RET sendto 92/0x5c
..
144 amd CALL recvfrom(0x6,0xbfbfba94,0x2000,0,0xbfbfba84,0xbfbfba80)
144 amd GIO fd 6 read 72 bytes
"\M-! \0\0\0\0\0\^A\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
8\M-@\0%\M^Sa\^W \0\0\0\0\M-@8
%\M^Sa\^WaV\0\0
8\M-@\0%\M^Sa\0"
144 amd RET recvfrom 72/0x48
144 amd CALL select(0x100,0xbfbfda78,0,0,0xbfbfda70)
144 amd RET select 0
144 amd CALL issetugid
144 amd RET issetugid 0
but on sparc64 its:
658 amd CALL sendto(0x6,0xffffffffffff88e0,0x70,0,0xffffffffffff88b0,0x10)
658 amd GIO fd 6 wrote 112 bytes
"\0\0\0@\0\0\0\0\0\0\0\^B\0\^A\M^F\240\0\0\0\^B\0\0\0\0\0\0\0\^A\0\0\08\
=\^P\^[\M-W\0\0\0\^Fhobbit\0\0\0\0\0\0\0\0\0\0\0\0\0\a\0\0\0\0"
658 amd RET sendto 112/0x70
..
658 amd CALL recvfrom(0x6,0xffffffffffffb2f0,0x2000,0,0xffffffffffffb2e0,0xffffffffffffb2dc)
658 amd GIO fd 6 read 24 bytes
"\0\0\0@\0\0\0\^A\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
658 amd RET recvfrom 24/0x18
658 amd CALL select(0x100,0xffffffffffffd2d0,0,0,0xffffffffffffd2f0)
658 amd RET select 0
658 amd CALL __sigprocmask14(0x1,0,0x2301f0)
658 amd RET __sigprocmask14 0
and its down hill from there.
Everything prior to that sendto looked ok.
6 would appear to be the fwd_sock btw.
I'll have to rebuild amd with debugging enabled to look further.
--sjg