Bad kernel with make -j?

2013-04-17 Thread Brett Glass

Everyone:

I've just had to resurrect a machine which apparently failed 
because the kernel was built with the make -j option.


As reported in the make(1) man page, the purpose of the -j option 
is to let the make program build multiple portions of a program 
concurrently on a machine with multiple CPUs. The idea is to make 
use of SMP to speed up the build process. Unfortunately, after 
updating a FreeBSD 9.0 system with freebsd-update (and seeing some 
changes that would affect the custom kernel the machine was 
running), I rebuilt the kernel using the -j5 option. (The machine 
has 2 cores and 4 threads, but threads block due to I/O as well as 
memory access. So, when it works properly, -j5 is the fastest option.)


The result was a kernel in which some compiled-in modules -- in 
particular, netgraph nodes -- weren't accessible. mpd5 began 
spewing odd messages, and VPN connections would not come up. I'd 
built the kernel with the NO_MODULES option, so the modules that 
were missing couldn't be loaded dynamically.


Rebuilding the kernel using a single-threaded make solved the problem.

Have others seen the same symptoms? I'd like to be able to do fast, 
multithreaded kernel builds, but will obviously have to avoid it if 
the resulting kernels are corrupted.


--Brett Glass

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bad kernel with make -j?

2013-04-17 Thread andreas scherrer
on 17.4.13 21:18  Brett Glass said the following:
 I've just had to resurrect a machine which apparently failed because the
 kernel was built with the make -j option.

[snip]

 The result was a kernel in which some compiled-in modules -- in
 particular, netgraph nodes -- weren't accessible. mpd5 began spewing odd
 messages, and VPN connections would not come up. I'd built the kernel
 with the NO_MODULES option, so the modules that were missing couldn't be
 loaded dynamically.
 
 Rebuilding the kernel using a single-threaded make solved the problem.

I am not very experienced but I stumbled over the following note in
/usr/src/UPDATING before:

Avoid using make -j when upgrading.  While generally safe, there are
sometimes problems using -j to upgrade.  If your upgrade fails with
-j, please try again without -j.  From time to time in the past
there have been problems using -j with buildworld and/or
installworld.  This is especially true when upgrading between
distant versions (eg one that cross a major release boundary or
several minor releases, or when several months have passed on the
-current branch).

Maybe that's a hint?

 --Brett Glass
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 freebsd-questions-unsubscr...@freebsd.org


Cheers
andreas
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org