From owner-freebsd-java@FreeBSD.ORG Mon Feb 1 00:44:52 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 A83CA106566C for ; Mon, 1 Feb 2010 00:44:52 +0000 (UTC) (envelope-from pieter@degoeje.nl) Received: from mx.utwente.nl (mx2.utsp.utwente.nl [130.89.2.13]) by mx1.freebsd.org (Postfix) with ESMTP id 2C71A8FC19 for ; Mon, 1 Feb 2010 00:44:51 +0000 (UTC) Received: from nox-laptop.student.utwente.nl (nox-laptop.student.utwente.nl [130.89.160.140]) by mx.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id o110ifF4001211; Mon, 1 Feb 2010 01:44:41 +0100 From: Pieter de Goeje To: freebsd-java@freebsd.org Date: Mon, 1 Feb 2010 01:44:41 +0100 User-Agent: KMail/1.9.10 References: <8B6860326495B2438DCBEA74AA981C7A78B220E0@MBX01.exg5.exghost.com> In-Reply-To: <8B6860326495B2438DCBEA74AA981C7A78B220E0@MBX01.exg5.exghost.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201002010144.41376.pieter@degoeje.nl> X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact icts.servicedesk@utwente.nl for more information. X-UTwente-MailScanner: Found to be clean X-UTwente-MailScanner-From: pieter@degoeje.nl X-Spam-Status: No Cc: Joe Lin 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: Mon, 01 Feb 2010 00:44:52 -0000 On Monday 01 February 2010 01:01:38 Joe Lin wrote: > Hi I wrote a sample program trying to use > DatagramChannel.write(ByteBuffer[] bufs). The exact same code works on > Windows and Linux. But it fails on the Diablo VM under FreeBSD 7.0 64 bit. > The exception: > > Exception in thread "main" java.io.IOException: Invalid argument > at sun.nio.ch.DatagramDispatcher.writev0(Native Method) > at sun.nio.ch.DatagramDispatcher.writev(DatagramDispatcher.java:37) > at sun.nio.ch.IOUtil.write(IOUtil.java:164) > at > sun.nio.ch.DatagramChannelImpl.write0(DatagramChannelImpl.java:414) at > sun.nio.ch.DatagramChannelImpl.write(DatagramChannelImpl.java:431) at > java.nio.channels.DatagramChannel.write(DatagramChannel.java:418) at > coco.McastSender.main(McastSender.java:68). I can confirm it also doesn't work on FreeBSD 8/i386 and amd64 using jdk6 or openjdk6. I find it odd why it works on Linux because they have exactly the same writev(2) as we do. Scatter/gather I/O isn't very often used so I guess you're the first one that has run into this problem. -- Pieter de Goeje