Re: BUG #15525: Build failures when compiling Postgres with Make parallelization

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: hi(at)alyssa(dot)is
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15525: Build failures when compiling Postgres with Make parallelization
Date: 2018-11-28 00:11:36
Message-ID: 31602.1543363896@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

=?utf-8?q?PG_Bug_reporting_form?= <noreply(at)postgresql(dot)org> writes:
> There have been multiple reports to the Nix package manager that compiling
> PostgreSQL on macOS with Make's -j option have resulted in build failures.
> As far as we know, this has only happened on macOS.

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.

For me, trying 9.6 branch on macOS Mojave (10.14.1) on a 2018 6-core MBP,
"make -j" is unusable because the OS fails to support an indefinite number
of processes: lots of commands fall over with messages like
clang: error: unable to execute command: posix_spawn failed: Resource temporarily unavailable
This is not a Postgres bug; maybe you could make a case that it's
make's fault, but I'm not sure. It looks like a lot of the fork
failures happen outside of make's view.

However, if I use a more reasonable parallelism level like -j8,
or even as high as -j25, it goes through fine. It doesn't look
like there's any net reduction in build time above around -j10,
so I'm not very excited about seeing whether it would fall over
at some level short of what breaks the OS.

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.

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 ...

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Munro 2018-11-28 02:03:58 Re: BUG #15520: PAM authentication + domain socket -> DNS query for symbolic hostname [local]
Previous Message Thomas Munro 2018-11-27 23:31:36 Re: BUG #15525: Build failures when compiling Postgres with Make parallelization