Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gS800-0003Jj-RX for pgsql-bugs@arkaria.postgresql.org; Wed, 28 Nov 2018 22:08:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gS7zz-0001hs-DH for pgsql-bugs@arkaria.postgresql.org; Wed, 28 Nov 2018 22:07:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gS7qG-0000aM-Jy for pgsql-bugs@lists.postgresql.org; Wed, 28 Nov 2018 21:57:56 +0000 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gS7qD-0004ah-I2 for pgsql-bugs@lists.postgresql.org; Wed, 28 Nov 2018 21:57:55 +0000 Received: by mail-pl1-x62d.google.com with SMTP id g9so5571729plo.3 for ; Wed, 28 Nov 2018 13:57:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jackkelly-name.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :user-agent:mime-version; bh=yEXDxZLpm2FmHbNQxuFPw5sx5OmiwOtmtKKtJbggjf4=; b=pdsZfADAYzF45fPH2dweiTL/lhfBVGBpK8MlJOKYMmPCAMVoEtVi1NHljM5o3XeMpv 5Sp0MqZoT6ylUegabY0gLjHda5OSDP9pO5yxhRk4E2q3TZHElxAAoApOS8J/nO1l+D4i MjFcXjNGPPVLWKViog1YxdaqAT9V1mmRfx12Sef4e85dcOtolIlrAHrJVAmf90LzLq8p Dh7uMY54qnQ0MMq8mbDT3QnLLmlRM4hYbAdDbUPHKm2PJa8Y7vG4PDFfYUcELCJN6Aqm JmFBwv1igZP9QuAnPVf6dhT1YScYsVHHP7U2O9ErNOhaT6uGVYs0i0TX/JI1YHgsNiMu rvIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:user-agent:mime-version; bh=yEXDxZLpm2FmHbNQxuFPw5sx5OmiwOtmtKKtJbggjf4=; b=VrDxpFdgQd+Gnc0aIaVol/gny+Gz67KvO4k7NA/4I1A6gxznk3a3ieImiT5ABRd1nB CjIqvwtaoD9Lx6xOezjCb7XRiVGDlh58ZBXLmA6ZUIBL9aHZpCU2Eh7Ppb5/dT1HXWlR j5rlVuKAORLza6DfnGJyohLLFWpAO7TSqfINgjVbiEnefdbNjJVLp1KVONeI/LxLLKYr Swyyh66GyNy2/V5ZmMavp+s4VV82tkcfFG/JteEmhitDiKTrOisIbQ4YMtgj99iyLskZ Iv7igAOV8QsuiYH5axIEm+DkTpLqUG8kNe+1cwvdUrYxSUUyjdibT05lw+3IvSqPOyo8 cWhg== X-Gm-Message-State: AA+aEWYcaFYOzrZypX441kqdyiNJM/cDLjWyIZlysAUAzYC+8jVcojVa A59jsqhR1mjD2Wk2gb/8wGoiXQeEXfo= X-Google-Smtp-Source: AFSGD/X4DtVBOZULJZKmCNBDkebuAkVZR1MEMTLbXc5jyvjXw0g1hg/sXrLlppAyZCKMOX8VvPIScg== X-Received: by 2002:a17:902:b68d:: with SMTP id c13mr38702212pls.102.1543442271871; Wed, 28 Nov 2018 13:57:51 -0800 (PST) Received: from cyberdwarf ([45.56.158.13]) by smtp.gmail.com with ESMTPSA id 184sm4493070pfe.106.2018.11.28.13.57.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Nov 2018 13:57:51 -0800 (PST) From: Jack Kelly To: tgl@sss.pgh.pa.us Cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15525: Build failures when compiling Postgres with Make parallelization In-Reply-To: <31602.1543363896@sss.pgh.pa.us> References: <15525-a30da084f17a1faa@postgresql.org> <31602.1543363896@sss.pgh.pa.us> Date: Thu, 29 Nov 2018 08:57:46 +1100 Message-ID: <87k1kwlvad.fsf@jackkelly.name> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Tom & List, OP reported the bug I encountered on my behalf, which is reported to nixpkgs at https://github.com/NixOS/nixpkgs/issues/51093#issuecomment-442301157 . I'm not a subscriber to this list and have constructed the threading headers manually (I hope this works). Please CC me in replies where relevant. Tom Lane writes: > This isn't too helpful if you don't mention which macOS version nor what > sort of hardware exactly. Most PG developers use parallel builds > routinely, so we know that it's not broken in general. To complicate matters further, I'm reporting the nixpkgs bug on behalf of my mac-using colleague. His machine overview: Model Name: MacBook Pro Model Identifier: MacBookPro14,3 Processor Name: Intel Core i7 Processor Speed: 2.9 GHz Number of Processors: 1 Total Number of Cores: 4 L2 Cache (per Core): 256 KB L3 Cache: 8 MB Memory: 16 GB Boot ROM Version: 185.0.0.0.0 SMC Version (system): 2.45f0 The build is happening on an APFS file system, I believe. > - snip discussion of process-spawn failures at high -j numbers - > Having said that, we did do a round of patches in the v11 development > cycle that addressed some parallel-make hazards. A lot of said hazards > were new in v11 :-(, but I think that some of them were pre-existing > problems. So you might find that PG 11 is more resistant to whatever > is going on here. A failing build log is attached to the nixpkgs GH issue at https://github.com/NixOS/nixpkgs/files/2617687/build.log I note that it calls `ar rcs libpgtypes.a ...` multiple times during the build, and I speculate that these `ar` invocations start racing each other. @delroth on GH notes: @delroth> Starting in 9.1.0 (postgres/postgres@19e231b) this is in the postgres codebase: @delroth> @delroth> ./src/interfaces/ecpg/compatlib/Makefile: $(MAKE) -C $(top_builddir)/src/interfaces/ecpg/pgtypeslib all @delroth> ./src/interfaces/ecpg/ecpglib/Makefile: $(MAKE) -C $(top_builddir)/src/interfaces/ecpg/pgtypeslib all > BTW, are you using the Apple-supplied make, or some other version? > In the past we've had to fight with parallelism bugs in old gmake > versions ... Whatever nixpkgs asks for, which is probably gnumake, and it looks like nixpkgs has gnumake 4.2.1. HTH, -- Jack