From owner-freebsd-java@freebsd.org Thu Aug 2 18:58:19 2018 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42BC0104A86C for ; Thu, 2 Aug 2018 18:58:19 +0000 (UTC) (envelope-from 1983-01-06@gmx.net) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E444764C7 for ; Thu, 2 Aug 2018 18:58:18 +0000 (UTC) (envelope-from 1983-01-06@gmx.net) Received: from [192.168.1.13] ([84.143.154.227]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LZmd6-1gFB2y40Fg-00lYjC; Thu, 02 Aug 2018 20:58:09 +0200 Subject: Re: SCTP do not work with OpenJDK8 To: =?UTF-8?Q?Timo_V=c3=b6lker?= , "freebsd-java@freebsd.org" References: From: Michael Osipov <1983-01-06@gmx.net> Message-ID: Date: Thu, 2 Aug 2018 20:58:05 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Y7b+yI8kDYFOVcy+LSBu4RMadnAFJs8pxRHHldWNncBnWc/tmZd bxnUr6G8kEv95fmMQD0Bv1aLh0QvjDmMwgBcgp7d8KZYHZThkpaJKAjGYBxtFEGdu+hxiko EEEaWODxTb9NWaQ+sHmzyO4+kT0jQ1nqxfszY4Gb5k8Z/XeXgZhJ8GB3O3D2Xv8H6ft8avo myUgtyRhQaE9ZbD2AMD0Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:6EZ+4zpaiPM=:GEQfxy3qwIwLZk2LlKn8zr uszhOO7aIIF650/WWns2gSANtGabho9Qj0U4ajJ3wK3F5TPioLPhP8/ebjAH+OQHy9cpmaXLF IyA2SJsCi0YEMSxANnemjcPoLTy4vYA9JAkBLfXqBgHy2WjGQgBpEPYcCZbqppJarmWnjRJmI gaFuyTUqbwiOK+Zjti/O5NpC9lS8I+RzmNhLyF2sUMbvi+nrUmTL2A+IZKQ5cb7TqSQE9GtUJ XAH/0Jiv3FyIUfi3AhwzllaVdYtxMNFpL9Rg18xVDGGF8B1/p6Y8vCgd9cgje2T9Kl2ni7gMr yvRnO6mws2d0bHhLTY5mwKWpmq4r9kjz3No34QaVxsVmRppr9GHjUUqYjyJPg67Te5Qtw936G j/0cA2+N3C+dkKerwdJ2rjJDFciSZkkiA/XFcRjTY5i7MY4MCgDfb9LFkTi7CESfk1TEtpUi4 WHASFy+VUDZYjtcf4fifP8B3asj+UB8MztkYpFGR74gxTd+v5M47dae4ZsNGYtmU+sW25vHCn Yq9gjPkmEmcI4eAHcoWI+zpVnzGTCJrLZT1UxeUwmNl5lCjiSqbIN4joDGknDlIPvWeqZiddf RQW+sdh8C+3DJiMsVklw9OZY6E0AEtCsJDZ2CD9Lh7bRZ6Iec826Tt+8Z44KDfRn44iUFtEyI 3oib0c6WfPRmy+Zr+JWrv84b0TzUM6U8fYbwG1mQOxd9YNlMhU9LfF1Poku2VZsTsaPgGiflf NdAzUg2Jo4C65RR94uqxyJeW5jfE/J4W1Fh/TAPtZml29Z0jepDMI60CRGrF1wbsSR2JgSMFf hNpnxyd X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2018 18:58:19 -0000 Am 2018-07-31 um 15:55 schrieb Timo V=F6lker: > Hi, >=20 > I found an issue with SCTP support in OpenJDK8 for FreeBSD. In my examp= le >=20 > https://github.com/msvoelker/java-sctp/ >=20 > it happened that OpenJDK8 calls sendmsg with an buffer address !=3D NUL= L and a buffer length of 0, which is an invalid argument for FreeBSD. I f= ound the code lines in the function Java_sun_nio_ch_sctp_SctpChannelImpl_= send0 of >=20 > jdk/src/solaris/native/sun/nio/ch/sctp/SctpChannelImpl.c >=20 > Besides that, I changed two ifdef statements for FreeBSD. I attach my p= atch file at the end. If I copy this patch file to the files directory of= the OpenJDK8 port, I'm able to install OpenJDK and to run the example ap= plication. >=20 > sudo cp patch-jdk-src-solaris-native-sun-nio-ch-sctp-SctpChannelImpl.c = /usr/ports/java/openjdk8/files > cd /usr/ports/java/openjdk8 > sudo make install >=20 > I just saw that hwh found this issue already for OpenJDK7. >=20 > https://lists.freebsd.org/pipermail/freebsd-java/2010-September/008906.= html Nice patch, can you file an issue with Bugzilla, so this won't get lost? Michael