From owner-freebsd-current@freebsd.org Fri Nov 3 16:02:09 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 B59EAE55643 for ; Fri, 3 Nov 2017 16:02:09 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 7BA7969F66; Fri, 3 Nov 2017 16:02:08 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 4043F260230; Fri, 3 Nov 2017 17:02:01 +0100 (CET) Subject: Re: Emacs and LLD To: Tobias Kortkamp , freebsd-current@FreeBSD.org Cc: ashish@FreeBSD.org References: <1509722947.3890181.1160658160.1B91FF70@webmail.messagingengine.com> From: Hans Petter Selasky Message-ID: <618796df-fa1f-f113-0f64-a04790134e3c@selasky.org> Date: Fri, 3 Nov 2017 16:59:17 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1509722947.3890181.1160658160.1B91FF70@webmail.messagingengine.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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:02:09 -0000 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? --HPS