Upper limit on make -j ?

Bruce Cran bruce at cran.org.uk
Tue Nov 27 15:15:00 PST 2007

Pieter de Goeje wrote:
> On Tuesday 27 November 2007, Andy Greenwood wrote:
>> Aryeh Friedman wrote:
>>> Before I file a PR I just want to know if it is worth it to file a PR
>>> for:
>>> make -j1000 buildworld buildkernel installkernel
>>> seg faulting
>> I thought that the kernel builds couldn't be built using parallel jobs,
>> that it might break something. Is that not true?
> In my experience parallel kernel builds are fine. I think (wild guess) the OP 
> is running out of memory and somewhere in make or gcc the return value of 
> malloc() isn't checked.
> -
> Pieter de Goeje

I just tried this on my amd64 7.0-BETA3 system with 2GB RAM and swap was 
never touched but make still segfaulted during 'make -j1000 buildworld':

rm -f .depend
mkdep -f .depend -a  [long list of files]
echo libc.so.7: /usr/obj/usr/src/tmp/usr/lib/libgcc.a >> .depend
Segmentation fault (core dumped)
*** Error code 139
1 error
*** Error code 2
1 error
*** Error code 2
1 error
*** Error code 2
1 error
 > gdb -core /usr/obj/usr/src/lib/libc/make.core /usr/bin/make
GNU gdb 6.1.1 [FreeBSD]
This GDB was configured as "amd64-marcel-freebsd"...
Core was generated by `make'.
Program terminated with signal 11, Segmentation fault.
#0  0x0000000000432067 in __vfprintf ()
(gdb) bt
#0  0x0000000000432067 in __vfprintf ()
#1  0x0000000000435114 in vfprintf ()
#2  0x000000000042d676 in fprintf ()
#3  0x0000000000406305 in JobExec (job=0x80123f000, argv=0x7fffffffdb10)
     at /usr/src/usr.bin/make/job.c:1321
#4  0x000000000040702d in JobStart (gn=0x8006d9120, flags=Variable 
"flags" is not available.
     at /usr/src/usr.bin/make/job.c:1843
#5  0x000000000040b14c in MakeStartJobs () at 
#6  0x000000000040b34c in Make_Run (targs=0x7fffffffe7f0)
     at /usr/src/usr.bin/make/make.c:793
#7  0x000000000040a081 in main (argc=0, argv=0x0)
     at /usr/src/usr.bin/make/main.c:1273


More information about the freebsd-questions mailing list