Message ID | 20171227060534.3998-2-palmer@dabbelt.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 59024 invoked by alias); 27 Dec 2017 06:05:56 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 59003 invoked by uid 89); 27 Dec 2017 06:05:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-pf0-f170.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:date:message-id:in-reply-to:references :cc:from:to; bh=VR6dL/Rtr0haK+u9sVxbLag4zWunkoxCtO3Lys59dN0=; b=ouikpBVWnX8msL0q4e+Fo3PRMwuVmXs04Nimm4xlZ5uYZRNtmdP8/TNv47jWqjZdW4 GB9VanasZrm2rubKxcDGnELTX2LZR/jXSXJR8N4ia9WAoZZXOaEXAly6lYyJ5kCycBaD +mZfb7rNgNt+8lhs782UUrvnpAf1/YZYEpKcf3OWlFaHZpyE9c/V2FKG0/qe6UGaXUTb 7gr5nd3360Jlh0Nb/AmB/1Q8YTeVERGWOp9iLZJ91Yhc+AzgOI/Ne3QWOTGfGjHwjVUG 80VhdaunEsaOJiz96VJztMK6ggBteNebmA4rHOk5nSLAg7I075k9nJVl9AubUeBwEQQb MFqw== X-Gm-Message-State: AKGB3mI1jSA98va8iT4Spv5XHZkT+XMzGPppCfA5NxkzmTmThBteGRQx JYRWqkiHUZrBPCdPmRCqqO7hnQ== X-Google-Smtp-Source: ACJfBosHCXTorj2lZG5pU3wARDyo5cGoUXet47o1XfC0il/4EcYbNZQsvptXgXia352tGr+Mqx3pfw== X-Received: by 10.99.62.133 with SMTP id l127mr24040322pga.41.1514354753615; Tue, 26 Dec 2017 22:05:53 -0800 (PST) Subject: [PATCH v3 01/19] Avoid race conditions when rebuilding librt.so Date: Tue, 26 Dec 2017 22:05:16 -0800 Message-Id: <20171227060534.3998-2-palmer@dabbelt.com> In-Reply-To: <20171227060534.3998-1-palmer@dabbelt.com> References: <20171227060534.3998-1-palmer@dabbelt.com> Cc: patches@groups.riscv.org, Palmer Dabbelt <palmer@dabbelt.com> From: Palmer Dabbelt <palmer@dabbelt.com> To: libc-alpha@sourceware.org |
Commit Message
Palmer Dabbelt
Dec. 27, 2017, 6:05 a.m. UTC
`make check' sometimes triggers a rebuild of librt.so using nptl/Makefile, which ignores librt's dependence on libpthread. This causes the build to blow up when we attempt to run the test suite on RISC-V. --- nptl/Makefile | 4 ++++ 1 file changed, 4 insertions(+)
Comments
On Tue, 26 Dec 2017, Palmer Dabbelt wrote: > `make check' sometimes triggers a rebuild of librt.so using > nptl/Makefile, which ignores librt's dependence on libpthread. This > causes the build to blow up when we attempt to run the test suite on > RISC-V. OK, please commit, fixed as noted (with an appropriate ChangeLog entry, of course). > +# `make check' sometimes triggers a rebuild of librt.so using this Makefile, Should use neutral vertical quotes now in all new comments, 'make check', not `'. > +# which ignores librt's dependence on libpthread Need '.' at end of comment.
Who is racing with whom? There should not be any parallelism involved here. Andreas.
On Mon, 01 Jan 2018 01:26:34 PST (-0800), schwab@linux-m68k.org wrote: > Who is racing with whom? There should not be any parallelism involved > here. I guess "race condition" isn't quite the right term: the non-determinism comes from the ordering by which make decides to re-build targets during a "make check" that occurs after a GCC "make install". I ended up running into a handful of other problems along these lines, so instead it seems like the sane thing to do is to just "make && make check" in glibc instead. I'll drop this patch.
On Sat, Jan 6, 2018 at 12:50 AM, Palmer Dabbelt <palmer@dabbelt.com> wrote: > On Mon, 01 Jan 2018 01:26:34 PST (-0800), schwab@linux-m68k.org wrote: >> >> Who is racing with whom? There should not be any parallelism involved >> here. > > > I guess "race condition" isn't quite the right term: the non-determinism > comes from the ordering by which make decides to re-build targets during a > "make check" that occurs after a GCC "make install". I ended up running > into a handful of other problems along these lines, so instead it seems like > the sane thing to do is to just "make && make check" in glibc instead. > > I'll drop this patch. I think you should install this patch. Abstractly, "make check" is supposed to work without further ceremony, regardless of whether "make install" has just been run, and this particular missing dependency has bitten me more than once myself. zw
diff --git a/nptl/Makefile b/nptl/Makefile index cf2ba8131b72..be6597e53942 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -612,6 +612,10 @@ else librt = $(common-objpfx)rt/librt.a endif +# `make check' sometimes triggers a rebuild of librt.so using this Makefile, +# which ignores librt's dependence on libpthread +$(common-objpfx)rt/librt.so: $(shared-thread-library) + $(objpfx)tst-cancel17: $(librt) $(objpfx)tst-cancelx17: $(librt) $(objpfx)tst-_res1mod2.so: $(objpfx)tst-_res1mod1.so