From owner-freebsd-java@FreeBSD.ORG Thu Feb 4 07:12:49 2010 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 911831065670 for ; Thu, 4 Feb 2010 07:12:49 +0000 (UTC) (envelope-from jlin@maxiscale.com) Received: from server505.appriver.com (server505b.appriver.com [98.129.35.5]) by mx1.freebsd.org (Postfix) with ESMTP id 537098FC12 for ; Thu, 4 Feb 2010 07:12:48 +0000 (UTC) X-Policy: GLOBAL - maxiscale.com X-Policy: GLOBAL - maxiscale.com X-Primary: jlin@maxiscale.com X-Note: This Email was scanned by AppRiver SecureTide X-ALLOW: jlin@maxiscale.com ALLOWED X-Virus-Scan: V- X-Note: Spam Tests Failed: X-Country-Path: UNITED STATES->->UNITED STATES->UNITED STATES X-Note-Sending-IP: 98.129.23.15 X-Note-Reverse-DNS: ht02.exg5.exghost.com X-Note-WHTLIST: jlin@maxiscale.com X-Note: User Rule Hits: X-Note: Global Rule Hits: G173 G174 G175 G176 G180 G181 G192 G279 X-Note: Encrypt Rule Hits: X-Note: Mail Class: ALLOWEDSENDER X-Note: Headers Injected Received: from [98.129.23.15] (HELO ht02.exg5.exghost.com) by server505.appriver.com (CommuniGate Pro SMTP 5.3.2) with ESMTPS id 22462483; Thu, 04 Feb 2010 01:12:51 -0600 Received: from HT03.exg5.exghost.com (98.129.23.45) by HT02.exg5.exghost.com (98.129.23.15) with Microsoft SMTP Server (TLS) id 8.2.176.0; Thu, 4 Feb 2010 01:12:47 -0600 Received: from MBX01.exg5.exghost.com ([169.254.1.90]) by HT03.exg5.exghost.com ([10.242.228.75]) with mapi; Thu, 4 Feb 2010 01:12:47 -0600 From: Joe Lin To: Greg Lewis Date: Thu, 4 Feb 2010 01:12:43 -0600 Thread-Topic: DatagramCahnnel scatter/gather problem on diablo 1.6.0_07-b02 Thread-Index: AcqjyPgcJovtz21oT0iRp04FlP16OgBoFvCg Message-ID: <8B6860326495B2438DCBEA74AA981C7A78B22D0D@MBX01.exg5.exghost.com> References: <8B6860326495B2438DCBEA74AA981C7A78B220E0@MBX01.exg5.exghost.com> <201002011207.57163.pieter@degoeje.nl> <8B6860326495B2438DCBEA74AA981C7A78B22476@MBX01.exg5.exghost.com> <201002020207.30685.pieter@degoeje.nl> <8B6860326495B2438DCBEA74AA981C7A78B224DE@MBX01.exg5.exghost.com> <20100202053114.GA90683@misty.eyesbeyond.com> In-Reply-To: <20100202053114.GA90683@misty.eyesbeyond.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "freebsd-java@freebsd.org" Subject: RE: DatagramCahnnel scatter/gather problem on diablo 1.6.0_07-b02 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 07:12:49 -0000 With that line in there it works no problem. Thanks. -----Original Message----- From: Greg Lewis [mailto:glewis@eyesbeyond.com]=20 Sent: Monday, February 01, 2010 9:31 PM To: Joe Lin Cc: freebsd-java@freebsd.org; Pieter de Goeje Subject: Re: DatagramCahnnel scatter/gather problem on diablo 1.6.0_07-b02 On Mon, Feb 01, 2010 at 07:13:56PM -0600, Joe Lin wrote: > I think that is the problem. As I looked at the code in DatagramDispatche= r.c:writev0(), these fields only got zeroed out in solaris or linux: >=20 > m.msg_name =3D NULL; > m.msg_namelen =3D 0; > m.msg_iov =3D iov; > m.msg_iovlen =3D len; > #ifdef __solaris__ > m.msg_accrights =3D NULL; > m.msg_accrightslen =3D 0; > #endif >=20 > #ifdef __linux__ > m.msg_control =3D NULL; > m.msg_controllen =3D 0; > #endif So, if you make the second #ifdef into #if defined(__linux__) || defined(_ALLBSD_SOURCE) what happens? > -----Original Message----- > From: Pieter de Goeje [mailto:pieter@degoeje.nl]=20 > Sent: Monday, February 01, 2010 5:08 PM > To: freebsd-java@freebsd.org > Cc: Joe Lin > Subject: Re: DatagramCahnnel scatter/gather problem on diablo 1.6.0_07-b0= 2 >=20 > On Monday 01 February 2010 23:42:27 Joe Lin wrote: > > Did a struss and the error happened with sendmsg call: > > > > sendmsg(0x4,0x7fffffbfe580,0x0,0x1,0x2,0x830c17de8) ERR#22 'Invalid > > argument' >=20 > The struss output is broken because sendmsg only takes 3 arguments. It se= ems=20 > that java passes bogus data in msg_flags and possibly msg_control and=20 > msg_controllen fields of struct msghdr: >=20 > (gdb) p *m > $4 =3D {msg_name =3D 0x0, msg_namelen =3D 0, msg_iov =3D 0x5dee4e00, msg_= iovlen =3D 2,=20 > msg_control =3D 0x29012e74, msg_controllen =3D 10480328, msg_flags =3D 74= 0777920} >=20 >=20 > > > > -----Original Message----- > > From: Pieter de Goeje [mailto:pieter@degoeje.nl] > > Sent: Monday, February 01, 2010 3:08 AM > > To: freebsd-java@freebsd.org > > Cc: Joe Lin > > Subject: Re: DatagramCahnnel scatter/gather problem on diablo 1.6.0_07-= b02 > > > > On Monday 01 February 2010 02:08:55 Joe Lin wrote: > > > Thanks for the reply. I looked at JDK source code and it appears that= the > > > JNI call should be in > > > > > > J2se/src/solaris/native/sun/nio/ch/DatagramDispatcher.c:write0(): > > > > > > > > > There's only linux and solaris #ifdef but not for BSD. I wonder how/w= hat > > > BSD is calling. Since I'm getting a "IOException:Invalid argument" so= I > > > guess this should correspond to a EINVAL. And a sendmsg() in FreeBSD = does > > > not return an EINVAL. So the Diablo port must be calling a writev(). = But > > > I could not locate the source code. Wish I can find out what went wro= ng > > > with dialblo VM. > > > > You could use ktrace/kdump to find out what it (not?) calls and why it > > dies. > > > > - Pieter > > > > No virus found in this incoming message. > > Checked by AVG - www.avg.com > > Version: 9.0.733 / Virus Database: 271.1.1/2649 - Release Date: 01/30/1= 0 > > 22:39:00 _______________________________________________ > > freebsd-java@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-java > > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" >=20 >=20 >=20 > --=20 > Pieter de Goeje >=20 > No virus found in this incoming message. > Checked by AVG - www.avg.com=20 > Version: 9.0.733 / Virus Database: 271.1.1/2649 - Release Date: 01/31/10 = 23:35:00 > _______________________________________________ > freebsd-java@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" --=20 Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org No virus found in this incoming message. Checked by AVG - www.avg.com=20 Version: 9.0.733 / Virus Database: 271.1.1/2649 - Release Date: 01/31/10 23= :35:00