From owner-svn-src-all@freebsd.org Wed Jan 30 11:58:10 2019 Return-Path: Delivered-To: svn-src-all@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 17DC314BDA25; Wed, 30 Jan 2019 11:58:10 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A75568ECCC; Wed, 30 Jan 2019 11:58:09 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 957C04739; Wed, 30 Jan 2019 11:58:09 +0000 (UTC) Date: Wed, 30 Jan 2019 11:58:09 +0000 From: Alexey Dokuchaev To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343566 - in head/lib/libthr: . thread Message-ID: <20190130115809.GA57859@FreeBSD.org> References: <201901292246.x0TMkjQH074121@repo.freebsd.org> <20190130053709.GA35927@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190130053709.GA35927@FreeBSD.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: A75568ECCC X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.84 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.84)[-0.840,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jan 2019 11:58:10 -0000 On Wed, Jan 30, 2019 at 05:37:09AM +0000, Alexey Dokuchaev wrote: > On Tue, Jan 29, 2019 at 10:46:45PM +0000, Konstantin Belousov wrote: > > New Revision: 343566 > > URL: https://svnweb.freebsd.org/changeset/base/343566 > > > > Log: > > Untangle jemalloc and mutexes initialization. > > > > The need to use libc malloc(3) from some places in libthr always > > caused issues. For instance, per-thread key allocation was switched to > > use plain mmap(2) to get storage, because some third party mallocs > > used keys for implementation of calloc(3). > > > > Even more important, libthr calls calloc(3) during initialization of > > pthread mutexes, and jemalloc uses pthread mutexes. Jemalloc provides > > some way to both postpone the initialization, and to make > > initialization to use specialized allocator, but this is very fragile > > and often breaks. See the referenced PR for another example. > > Could this also fix https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220767 > I wonder... Going through the "make world" now to test some Quake II. :-) I've updated to the latest -CURRENT (r343572) and now Quake II starts fine again, like it was in jemalloc pre-5.0.0 times. Thank you Kostik! ./danfe