all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Ken Raeburn <raeburn@raeburn.org>
Cc: Eli Zaretskii <eliz@gnu.org>, Ryan Yeske <rcyeske@gmail.com>,
	emacs-devel@gnu.org
Subject: Re: problems building trunk in OpenBSD/i386
Date: Fri, 13 Jul 2007 09:23:24 +0200	[thread overview]
Message-ID: <4697286C.8040605@swipnet.se> (raw)
In-Reply-To: <B27DC211-8865-4212-967E-C70E96767873@raeburn.org>



Ken Raeburn skrev:
> 
> The other parts of the stack trace indicate that the rest of the loop is 
> in the C library -- pthread_once calls pthread_mutex_lock, which 
> initializes some thread support code, which is causing some priority 
> queue code to try to allocate storage, which winds up calling into 
> gmalloc, which again ensures that initialization has been done by 
> calling pthread_once.

This sounds like a bug in pthread_once.

> 
> The thread support in gmalloc.c appears to be turned on when gtk is 
> available and selected and has the new file chooser interface, and 
> pthread support is available.
> 
> As to how to fix it... I have no good idea at the moment.  I assume 
> OpenBSD uses GCC exclusively; if the platform supports constructor 
> attributes on functions, perhaps we could force __malloc_initialize to 
> be called at program startup, without thread protection, and hope that 
> threads don't get created before main starts.  It seems a bit dicey, but 
> hey, so is replacing malloc. :-)  Trying to detect recursive calls as 
> opposed to simultaneous calls from multiple threads seems tricky, with 
> some of the thread support unavailable until after we finish.
> 

I think we safely can call malloc_initialize from main itself without thread 
protection.  The protection is from threads created by the file dialog, and 
they get created when the dialog is first used.  So we should be safe.

	Jan D.

  reply	other threads:[~2007-07-13  7:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-12  9:37 problems building trunk in OpenBSD/i386 Ryan Yeske
2007-07-12 11:07 ` Eli Zaretskii
2007-07-12 17:22   ` Ken Raeburn
2007-07-13  7:23     ` Jan Djärv [this message]
2007-07-20  1:18       ` Ken Raeburn
2007-07-20  6:43         ` Jan Djärv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4697286C.8040605@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=raeburn@raeburn.org \
    --cc=rcyeske@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.