From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Takashi Iwai <tiwai@suse.de>,
Andreas Schwab <schwab@linux-m68k.org>,
git@vger.kernel.org
Subject: Re: glibc mutex deadlock in signal handler
Date: Fri, 04 Sep 2015 14:56:58 -0700 [thread overview]
Message-ID: <xmqq7fo5g85x.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20150904092355.GA524@sigill.intra.peff.net> (Jeff King's message of "Fri, 4 Sep 2015 05:23:55 -0400")
Jeff King <peff@peff.net> writes:
> Perhaps we should reconsider whether f4c3edc (vreportf: avoid
> intermediate buffer, 2015-08-11) is a good idea. Note that snprintf is
> not on the list of safe functions, but I imagine that in practice it is
> fine. Though just avoiding error()/warning() in signal handlers might be
> a more practical solution anyway.
I had exactly the same thought when I read the initial report here.
I wish we can just do "if (in_signal) return;" at the beginning of
vreportf(), but we would not want a global variable there, so... ;-)
Further, I briefly hoped that avoiding error/warning in the signal
handler codepath would allow us to be more lax around allocations,
but I suspect that it unfortunately would not help us that much, as
we may be calling these functions in low memory situations.
So let's queue Takashi's patch as-is for now and look at other
signal codepaths.
Thanks.
next prev parent reply other threads:[~2015-09-04 21:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-03 11:00 glibc mutex deadlock in signal handler Takashi Iwai
2015-09-03 18:12 ` Junio C Hamano
2015-09-03 19:34 ` Takashi Iwai
2015-09-03 20:55 ` Andreas Schwab
2015-09-04 5:52 ` Takashi Iwai
2015-09-04 9:23 ` Jeff King
2015-09-04 9:35 ` Takashi Iwai
2015-09-04 13:04 ` Jeff King
2015-09-04 13:40 ` Takashi Iwai
2015-09-04 21:56 ` Junio C Hamano [this message]
2015-09-05 8:59 ` Jeff King
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=xmqq7fo5g85x.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=schwab@linux-m68k.org \
--cc=tiwai@suse.de \
/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.
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.