From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: emacs-unicode-2 bootstrap on FreeBSD (temacs coredump) Date: Wed, 01 Aug 2007 20:27:06 +0200 Message-ID: <46B0D07A.4010103@swipnet.se> References: <46AA17BD.7080900@netasq.com> <46AC6849.1010400@swipnet.se> <20070731190955.GA11917@oslo.ath.cx> <46B0505A.9010208@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1185992889 15485 80.91.229.12 (1 Aug 2007 18:28:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 1 Aug 2007 18:28:09 +0000 (UTC) Cc: "Herbert J. Skuhra" , emacs-devel@gnu.org To: YAMAMOTO Mitsuharu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 01 20:28:03 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IGIvS-0002Bj-23 for ged-emacs-devel@m.gmane.org; Wed, 01 Aug 2007 20:28:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IGIvR-0004ON-6d for ged-emacs-devel@m.gmane.org; Wed, 01 Aug 2007 14:28:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IGIvN-0004MY-83 for emacs-devel@gnu.org; Wed, 01 Aug 2007 14:27:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IGIvL-0004JO-Kv for emacs-devel@gnu.org; Wed, 01 Aug 2007 14:27:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IGIvL-0004JG-9n for emacs-devel@gnu.org; Wed, 01 Aug 2007 14:27:55 -0400 Original-Received: from av6-1-sn3.vrr.skanova.net ([81.228.9.179]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IGIvK-0006cc-VY for emacs-devel@gnu.org; Wed, 01 Aug 2007 14:27:55 -0400 Original-Received: by av6-1-sn3.vrr.skanova.net (Postfix, from userid 502) id 454D038360; Wed, 1 Aug 2007 20:27:54 +0200 (CEST) Original-Received: from smtp3-1-sn3.vrr.skanova.net (smtp3-1-sn3.vrr.skanova.net [81.228.9.101]) by av6-1-sn3.vrr.skanova.net (Postfix) with ESMTP id 1238137FCD; Wed, 1 Aug 2007 20:27:54 +0200 (CEST) Original-Received: from husetbladh.homeip.net (81-235-205-78-no59.tbcn.telia.com [81.235.205.78]) by smtp3-1-sn3.vrr.skanova.net (Postfix) with ESMTP id 626CE37E4A; Wed, 1 Aug 2007 20:27:53 +0200 (CEST) User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) In-Reply-To: X-Detected-Kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:75927 Archived-At: YAMAMOTO Mitsuharu wrote: >>>>>> On Wed, 01 Aug 2007 19:07:47 +0900, YAMAMOTO Mitsuharu said: >>>>>> > > >> It might be possible to call pthread_mutex_init for all malloc >> mutexes at the (non-thread-safe) initialization stage with >> temporarily disabling the use of the mutexes. >> > > Could you try if this works? As usual, I can't test it myself. > I tried it and temacs runs OK. However, it seems that the mutex initialization is lost, so it has to be done again with the dumped emacs. pthread_self also allocates memory, so even if this is fixed we still get a loop. I also tried using system malloc on FreeBSD 6.2, but that didn't work. Emacs crashed on first realloc (heap corrupt). I guess undumping on FreeBSD with system malloc is broken (or perhaps impossible). There are spin locks available on BSD and GNU/Linux, see pthread_spin_init. But that don't help for the pthread_self issue. Sigh, back to the drawing board. Jan D.