From: Brandon Williams <bmwill@google•com>
To: Jeff King <peff@peff•net>
Cc: Junio C Hamano <gitster@pobox•com>, git@vger•kernel.org
Subject: Re: What's cooking in git.git (Nov 2016, #06; Mon, 28)
Date: Wed, 30 Nov 2016 11:54:27 -0800 [thread overview]
Message-ID: <20161130195427.GA166433@google.com> (raw)
In-Reply-To: <20161129065125.cwlbkctniy7oshj2@sigill.intra.peff.net>
On 11/29, Jeff King wrote:
> On Tue, Nov 29, 2016 at 01:37:59AM -0500, Jeff King wrote:
>
> > 2. Grep threads doing more complicated stuff that needs to take a
> > lock. You might try building with -fsanitize=thread to see if it
> > turns up anything.
>
> I tried this and it didn't find anything useful. It complains about
> multiple threads calling want_color() at the same time, which you can
> silence with something like:
>
> diff --git a/builtin/grep.c b/builtin/grep.c
> index 2c727ef49..d48846f40 100644
> --- a/builtin/grep.c
> +++ b/builtin/grep.c
> @@ -207,6 +207,12 @@ static void start_threads(struct grep_opt *opt)
> {
> int i;
>
> + /*
> + * trigger want_color() for its side effect of caching the result;
> + * otherwise the threads will fight over setting the cache
> + */
> + want_color(GIT_COLOR_AUTO);
> +
> pthread_mutex_init(&grep_mutex, NULL);
> pthread_mutex_init(&grep_read_mutex, NULL);
> pthread_mutex_init(&grep_attr_mutex, NULL);
>
> But the problem persists even with that patch, so it is something else.
> It may still be a threading problem; -fsanitize=thread isn't perfect. I
> also couldn't get the stress-test to fail when compiled with it. But
> that may simply mean that the timing of the resulting binary is changed
> enough not to trigger the issue.
>
> -Peff
With you're stress script I'm able to see the failures. The interesting
thing is that the entry missing is always from the non-submodule file.
--
Brandon Williams
next prev parent reply other threads:[~2016-11-30 19:54 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-29 0:15 What's cooking in git.git (Nov 2016, #06; Mon, 28) Junio C Hamano
2016-11-29 1:05 ` Brandon Williams
2016-11-29 6:37 ` Jeff King
2016-11-29 6:51 ` Jeff King
2016-11-30 19:54 ` Brandon Williams [this message]
2016-11-30 23:28 ` Brandon Williams
2016-11-30 23:32 ` Jeff King
2016-11-30 23:40 ` Jeff King
2016-11-30 23:42 ` Brandon Williams
2016-11-30 23:46 ` Jeff King
2016-11-30 23:57 ` Brandon Williams
2016-11-30 23:59 ` Jeff King
2016-12-01 0:04 ` Jeff King
2016-12-01 0:08 ` Brandon Williams
2016-12-01 0:14 ` Stefan Beller
2016-12-01 1:14 ` Brandon Williams
2016-12-01 0:06 ` Brandon Williams
2016-12-01 0:19 ` Jeff King
2016-11-30 23:43 ` Stefan Beller
2016-12-01 7:09 ` Johannes Sixt
2016-12-01 7:19 ` Jeff King
2016-11-29 6:59 ` Jeff King
2016-11-29 18:31 ` Junio C Hamano
2016-11-29 18:37 ` Jeff King
2016-11-29 19:21 ` Stefan Beller
2016-11-29 19:26 ` Junio C Hamano
2016-11-29 19:29 ` Stefan Beller
2016-11-30 0:25 ` Stefan Beller
2016-12-01 8:30 ` bw/transport-protocol-policy Jeff King
2016-12-01 18:14 ` bw/transport-protocol-policy Brandon Williams
2016-12-01 19:20 ` bw/transport-protocol-policy Jeff King
2016-12-01 19:35 ` bw/transport-protocol-policy Brandon Williams
2016-12-01 19:46 ` bw/transport-protocol-policy Jeff King
2016-12-01 19:53 ` bw/transport-protocol-policy Brandon Williams
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=20161130195427.GA166433@google.com \
--to=bmwill@google$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=peff@peff$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox