From owner-freebsd-arch@FreeBSD.ORG Fri Apr 20 18:55:52 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 016901065672; Fri, 20 Apr 2012 18:55:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 6F27D8FC21; Fri, 20 Apr 2012 18:55:51 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q3KIthVG083333; Fri, 20 Apr 2012 21:55:43 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q3KIthQ5017848; Fri, 20 Apr 2012 21:55:43 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q3KIth7W017847; Fri, 20 Apr 2012 21:55:43 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 20 Apr 2012 21:55:43 +0300 From: Konstantin Belousov To: Robert Millan Message-ID: <20120420185543.GU2358@deviant.kiev.zoral.com.ua> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mL1UijcviCmf7HKk" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-arch@freebsd.org Subject: Re: Increase DFLDSIZ on amd64? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Apr 2012 18:55:52 -0000 --mL1UijcviCmf7HKk Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 20, 2012 at 08:47:45PM +0200, Robert Millan wrote: > Hi Peter, >=20 > El 19 d???abril de 2012 0:23, Peter Wemm ha escrit: > > Hmm. =9AIn login,conf, we have: > > :datasize=3Dunlimited: > > .. which causes the datasize limit to be pushed to 32G by default at > > login/cron/sshd/etc. >=20 > Well, Debian has a similar facility, but I don't think this solves the > problem, as it only covers processes that descend from a login shell. > What about daemons? >=20 > > Also, malloc doesn't use this pool on amd64 - it comes straight out of > > mmap MAP_ANON page blocks. =9AThe only that should be hitting it ever > > would be things that call the old sbrk(3) interface directly. =9AMalloc > > shouldn't be hitting it. >=20 > I hit trouble with the dynamic linker: >=20 > # cat test.c > char buf[1024*1024*1024]; > int > main () > { > } > # gcc test.c -o test > # ./test > Abort trap: 6 >=20 > Not sure about other things but IMHO it's a valid reason to increase > the default to match with the one set by userland. Just for record, this is not an issue with dynamic linker. Kernel image activator returns error if data segment size is larger then RLIMIT_DATA value, see imgact_elf.c:901. Then, since the address space of the program which called execve(2) is already destroyed when segment mapping is performed, kernel has no other choice and kills the process. --mL1UijcviCmf7HKk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk+RsS8ACgkQC3+MBN1Mb4gV/QCgqnjq1Q4d+q9YQQpS0jKzQQCX t+MAoJFJjPzL88TLITx4TtVnU1DsYHcr =5kdP -----END PGP SIGNATURE----- --mL1UijcviCmf7HKk--