From owner-freebsd-current@freebsd.org Fri Nov 3 16:11:59 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19FE9E558C2 for ; Fri, 3 Nov 2017 16:11:59 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E44EB6A4FC; Fri, 3 Nov 2017 16:11:58 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id B3E57211E7; Fri, 3 Nov 2017 12:11:55 -0400 (EDT) Received: from web1 ([10.202.2.211]) by compute4.internal (MEProxy); Fri, 03 Nov 2017 12:11:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=/sBDSx cFeVzW2eb0Z+xQ9ozvwOpoZ+LD78mUtBaB+xI=; b=F+bqI6WmusHRB20hQq5Ty5 +SVia/KE4rZ55LDtQb2sFDNIZ9YmWJLl/1jqm4jc0P8zY57X76d3k6QAtLE7Pw47 WwzQsWQ6Qm9xnx4WcWNQ6xUbVlKPysugWHAPAH+yNLYTVAlrRoUUdB/aNe48Ll0Q aruQ8mqo3+QsTirNJar/zT3Ap1DEMn9qWzt+/EV2gDl0C+iYlAynf0wMRpHKh9sA fKMVPAD5XLU91ROhVMr+Rc9r+Ud3LPLSQ8NcaAmPNGo1SBN0NbninfyUs8glB5sh mJCivYa3sndmDemEx05nJs1wjKCKNqZl7hR0kvbNIPmnmuvzRitO2fhxvwT8wwMw == X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 9A1E395792; Fri, 3 Nov 2017 12:11:55 -0400 (EDT) Message-Id: <1509725515.3900591.1160703880.79F71312@webmail.messagingengine.com> From: Tobias Kortkamp To: Hans Petter Selasky , freebsd-current@FreeBSD.org Cc: ashish@FreeBSD.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-c8a842c4 Date: Fri, 03 Nov 2017 17:11:55 +0100 Subject: Re: Emacs and LLD In-Reply-To: <618796df-fa1f-f113-0f64-a04790134e3c@selasky.org> References: <1509722947.3890181.1160658160.1B91FF70@webmail.messagingengine.com> <618796df-fa1f-f113-0f64-a04790134e3c@selasky.org> X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Nov 2017 16:11:59 -0000 On Fri, Nov 3, 2017, at 16:59, Hans Petter Selasky wrote: > On 11/03/17 16:29, Tobias Kortkamp wrote: > > Hi, > > > > I cannot build editors/emacs-nox11 (or any other Emacs port) on FreeBSD > > 12 anymore for several months now. The build aborts with: > > > > ./temacs --batch --load loadup bootstrap > > Fatal error 'Can't allocate initial thread' at line 337 in file > > /usr/src/lib/libthr/thread/thr_init.c (errno = 12) > > gmake[3]: *** [Makefile:737: bootstrap-emacs] Abort trap (core dumped) > > > > I'm currently running base r324724. Emacs builds fine on the cluster, > > so I thought installing the binary package from pkg.FreeBSD.org would be > > an OK solution, but it immediately crashes too. > > > > My src.conf has WITH_LLD_IS_LD=yes and reading > > https://bugs.freebsd.org/214864 leads me to believe that it's somehow > > responsible for the problems I have with Emacs. > > > > Setting LLD_UNSAFE=yes in the port does not solve the problem. If I > > manually link temacs statically the build can continue, however the > > emacs binary temacs dumps is not usable and immediately crashes. > > > > I can "solve" the problem (in the sense that I can run Emacs again > > outside of a chroot/jail) by extracting /lib/libc.so.7 from a recent > > snapshot (I tried with 20171012-r324542 and the current base.txz > > snapshot) not built with LLD and running it with > > > > LD_PRELOAD="/path/to/libc.so.7" emacs > > > > It'll do for now, but this just doesn't feel right... > > > > Thanks in advance for any insight you can provide! > > > > Backtrace from temacs: > > > > * thread #1, name = 'temacs', stop reason = signal SIGABRT > > * frame #0: 0x0000000800e089aa libc.so.7`__sys_thr_kill at > > thr_kill.S:3 > > frame #1: 0x0000000800e08974 libc.so.7`__raise(s=6) at raise.c:52 > > frame #2: 0x0000000800e088e9 libc.so.7`abort at abort.c:65 > > frame #3: 0x0000000800c8c88a > > libthr.so.3`_thread_exitf(fname=, lineno=, > > fmt=) at thr_exit.c:193 > > frame #4: 0x0000000800c8a02e > > libthr.so.3`_libpthread_init(curthread=0x0000000000000000) at > > thr_init.c:337 > > frame #5: 0x0000000800c8d4b2 libthr.so.3 > > frame #6: 0x0000000800c8d4d6 libthr.so.3`_init + 14 > > frame #7: 0x00000008007b0058 > > ld-elf.so.1`objlist_call_init(list=, > > lockstate=) at rtld.c:2643 > > frame #8: 0x00000008007af3eb > > ld-elf.so.1`_rtld(sp=0x00007fffffffdf08, > > exit_proc=0x00007fffffffdeb0, objp=0x00007fffffffdeb8) at rtld.c:759 > > frame #9: 0x00000008007ad019 ld-elf.so.1`.rtld_start at > > rtld_start.S:39 > > _______________________________________________ > > freebsd-current@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-current > > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > > > > Hi, > > security.bsd.stack_guard_page: 1 > > Does setting the above sysctl to zero make any difference? No, unfortunately not.