From owner-freebsd-java@FreeBSD.ORG Sun Sep 14 10:23:30 2014 Return-Path: Delivered-To: freebsd-java@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B14888FD for ; Sun, 14 Sep 2014 10:23:30 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98267345 for ; Sun, 14 Sep 2014 10:23:30 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s8EANUqA037229 for ; Sun, 14 Sep 2014 10:23:30 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-java@FreeBSD.org Subject: [Bug 177802] Could not update openfire because of problem in java/openjdk6 Date: Sun, 14 Sep 2014 10:23:30 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports Tree X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: cs@FreeBSD.org X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-java@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2014 10:23:30 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=177802 Carlo Strub changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cs@FreeBSD.org --- Comment #3 from Carlo Strub --- Is this PR still relevant? -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-java@FreeBSD.ORG Mon Sep 15 10:47:52 2014 Return-Path: Delivered-To: freebsd-java@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B46CE8F for ; Mon, 15 Sep 2014 10:47:52 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3227CED4 for ; Mon, 15 Sep 2014 10:47:52 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s8FAlqwc079831 for ; Mon, 15 Sep 2014 10:47:52 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-java@FreeBSD.org Subject: [Bug 177802] Could not update openfire because of problem in java/openjdk6 Date: Mon, 15 Sep 2014 10:47:51 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports Tree X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ports@toco-domains.de X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-java@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2014 10:47:52 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D177802 Torsten Z=C3=BChlsdorff changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ports@toco-domains.de --- Comment #4 from Torsten Z=C3=BChlsdorff --- I'm sorry - its to long ago for me to answer. I'm currently not using this software anymore and at the moment i have no possibility to test it. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-java@FreeBSD.ORG Mon Sep 15 11:22:44 2014 Return-Path: Delivered-To: freebsd-java@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85830BA1 for ; Mon, 15 Sep 2014 11:22:44 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D0A0320 for ; Mon, 15 Sep 2014 11:22:44 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s8FBMiPn003203 for ; Mon, 15 Sep 2014 11:22:44 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-java@FreeBSD.org Subject: [Bug 177802] Could not update openfire because of problem in java/openjdk6 Date: Mon, 15 Sep 2014 11:22:44 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports Tree X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: cs@FreeBSD.org X-Bugzilla-Status: Timeout X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-java@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2014 11:22:44 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=177802 Carlo Strub changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Timeout Resolution|--- |Overcome By Events -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-java@FreeBSD.ORG Tue Sep 16 13:39:24 2014 Return-Path: Delivered-To: freebsd-java@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F96CCF; Tue, 16 Sep 2014 13:39:24 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id D7306E55; Tue, 16 Sep 2014 13:39:19 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA09786; Tue, 16 Sep 2014 16:39:17 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XTsyT-0004k9-Cs; Tue, 16 Sep 2014 16:39:17 +0300 Message-ID: <54183D4D.3050907@FreeBSD.org> Date: Tue, 16 Sep 2014 16:38:21 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: John Baldwin , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org, freebsd-java@FreeBSD.org Subject: Re: svn commit: r271635 - in head: lib/libc/sys sys/vm References: <201409151720.s8FHKDFs099885@svn.freebsd.org> In-Reply-To: <201409151720.s8FHKDFs099885@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2014 13:39:24 -0000 On 15/09/2014 20:20, John Baldwin wrote: > Author: jhb > Date: Mon Sep 15 17:20:13 2014 > New Revision: 271635 > URL: http://svnweb.freebsd.org/changeset/base/271635 > > Log: > Add stricter checking of some mmap() arguments: > - Fail with EINVAL if an invalid protection mask is passed to mmap(). > - Fail with EINVAL if an unknown flag is passed to mmap(). > - Fail with EINVAL if both MAP_PRIVATE and MAP_SHARED are passed to mmap(). > - Require one of either MAP_PRIVATE or MAP_SHARED for non-anonymous > mappings. This broke Java, at least java/openjdk7, for me: 25323 java CALL mmap(0,0x3000000,0x3,0x1042,0xffffffff,0) 25323 java RET mmap -1 errno 22 Invalid argument 25323 java CALL write(0x1,0x7fffffbfd450,0x2b) 25323 java GIO fd 1 wrote 43 bytes "Error occurred during initialization of VM " 25323 java RET write 43/0x2b 25323 java CALL write(0x1,0x80209a1e2,0x2d) 25323 java GIO fd 1 wrote 45 bytes "Could not reserve enough space for code cache" It seems that MAP_NORESERVE presence could be detected in sys/mman.h and then it is used for some reason. I guess that the port can be easily fixed, but this commit breaks compatibility with older binaries. Perhaps MAP_NORESERVE should be removed as well given that we do not actually implement it. > Reviewed by: alc, kib > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D698 > > Modified: > head/lib/libc/sys/mmap.2 > head/sys/vm/vm_mmap.c > > Modified: head/lib/libc/sys/mmap.2 > ============================================================================== > --- head/lib/libc/sys/mmap.2 Mon Sep 15 17:14:09 2014 (r271634) > +++ head/lib/libc/sys/mmap.2 Mon Sep 15 17:20:13 2014 (r271635) > @@ -28,7 +28,7 @@ > .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 > .\" $FreeBSD$ > .\" > -.Dd June 19, 2014 > +.Dd September 15, 2014 > .Dt MMAP 2 > .Os > .Sh NAME > @@ -372,6 +372,29 @@ The > argument > is not a valid open file descriptor. > .It Bq Er EINVAL > +An invalid value was passed in the > +.Fa prot > +argument. > +.It Bq Er EINVAL > +An undefined option was set in the > +.Fa flags > +argument. > +.It Bq Er EINVAL > +Both > +.Dv MAP_PRIVATE > +and > +.Dv MAP_SHARED > +were specified. > +.It Bq Er EINVAL > +None of > +.Dv MAP_ANON , > +.Dv MAP_PRIVATE , > +.Dv MAP_SHARED , > +or > +.Dv MAP_STACK > +was specified. > +At least one of these flags must be included. > +.It Bq Er EINVAL > .Dv MAP_FIXED > was specified and the > .Fa addr > > Modified: head/sys/vm/vm_mmap.c > ============================================================================== > --- head/sys/vm/vm_mmap.c Mon Sep 15 17:14:09 2014 (r271634) > +++ head/sys/vm/vm_mmap.c Mon Sep 15 17:20:13 2014 (r271635) > @@ -203,17 +203,17 @@ sys_mmap(td, uap) > struct vnode *vp; > vm_offset_t addr; > vm_size_t size, pageoff; > - vm_prot_t cap_maxprot, prot, maxprot; > + vm_prot_t cap_maxprot, maxprot; > void *handle; > objtype_t handle_type; > - int align, error, flags; > + int align, error, flags, prot; > off_t pos; > struct vmspace *vms = td->td_proc->p_vmspace; > cap_rights_t rights; > > addr = (vm_offset_t) uap->addr; > size = uap->len; > - prot = uap->prot & VM_PROT_ALL; > + prot = uap->prot; > flags = uap->flags; > pos = uap->pos; > > @@ -244,8 +244,23 @@ sys_mmap(td, uap) > flags |= MAP_ANON; > pos = 0; > } > + /* XXX: MAP_RENAME, MAP_NORESERVE */ > + if ((flags & ~(MAP_SHARED | MAP_PRIVATE | MAP_FIXED | MAP_HASSEMAPHORE | > + MAP_STACK | MAP_NOSYNC | MAP_ANON | MAP_EXCL | MAP_NOCORE | > + MAP_PREFAULT_READ | > +#ifdef MAP_32BIT > + MAP_32BIT | > +#endif > + MAP_ALIGNMENT_MASK)) != 0) > + return (EINVAL); > if ((flags & (MAP_EXCL | MAP_FIXED)) == MAP_EXCL) > return (EINVAL); > + if ((flags & (MAP_ANON | MAP_SHARED | MAP_PRIVATE)) == 0 || > + (flags & (MAP_SHARED | MAP_PRIVATE)) == (MAP_SHARED | MAP_PRIVATE)) > + return (EINVAL); > + if (prot != PROT_NONE && > + (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC)) != 0) > + return (EINVAL); > > /* > * Align the file position to a page boundary, > @@ -415,6 +430,8 @@ sys_mmap(td, uap) > map: > td->td_fpop = fp; > maxprot &= cap_maxprot; > + > + /* This relies on VM_PROT_* matching PROT_*. */ > error = vm_mmap(&vms->vm_map, &addr, size, prot, maxprot, > flags, handle_type, handle, pos); > td->td_fpop = NULL; > -- Andriy Gapon From owner-freebsd-java@FreeBSD.ORG Tue Sep 16 14:10:05 2014 Return-Path: Delivered-To: freebsd-java@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 972CE4D2; Tue, 16 Sep 2014 14:10:05 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 28338285; Tue, 16 Sep 2014 14:10:03 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id RAA10218; Tue, 16 Sep 2014 17:10:01 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XTtSD-0004m2-5v; Tue, 16 Sep 2014 17:10:01 +0300 Message-ID: <54184481.3060804@FreeBSD.org> Date: Tue, 16 Sep 2014 17:09:05 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: John Baldwin , freebsd-java@FreeBSD.org Subject: Re: svn commit: r271635 - in head: lib/libc/sys sys/vm References: <201409151720.s8FHKDFs099885@svn.freebsd.org> <54183D4D.3050907@FreeBSD.org> In-Reply-To: <54183D4D.3050907@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2014 14:10:05 -0000 On 16/09/2014 16:38, Andriy Gapon wrote: > On 15/09/2014 20:20, John Baldwin wrote: >> Author: jhb >> Date: Mon Sep 15 17:20:13 2014 >> New Revision: 271635 >> URL: http://svnweb.freebsd.org/changeset/base/271635 >> >> Log: >> Add stricter checking of some mmap() arguments: >> - Fail with EINVAL if an invalid protection mask is passed to mmap(). >> - Fail with EINVAL if an unknown flag is passed to mmap(). >> - Fail with EINVAL if both MAP_PRIVATE and MAP_SHARED are passed to mmap(). >> - Require one of either MAP_PRIVATE or MAP_SHARED for non-anonymous >> mappings. > > This broke Java, at least java/openjdk7, for me: > > 25323 java CALL > mmap(0,0x3000000,0x3,0x1042,0xffffffff,0) > 25323 java RET mmap -1 errno 22 Invalid argument > 25323 java CALL write(0x1,0x7fffffbfd450,0x2b) > 25323 java GIO fd 1 wrote 43 bytes > "Error occurred during initialization of VM > " > 25323 java RET write 43/0x2b > 25323 java CALL write(0x1,0x80209a1e2,0x2d) > 25323 java GIO fd 1 wrote 45 bytes > "Could not reserve enough space for code cache" > > It seems that MAP_NORESERVE presence could be detected in sys/mman.h and then it > is used for some reason. No, it's not auto-detected, it's explicitly used in hotspot/src/os/bsd/vm/os_bsd.cpp. > I guess that the port can be easily fixed, but this commit breaks compatibility > with older binaries. Perhaps MAP_NORESERVE should be removed as well given that > we do not actually implement it. > >> Reviewed by: alc, kib >> MFC after: 2 weeks >> Differential Revision: https://reviews.freebsd.org/D698 >> >> Modified: >> head/lib/libc/sys/mmap.2 >> head/sys/vm/vm_mmap.c -- Andriy Gapon From owner-freebsd-java@FreeBSD.ORG Wed Sep 17 18:14:31 2014 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE1DD521; Wed, 17 Sep 2014 18:14:30 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2F19286; Wed, 17 Sep 2014 18:14:30 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C40E0B979; Wed, 17 Sep 2014 14:14:29 -0400 (EDT) From: John Baldwin To: Andriy Gapon Subject: Re: svn commit: r271635 - in head: lib/libc/sys sys/vm Date: Wed, 17 Sep 2014 11:03:29 -0400 Message-ID: <45601526.3eIXIxKgkH@ralph.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/10.0-STABLE; KDE/4.10.5; amd64; ; ) In-Reply-To: <54183D4D.3050907@FreeBSD.org> References: <201409151720.s8FHKDFs099885@svn.freebsd.org> <54183D4D.3050907@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 17 Sep 2014 14:14:29 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, freebsd-java@freebsd.org X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2014 18:14:31 -0000 On Tuesday, September 16, 2014 04:38:21 PM Andriy Gapon wrote: > On 15/09/2014 20:20, John Baldwin wrote: > > Author: jhb > > Date: Mon Sep 15 17:20:13 2014 > > New Revision: 271635 > > URL: http://svnweb.freebsd.org/changeset/base/271635 > > > > Log: > > Add stricter checking of some mmap() arguments: > > - Fail with EINVAL if an invalid protection mask is passed to mmap(). > > - Fail with EINVAL if an unknown flag is passed to mmap(). > > - Fail with EINVAL if both MAP_PRIVATE and MAP_SHARED are passed to > > mmap(). > > - Require one of either MAP_PRIVATE or MAP_SHARED for non-anonymous > > > > mappings. > > This broke Java, at least java/openjdk7, for me: > > 25323 java CALL > mmap(0,0x3000000,0x3,0x1042 MAP_ANON>,0xffffffff,0) 25323 java RET mmap -1 errno 22 Invalid > argument > 25323 java CALL write(0x1,0x7fffffbfd450,0x2b) > 25323 java GIO fd 1 wrote 43 bytes > "Error occurred during initialization of VM > " > 25323 java RET write 43/0x2b > 25323 java CALL write(0x1,0x80209a1e2,0x2d) > 25323 java GIO fd 1 wrote 45 bytes > "Could not reserve enough space for code cache" > > It seems that MAP_NORESERVE presence could be detected in sys/mman.h and > then it is used for some reason. > I guess that the port can be easily fixed, but this commit breaks > compatibility with older binaries. Perhaps MAP_NORESERVE should be removed > as well given that we do not actually implement it. I've allowed it for now, but I do intend on removing it in 11. -- John Baldwin From owner-freebsd-java@FreeBSD.ORG Wed Sep 17 19:20:18 2014 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C6377F8; Wed, 17 Sep 2014 19:20:18 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B89A1B8C; Wed, 17 Sep 2014 19:20:17 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s8HJK9Nw008282 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Sep 2014 22:20:09 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s8HJK9Nw008282 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s8HJK93b008280; Wed, 17 Sep 2014 22:20:09 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 17 Sep 2014 22:20:09 +0300 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r271635 - in head: lib/libc/sys sys/vm Message-ID: <20140917192009.GH2161@kib.kiev.ua> References: <201409151720.s8FHKDFs099885@svn.freebsd.org> <54183D4D.3050907@FreeBSD.org> <45601526.3eIXIxKgkH@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YrlhzR9YrZtruaFS" Content-Disposition: inline In-Reply-To: <45601526.3eIXIxKgkH@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andriy Gapon , freebsd-java@freebsd.org X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2014 19:20:18 -0000 --YrlhzR9YrZtruaFS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 17, 2014 at 11:03:29AM -0400, John Baldwin wrote: > On Tuesday, September 16, 2014 04:38:21 PM Andriy Gapon wrote: > > On 15/09/2014 20:20, John Baldwin wrote: > > > Author: jhb > > > Date: Mon Sep 15 17:20:13 2014 > > > New Revision: 271635 > > > URL: http://svnweb.freebsd.org/changeset/base/271635 > > >=20 > > > Log: > > > Add stricter checking of some mmap() arguments: > > > - Fail with EINVAL if an invalid protection mask is passed to mmap(= ). > > > - Fail with EINVAL if an unknown flag is passed to mmap(). > > > - Fail with EINVAL if both MAP_PRIVATE and MAP_SHARED are passed to > > > mmap(). > > > - Require one of either MAP_PRIVATE or MAP_SHARED for non-anonymous > > > =20 > > > mappings. > >=20 > > This broke Java, at least java/openjdk7, for me: > >=20 > > 25323 java CALL > > mmap(0,0x3000000,0x3,0x1042 > MAP_ANON>,0xffffffff,0) 25323 java RET mmap -1 errno 22 Invalid > > argument > > 25323 java CALL write(0x1,0x7fffffbfd450,0x2b) > > 25323 java GIO fd 1 wrote 43 bytes > > "Error occurred during initialization of VM > > " > > 25323 java RET write 43/0x2b > > 25323 java CALL write(0x1,0x80209a1e2,0x2d) > > 25323 java GIO fd 1 wrote 45 bytes > > "Could not reserve enough space for code cache" > >=20 > > It seems that MAP_NORESERVE presence could be detected in sys/mman.h and > > then it is used for some reason. > > I guess that the port can be easily fixed, but this commit breaks > > compatibility with older binaries. Perhaps MAP_NORESERVE should be rem= oved > > as well given that we do not actually implement it. >=20 > I've allowed it for now, but I do intend on removing it in 11. I think that the removal procedure should be as follows, in the single commit: 1. remove the defines from public headers, and move them to vm_mmap.c 2. bump __FreeBSD_version 3. allow the bits for older binaries by p_osrel. Might be, a comment in mman.h should be kept for the binary value of MAP_NORESERVE so that person who decide to reuse the bit for a useful flag would be not surprised. --YrlhzR9YrZtruaFS Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUGd7oAAoJEJDCuSvBvK1BnIUP/1dZAk7ipEmgmAKNA7RCtcRc j1HCTMkvtFKh+PTtlXDBYlVFOf69EVx6wXsyfkt0EHlJDSH37n5YRiGNFjzYPBdE 3lP8dTWGZsIRBvCDG36ujVsDzqlEhD/K0/HTmUCVwcfkzbXVRJH+fchWbN3zra1s v66Khg3Y2h8vQOLv/4nUf1Nam+u9dVgd61TH4zS2PS88wKo8EOQoKlalJMeO0xIr uuO33eK2p/nGK9bXfsUd5ggDyP99iIbNy639ZTmKQC/eEHF7g1D69kN0Ia3+af+v hz6/uUJAlwLs/lmRTnieMBGQDZCRHR94saj0lf9rcgZZL9kUVjVgzDMAqMfwxEaC mUomkh4k4bJ1bdorQP3l8JML4fh/p3Mdp5kj2NflGz/C7nHBgCd++KWiD6Sk9HZe evomK6bgacKh10dFN8r2hLllfnWsUojawg7sJpHYdVKAE6C3M+M75bXRIFpzdi+/ HbwMwTdqBxZI4orqGujGWSP2cvBgsAS4IRfuOACuvz8Q3TSK5CKdRTlhbnC8lamj zfEeUktLb85v3kAQq6KSnv3TMoLQQMTgw+cBtGO0LdFdJKRlzAAE4lyWaHmVib2K Je80p7wjfDw33Wgh3x2yLrnhtCQm9TrgSCAmoJZFNCtDIWYoJTDadtpdZwGSVPG6 rKWLnhCttRhklgPcZDif =PnEK -----END PGP SIGNATURE----- --YrlhzR9YrZtruaFS-- From owner-freebsd-java@FreeBSD.ORG Wed Sep 17 20:12:33 2014 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03E48A3B; Wed, 17 Sep 2014 20:12:33 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC7991FC; Wed, 17 Sep 2014 20:12:32 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D3DF0B985; Wed, 17 Sep 2014 16:12:31 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Subject: Re: svn commit: r271635 - in head: lib/libc/sys sys/vm Date: Wed, 17 Sep 2014 15:40:09 -0400 Message-ID: <8290503.DSlOKmYch9@ralph.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/10.0-STABLE; KDE/4.10.5; amd64; ; ) In-Reply-To: <20140917192009.GH2161@kib.kiev.ua> References: <201409151720.s8FHKDFs099885@svn.freebsd.org> <45601526.3eIXIxKgkH@ralph.baldwin.cx> <20140917192009.GH2161@kib.kiev.ua> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 17 Sep 2014 16:12:31 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andriy Gapon , freebsd-java@freebsd.org X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2014 20:12:33 -0000 On Wednesday, September 17, 2014 10:20:09 PM Konstantin Belousov wrote: > On Wed, Sep 17, 2014 at 11:03:29AM -0400, John Baldwin wrote: > > On Tuesday, September 16, 2014 04:38:21 PM Andriy Gapon wrote: > > > On 15/09/2014 20:20, John Baldwin wrote: > > > > Author: jhb > > > > Date: Mon Sep 15 17:20:13 2014 > > > > New Revision: 271635 > > > > URL: http://svnweb.freebsd.org/changeset/base/271635 > > > > > > > > Log: > > > > Add stricter checking of some mmap() arguments: > > > > - Fail with EINVAL if an invalid protection mask is passed to > > > > mmap(). > > > > - Fail with EINVAL if an unknown flag is passed to mmap(). > > > > - Fail with EINVAL if both MAP_PRIVATE and MAP_SHARED are passed to > > > > mmap(). > > > > - Require one of either MAP_PRIVATE or MAP_SHARED for non-anonymous > > > > > > > > mappings. > > > > > > This broke Java, at least java/openjdk7, for me: > > > 25323 java CALL > > > > > > mmap(0,0x3000000,0x3,0x1042 > > RVE| MAP_ANON>,0xffffffff,0) 25323 java RET mmap -1 errno 22 > > > Invalid argument > > > > > > 25323 java CALL write(0x1,0x7fffffbfd450,0x2b) > > > 25323 java GIO fd 1 wrote 43 bytes > > > > > > "Error occurred during initialization of VM > > > " > > > > > > 25323 java RET write 43/0x2b > > > 25323 java CALL write(0x1,0x80209a1e2,0x2d) > > > 25323 java GIO fd 1 wrote 45 bytes > > > > > > "Could not reserve enough space for code cache" > > > > > > It seems that MAP_NORESERVE presence could be detected in sys/mman.h and > > > then it is used for some reason. > > > I guess that the port can be easily fixed, but this commit breaks > > > compatibility with older binaries. Perhaps MAP_NORESERVE should be > > > removed > > > as well given that we do not actually implement it. > > > > I've allowed it for now, but I do intend on removing it in 11. > > I think that the removal procedure should be as follows, in the single > commit: > 1. remove the defines from public headers, and move them to vm_mmap.c > 2. bump __FreeBSD_version > 3. allow the bits for older binaries by p_osrel. > > Might be, a comment in mman.h should be kept for the binary value > of MAP_NORESERVE so that person who decide to reuse the bit for > a useful flag would be not surprised. Yes, I had used MAP_UNUSED0020 similar to what was done for MAP_INHERIT and exactly this (P_OSREL_MAP_RENAME, etc.). Once the other fixes settle in I will publish this for review and also request an exp-run from ports so we can patch things to remove MAP_NORESERVE before this is committed. -- John Baldwin From owner-freebsd-java@FreeBSD.ORG Wed Sep 17 22:06:35 2014 Return-Path: Delivered-To: java@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4901A6B7 for ; Wed, 17 Sep 2014 22:06:35 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 311F5F32 for ; Wed, 17 Sep 2014 22:06:35 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s8HM6ZR4039161 for ; Wed, 17 Sep 2014 22:06:35 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: java@FreeBSD.org Subject: [Bug 193475] openjdk7 jinfo and jmap do not work Date: Wed, 17 Sep 2014 22:06:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports Tree X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jkim@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: glewis@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2014 22:06:35 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193475 --- Comment #6 from Jung-uk Kim --- It seems we haven't merged this changeset for BSD: http://hg.openjdk.java.net/bsd-port/bsd-port/hotspot/rev/c7b481c7e5d9 -- You are receiving this mail because: You are on the CC list for the bug. From owner-freebsd-java@FreeBSD.ORG Thu Sep 18 20:51:25 2014 Return-Path: Delivered-To: java@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7089BFA4 for ; Thu, 18 Sep 2014 20:51:25 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5836B2A1 for ; Thu, 18 Sep 2014 20:51:25 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s8IKpPYR052866 for ; Thu, 18 Sep 2014 20:51:25 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: java@FreeBSD.org Subject: [Bug 193475] openjdk7 jinfo and jmap do not work Date: Thu, 18 Sep 2014 20:51:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports Tree X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jkim@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: glewis@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2014 20:51:25 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193475 --- Comment #7 from Jung-uk Kim --- (In reply to Jung-uk Kim from comment #5) > (In reply to Jung-uk Kim from comment #4) > > I ported the fixes to java/openjdk8, too. > > Actually, now I am not sure about this any more. I'll test it later. I just tested java/openjdk8. It seems it does not have this problem. -- You are receiving this mail because: You are on the CC list for the bug. From owner-freebsd-java@FreeBSD.ORG Thu Sep 18 20:52:41 2014 Return-Path: Delivered-To: java@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91B8972 for ; Thu, 18 Sep 2014 20:52:41 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 773A32D7 for ; Thu, 18 Sep 2014 20:52:41 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s8IKqfLH067885 for ; Thu, 18 Sep 2014 20:52:41 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: java@FreeBSD.org Subject: [Bug 193475] openjdk7 jinfo and jmap do not work Date: Thu, 18 Sep 2014 20:52:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports Tree X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jkim@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: glewis@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2014 20:52:41 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193475 --- Comment #8 from Jung-uk Kim --- (In reply to Jung-uk Kim from comment #6) > It seems we haven't merged this changeset for BSD: > > http://hg.openjdk.java.net/bsd-port/bsd-port/hotspot/rev/c7b481c7e5d9 I guess I was wrong. It still seems to fail with this change merged to a BSD version. -- You are receiving this mail because: You are on the CC list for the bug.